mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-06-04 11:14:21 +08:00
Set header border and color by default in ExpandablePopup and Component
CURA-8202
This commit is contained in:
parent
0505842235
commit
a7446d681f
@ -15,8 +15,6 @@ Item
|
|||||||
Cura.MachineSelector
|
Cura.MachineSelector
|
||||||
{
|
{
|
||||||
id: machineSelection
|
id: machineSelection
|
||||||
headerBackgroundBorder.width: UM.Theme.getSize("default_lining").width
|
|
||||||
headerBackgroundBorder.color: UM.Theme.getColor("lining")
|
|
||||||
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
|
||||||
|
@ -52,8 +52,6 @@ Item
|
|||||||
{
|
{
|
||||||
id: machineSelection
|
id: machineSelection
|
||||||
headerCornerSide: Cura.RoundedRectangle.Direction.Left
|
headerCornerSide: Cura.RoundedRectangle.Direction.Left
|
||||||
headerBackgroundBorder.width: UM.Theme.getSize("default_lining").width
|
|
||||||
headerBackgroundBorder.color: UM.Theme.getColor("lining")
|
|
||||||
Layout.preferredWidth: parent.machineSelectorWidth
|
Layout.preferredWidth: parent.machineSelectorWidth
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
@ -62,8 +60,6 @@ Item
|
|||||||
Cura.ConfigurationMenu
|
Cura.ConfigurationMenu
|
||||||
{
|
{
|
||||||
id: printerSetup
|
id: printerSetup
|
||||||
headerBackgroundBorder.width: UM.Theme.getSize("default_lining").width
|
|
||||||
headerBackgroundBorder.color: UM.Theme.getColor("lining")
|
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.preferredWidth: parent.machineSelectorWidth * 2
|
Layout.preferredWidth: parent.machineSelectorWidth * 2
|
||||||
|
@ -44,8 +44,6 @@ Item
|
|||||||
id: viewsSelector
|
id: viewsSelector
|
||||||
height: parent.height
|
height: parent.height
|
||||||
width: UM.Theme.getSize("views_selector").width
|
width: UM.Theme.getSize("views_selector").width
|
||||||
headerBackgroundBorder.width: UM.Theme.getSize("default_lining").width
|
|
||||||
headerBackgroundBorder.color: UM.Theme.getColor("lining")
|
|
||||||
headerCornerSide: Cura.RoundedRectangle.Direction.Left
|
headerCornerSide: Cura.RoundedRectangle.Direction.Left
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -16,8 +16,6 @@ Cura.ExpandableComponent
|
|||||||
id: base
|
id: base
|
||||||
|
|
||||||
dragPreferencesNamePrefix: "view/colorscheme"
|
dragPreferencesNamePrefix: "view/colorscheme"
|
||||||
headerBackgroundBorder.width: UM.Theme.getSize("default_lining").width
|
|
||||||
headerBackgroundBorder.color: UM.Theme.getColor("lining")
|
|
||||||
|
|
||||||
contentHeaderTitle: catalog.i18nc("@label", "Color scheme")
|
contentHeaderTitle: catalog.i18nc("@label", "Color scheme")
|
||||||
|
|
||||||
|
@ -56,6 +56,9 @@ Item
|
|||||||
|
|
||||||
property alias headerBackgroundBorder: background.border
|
property alias headerBackgroundBorder: background.border
|
||||||
|
|
||||||
|
// Whether or not to show the background border
|
||||||
|
property bool enableHeaderBackgroundBorder: true
|
||||||
|
|
||||||
// What icon should be displayed on the right.
|
// What icon should be displayed on the right.
|
||||||
property alias iconSource: collapseButton.source
|
property alias iconSource: collapseButton.source
|
||||||
|
|
||||||
@ -116,6 +119,9 @@ Item
|
|||||||
id: background
|
id: background
|
||||||
property real padding: UM.Theme.getSize("default_margin").width
|
property real padding: UM.Theme.getSize("default_margin").width
|
||||||
|
|
||||||
|
border.width: base.enableHeaderBackgroundBorder ? UM.Theme.getSize("default_lining").width : 0
|
||||||
|
border.color: UM.Theme.getColor("lining")
|
||||||
|
|
||||||
color: base.enabled ? (base.expanded ? headerActiveColor : headerBackgroundColor) : UM.Theme.getColor("disabled")
|
color: base.enabled ? (base.expanded ? headerActiveColor : headerBackgroundColor) : UM.Theme.getColor("disabled")
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|
||||||
|
@ -50,6 +50,9 @@ Item
|
|||||||
|
|
||||||
property alias headerBackgroundBorder: background.border
|
property alias headerBackgroundBorder: background.border
|
||||||
|
|
||||||
|
// Whether or not to show the background border
|
||||||
|
property bool enableHeaderBackgroundBorder: true
|
||||||
|
|
||||||
// What icon should be displayed on the right.
|
// What icon should be displayed on the right.
|
||||||
property alias iconSource: collapseButton.source
|
property alias iconSource: collapseButton.source
|
||||||
|
|
||||||
@ -110,6 +113,9 @@ Item
|
|||||||
id: background
|
id: background
|
||||||
property real padding: UM.Theme.getSize("default_margin").width
|
property real padding: UM.Theme.getSize("default_margin").width
|
||||||
|
|
||||||
|
border.width: base.enableHeaderBackgroundBorder ? UM.Theme.getSize("default_lining").width : 0
|
||||||
|
border.color: UM.Theme.getColor("lining")
|
||||||
|
|
||||||
color: base.enabled ? headerBackgroundColor : UM.Theme.getColor("disabled")
|
color: base.enabled ? headerBackgroundColor : UM.Theme.getColor("disabled")
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|
||||||
|
@ -17,8 +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")
|
||||||
headerBackgroundBorder.width: UM.Theme.getSize("default_lining").width
|
|
||||||
headerBackgroundBorder.color: UM.Theme.getColor("lining")
|
|
||||||
enabled: !preSlicedData
|
enabled: !preSlicedData
|
||||||
disabledText: catalog.i18nc("@label shown when we load a Gcode file", "Print setup disabled. G-code file can not be modified.")
|
disabledText: catalog.i18nc("@label shown when we load a Gcode file", "Print setup disabled. G-code file can not be modified.")
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user