Remove DropShadow from ExpandablePopup and ExpandableComponent

Since they are not used anywhere anymore

CURA-8202
This commit is contained in:
Konstantinos Karmas 2021-07-01 12:07:35 +02:00
parent ce88392137
commit 0505842235
7 changed files with 4 additions and 50 deletions

View file

@ -17,7 +17,6 @@ Item
id: machineSelection id: machineSelection
headerBackgroundBorder.width: UM.Theme.getSize("default_lining").width headerBackgroundBorder.width: UM.Theme.getSize("default_lining").width
headerBackgroundBorder.color: UM.Theme.getColor("lining") headerBackgroundBorder.color: UM.Theme.getColor("lining")
enableHeaderShadow: false
headerCornerSide: Cura.RoundedRectangle.Direction.All headerCornerSide: Cura.RoundedRectangle.Direction.All
width: UM.Theme.getSize("machine_selector_widget").width width: UM.Theme.getSize("machine_selector_widget").width
height: parent.height height: parent.height

View file

@ -54,7 +54,6 @@ Item
headerCornerSide: Cura.RoundedRectangle.Direction.Left headerCornerSide: Cura.RoundedRectangle.Direction.Left
headerBackgroundBorder.width: UM.Theme.getSize("default_lining").width headerBackgroundBorder.width: UM.Theme.getSize("default_lining").width
headerBackgroundBorder.color: UM.Theme.getColor("lining") headerBackgroundBorder.color: UM.Theme.getColor("lining")
enableHeaderShadow: false
Layout.preferredWidth: parent.machineSelectorWidth Layout.preferredWidth: parent.machineSelectorWidth
Layout.fillWidth: true Layout.fillWidth: true
Layout.fillHeight: true Layout.fillHeight: true
@ -63,7 +62,6 @@ Item
Cura.ConfigurationMenu Cura.ConfigurationMenu
{ {
id: printerSetup id: printerSetup
enableHeaderShadow: false
headerBackgroundBorder.width: UM.Theme.getSize("default_lining").width headerBackgroundBorder.width: UM.Theme.getSize("default_lining").width
headerBackgroundBorder.color: UM.Theme.getColor("lining") headerBackgroundBorder.color: UM.Theme.getColor("lining")
Layout.fillHeight: true Layout.fillHeight: true

View file

@ -46,7 +46,6 @@ Item
width: UM.Theme.getSize("views_selector").width width: UM.Theme.getSize("views_selector").width
headerBackgroundBorder.width: UM.Theme.getSize("default_lining").width headerBackgroundBorder.width: UM.Theme.getSize("default_lining").width
headerBackgroundBorder.color: UM.Theme.getColor("lining") headerBackgroundBorder.color: UM.Theme.getColor("lining")
enableHeaderShadow: false
headerCornerSide: Cura.RoundedRectangle.Direction.Left headerCornerSide: Cura.RoundedRectangle.Direction.Left
} }

View file

@ -18,7 +18,6 @@ Cura.ExpandableComponent
dragPreferencesNamePrefix: "view/colorscheme" dragPreferencesNamePrefix: "view/colorscheme"
headerBackgroundBorder.width: UM.Theme.getSize("default_lining").width headerBackgroundBorder.width: UM.Theme.getSize("default_lining").width
headerBackgroundBorder.color: UM.Theme.getColor("lining") headerBackgroundBorder.color: UM.Theme.getColor("lining")
enableHeaderShadow: false
contentHeaderTitle: catalog.i18nc("@label", "Color scheme") contentHeaderTitle: catalog.i18nc("@label", "Color scheme")

View file

@ -7,8 +7,6 @@ import QtQuick.Controls 2.3
import UM 1.2 as UM import UM 1.2 as UM
import Cura 1.0 as Cura import Cura 1.0 as Cura
import QtGraphicalEffects 1.0 // For the dropshadow
// The expandable component has 2 major sub components: // The expandable component has 2 major sub components:
// * The headerItem; Always visible and should hold some info about what happens if the component is expanded // * The headerItem; Always visible and should hold some info about what happens if the component is expanded
// * The contentItem; The content that needs to be shown if the component is expanded. // * The contentItem; The content that needs to be shown if the component is expanded.
@ -75,11 +73,7 @@ Item
// On what side should the header corners be shown? 1 is down, 2 is left, 3 is up and 4 is right. // On what side should the header corners be shown? 1 is down, 2 is left, 3 is up and 4 is right.
property alias headerCornerSide: background.cornerSide property alias headerCornerSide: background.cornerSide
property alias headerShadowColor: shadow.color property int popupOffset: 2
property alias enableHeaderShadow: shadow.visible
property int shadowOffset: 2
// Prefix used for the dragged position preferences. Preferences not used if empty. Don't translate! // Prefix used for the dragged position preferences. Preferences not used if empty. Don't translate!
property string dragPreferencesNamePrefix: "" property string dragPreferencesNamePrefix: ""
@ -186,20 +180,6 @@ Item
} }
} }
DropShadow
{
id: shadow
// Don't blur the shadow
radius: 0
anchors.fill: background
source: background
verticalOffset: base.shadowOffset
visible: true
color: UM.Theme.getColor("action_button_shadow")
// Should always be drawn behind the background.
z: background.z - 1
}
Cura.RoundedRectangle Cura.RoundedRectangle
{ {
id: contentContainer id: contentContainer
@ -211,7 +191,7 @@ Item
height: childrenRect.height height: childrenRect.height
// Ensure that the content is located directly below the headerItem // Ensure that the content is located directly below the headerItem
y: dragPreferencesNamePrefix === "" ? (background.height + base.shadowOffset + base.contentSpacingY) : UM.Preferences.getValue(dragPreferencesNamePrefix + dragPreferencesNameY) y: dragPreferencesNamePrefix === "" ? (background.height + base.popupOffset + base.contentSpacingY) : UM.Preferences.getValue(dragPreferencesNamePrefix + dragPreferencesNameY)
// Make the content aligned with the rest, using the property contentAlignment to decide whether is right or left. // Make the content aligned with the rest, using the property contentAlignment to decide whether is right or left.
// In case of right alignment, the 3x padding is due to left, right and padding between the button & text. // In case of right alignment, the 3x padding is due to left, right and padding between the button & text.

View file

@ -7,8 +7,6 @@ import QtQuick.Controls 2.3
import UM 1.2 as UM import UM 1.2 as UM
import Cura 1.0 as Cura import Cura 1.0 as Cura
import QtGraphicalEffects 1.0 // For the dropshadow
// The expandable component has 2 major sub components: // The expandable component has 2 major sub components:
// * The headerItem; Always visible and should hold some info about what happens if the component is expanded // * The headerItem; Always visible and should hold some info about what happens if the component is expanded
// * The contentItem; The content that needs to be shown if the component is expanded. // * The contentItem; The content that needs to be shown if the component is expanded.
@ -74,11 +72,7 @@ Item
// Change the contentItem close behaviour // Change the contentItem close behaviour
property alias contentClosePolicy : content.closePolicy property alias contentClosePolicy : content.closePolicy
property alias headerShadowColor: shadow.color property int popupOffset: 2
property alias enableHeaderShadow: shadow.visible
property int shadowOffset: 2
onEnabledChanged: onEnabledChanged:
{ {
@ -190,26 +184,12 @@ Item
} }
DropShadow
{
id: shadow
// Don't blur the shadow
radius: 0
anchors.fill: background
source: background
verticalOffset: base.shadowOffset
visible: true
color: UM.Theme.getColor("action_button_shadow")
// Should always be drawn behind the background.
z: background.z - 1
}
Popup Popup
{ {
id: content id: content
// Ensure that the content is located directly below the headerItem // Ensure that the content is located directly below the headerItem
y: background.height + base.shadowOffset y: background.height + base.popupOffset
// Make the content aligned with the rest, using the property contentAlignment to decide whether is right or left. // Make the content aligned with the rest, using the property contentAlignment to decide whether is right or left.
// In case of right alignment, the 3x padding is due to left, right and padding between the button & text. // In case of right alignment, the 3x padding is due to left, right and padding between the button & text.

View file

@ -17,7 +17,6 @@ Cura.ExpandableComponent
contentPadding: UM.Theme.getSize("default_lining").width contentPadding: UM.Theme.getSize("default_lining").width
contentHeaderTitle: catalog.i18nc("@label", "Print settings") contentHeaderTitle: catalog.i18nc("@label", "Print settings")
enableHeaderShadow: false
headerBackgroundBorder.width: UM.Theme.getSize("default_lining").width headerBackgroundBorder.width: UM.Theme.getSize("default_lining").width
headerBackgroundBorder.color: UM.Theme.getColor("lining") headerBackgroundBorder.color: UM.Theme.getColor("lining")
enabled: !preSlicedData enabled: !preSlicedData