Merge remote-tracking branch 'origin/CURA-8688_qt6_cleanup' into CURA-8688_qt6_cleanup

This commit is contained in:
casper 2022-03-01 12:09:35 +01:00
commit 1b116aa76e
4 changed files with 26 additions and 37 deletions

View File

@ -36,7 +36,7 @@ ToolButton
{ {
target: background target: background
color: UM.Theme.getColor("setting_control_disabled") color: UM.Theme.getColor("setting_control_disabled")
border.color: UM.Theme.getColor("setting_control_disabled_border") liningColor: UM.Theme.getColor("setting_control_disabled_border")
} }
}, },
State State
@ -47,7 +47,7 @@ ToolButton
{ {
target: background target: background
color: UM.Theme.getColor("setting_validation_error_background") color: UM.Theme.getColor("setting_validation_error_background")
border.color: UM.Theme.getColor("setting_validation_error") liningColor: UM.Theme.getColor("setting_validation_error")
} }
}, },
State State
@ -58,7 +58,7 @@ ToolButton
{ {
target: background target: background
color: UM.Theme.getColor("setting_validation_warning_background") color: UM.Theme.getColor("setting_validation_warning_background")
border.color: UM.Theme.getColor("setting_validation_warning") liningColor: UM.Theme.getColor("setting_validation_warning")
} }
}, },
State State
@ -69,7 +69,7 @@ ToolButton
{ {
target: background target: background
color: UM.Theme.getColor("setting_control") color: UM.Theme.getColor("setting_control")
border.color: UM.Theme.getColor("setting_control_border_highlight") liningColor: UM.Theme.getColor("border_main_light")
} }
}, },
State State
@ -80,20 +80,15 @@ ToolButton
{ {
target: background target: background
color: UM.Theme.getColor("setting_control") color: UM.Theme.getColor("setting_control")
border.color: UM.Theme.getColor("setting_control_border") liningColor: UM.Theme.getColor("border_field_light")
} }
} }
] ]
background: Rectangle background: UM.UnderlineBackground
{ {
id: background id: background
radius: UM.Theme.getSize("setting_control_radius").width
border.width: UM.Theme.getSize("default_lining").width
color: UM.Theme.getColor("setting_control")
border.color: UM.Theme.getColor("setting_control_border")
UM.RecolorImage UM.RecolorImage
{ {
id: downArrow id: downArrow

View File

@ -5,14 +5,14 @@ import QtQuick 2.7
import QtQuick.Controls 2.0 import QtQuick.Controls 2.0
import UM 1.5 as UM import UM 1.5 as UM
import Cura 1.0 as Cura import Cura 1.5 as Cura
SettingItem SettingItem
{ {
id: base id: base
property var focusItem: control property var focusItem: control
contents: ComboBox contents: Cura.ComboBox
{ {
id: control id: control
anchors.fill: parent anchors.fill: parent
@ -113,7 +113,7 @@ SettingItem
color: UM.Theme.getColor("setting_control_button"); color: UM.Theme.getColor("setting_control_button");
} }
background: Rectangle background: UM.UnderlineBackground
{ {
color: color:
{ {
@ -127,9 +127,7 @@ SettingItem
} }
return UM.Theme.getColor("setting_control") return UM.Theme.getColor("setting_control")
} }
radius: UM.Theme.getSize("setting_control_radius").width liningColor:
border.width: UM.Theme.getSize("default_lining").width
border.color:
{ {
if (!enabled) if (!enabled)
{ {
@ -137,9 +135,9 @@ SettingItem
} }
if (control.hovered || control.activeFocus) if (control.hovered || control.activeFocus)
{ {
return UM.Theme.getColor("setting_control_border_highlight") return UM.Theme.getColor("border_main_light")
} }
return UM.Theme.getColor("setting_control_border") return UM.Theme.getColor("border_field_light")
} }
} }

View File

@ -5,7 +5,7 @@ import QtQuick 2.7
import QtQuick.Controls 2.0 import QtQuick.Controls 2.0
import UM 1.5 as UM import UM 1.5 as UM
import Cura 1.0 as Cura import Cura 1.5 as Cura
SettingItem SettingItem
{ {
@ -19,7 +19,7 @@ SettingItem
// this extra property to keep the ExtrudersModel and use this in the rest of the code. // this extra property to keep the ExtrudersModel and use this in the rest of the code.
property var extrudersWithOptionalModel: CuraApplication.getExtrudersModelWithOptional() property var extrudersWithOptionalModel: CuraApplication.getExtrudersModelWithOptional()
contents: ComboBox contents: Cura.ComboBox
{ {
id: control id: control
anchors.fill: parent anchors.fill: parent
@ -111,26 +111,24 @@ SettingItem
sourceSize.width: width + 5 * screenScaleFactor sourceSize.width: width + 5 * screenScaleFactor
sourceSize.height: width + 5 * screenScaleFactor sourceSize.height: width + 5 * screenScaleFactor
color: UM.Theme.getColor("setting_control_button"); color: UM.Theme.getColor("setting_control_button")
} }
background: Rectangle background: UM.UnderlineBackground
{ {
color: color:
{ {
if (!enabled) if (!enabled)
{ {
return UM.Theme.getColor("setting_control_disabled"); return UM.Theme.getColor("setting_control_disabled")
} }
if (control.hovered || control.activeFocus) if (control.hovered || base.activeFocus)
{ {
return UM.Theme.getColor("setting_control_highlight"); return UM.Theme.getColor("setting_control_highlight")
} }
return UM.Theme.getColor("setting_control"); return UM.Theme.getColor("setting_control")
} }
radius: UM.Theme.getSize("setting_control_radius").width liningColor:
border.width: UM.Theme.getSize("default_lining").width
border.color:
{ {
if (!enabled) if (!enabled)
{ {
@ -138,9 +136,9 @@ SettingItem
} }
if (control.hovered || control.activeFocus) if (control.hovered || control.activeFocus)
{ {
return UM.Theme.getColor("setting_control_border_highlight") return UM.Theme.getColor("border_main_light")
} }
return UM.Theme.getColor("setting_control_border") return UM.Theme.getColor("border_field_light")
} }
} }
@ -214,7 +212,7 @@ SettingItem
if (model.enabled) { if (model.enabled) {
UM.Theme.getColor("setting_control_text") UM.Theme.getColor("setting_control_text")
} else { } else {
UM.Theme.getColor("action_button_disabled_text"); UM.Theme.getColor("action_button_disabled_text")
} }
} }
elide: Text.ElideRight elide: Text.ElideRight

View File

@ -118,15 +118,13 @@
"scrollbar_handle_hover": [255, 255, 255, 255], "scrollbar_handle_hover": [255, 255, 255, 255],
"scrollbar_handle_down": [255, 255, 255, 255], "scrollbar_handle_down": [255, 255, 255, 255],
"setting_category": [75, 80, 83, 255], "setting_category": "background_3",
"setting_category_disabled": [75, 80, 83, 255], "setting_category_disabled": [75, 80, 83, 255],
"setting_category_hover": [75, 80, 83, 255], "setting_category_hover": "background_3",
"setting_category_text": [255, 255, 255, 152], "setting_category_text": [255, 255, 255, 152],
"setting_category_disabled_text": [255, 255, 255, 101], "setting_category_disabled_text": [255, 255, 255, 101],
"setting_category_active_text": [255, 255, 255, 204], "setting_category_active_text": [255, 255, 255, 204],
"setting_control": [43, 48, 52, 255],
"setting_control_highlight": [43, 48, 52, 255],
"setting_control": "background_2", "setting_control": "background_2",
"setting_control_selected": [34, 39, 42, 38], "setting_control_selected": [34, 39, 42, 38],
"setting_control_highlight": "background_2", "setting_control_highlight": "background_2",