Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'resources/qml/Widgets')
-rw-r--r--resources/qml/Widgets/ComboBox.qml23
-rw-r--r--resources/qml/Widgets/Menu.qml1
-rw-r--r--resources/qml/Widgets/MenuItem.qml9
-rw-r--r--resources/qml/Widgets/TextField.qml23
4 files changed, 44 insertions, 12 deletions
diff --git a/resources/qml/Widgets/ComboBox.qml b/resources/qml/Widgets/ComboBox.qml
index 698eb4ec10..988b7c3782 100644
--- a/resources/qml/Widgets/ComboBox.qml
+++ b/resources/qml/Widgets/ComboBox.qml
@@ -31,15 +31,30 @@ ComboBox
},
State
{
+ name: "active"
+ when: control.activeFocus
+ PropertyChanges
+ {
+ target: background
+ borderColor: UM.Theme.getColor("text_field_border_active")
+ liningColor: UM.Theme.getColor("text_field_border_active")
+ }
+ },
+ State
+ {
name: "highlighted"
- when: control.hovered || control.activeFocus
- PropertyChanges { target: background; liningColor: UM.Theme.getColor("border_main")}
+ when: (base.hovered || control.hovered) && !control.activeFocus
+ PropertyChanges
+ {
+ target: background
+ liningColor: UM.Theme.getColor("text_field_border_hovered")
+ }
}
]
background: UM.UnderlineBackground{}
- indicator: UM.RecolorImage
+ indicator: UM.ColorImage
{
id: downArrow
x: control.width - width - control.rightPadding
@@ -48,8 +63,6 @@ ComboBox
source: UM.Theme.getIcon("ChevronSingleDown")
width: UM.Theme.getSize("standard_arrow").width
height: UM.Theme.getSize("standard_arrow").height
- sourceSize.width: width + 5 * screenScaleFactor
- sourceSize.height: width + 5 * screenScaleFactor
color: UM.Theme.getColor("setting_control_button")
}
diff --git a/resources/qml/Widgets/Menu.qml b/resources/qml/Widgets/Menu.qml
index b3cdfc6967..1a64b981fa 100644
--- a/resources/qml/Widgets/Menu.qml
+++ b/resources/qml/Widgets/Menu.qml
@@ -12,6 +12,7 @@ import Cura 1.0 as Cura
UM.Menu
{
id: menu
+ Item { enabled: false; UM.I18nCatalog { id: catalog; name: "cura"} }
topPadding: UM.Theme.getSize("narrow_margin").height
bottomPadding: UM.Theme.getSize("narrow_margin").height
padding: 0
diff --git a/resources/qml/Widgets/MenuItem.qml b/resources/qml/Widgets/MenuItem.qml
index 36098e1197..c2929e512e 100644
--- a/resources/qml/Widgets/MenuItem.qml
+++ b/resources/qml/Widgets/MenuItem.qml
@@ -15,11 +15,12 @@ UM.MenuItem
implicitHeight: UM.Theme.getSize("menu").height + UM.Theme.getSize("narrow_margin").height
implicitWidth: UM.Theme.getSize("menu").width
- opacity: enabled ? 1.0 : 0.5
- arrow: UM.RecolorImage
+ property bool overrideShowArrow: false
+
+ arrow: UM.ColorImage
{
- visible: menuItem.subMenu
+ visible: menuItem.subMenu || overrideShowArrow
height: UM.Theme.getSize("default_arrow").height
width: height
anchors.verticalCenter: parent.verticalCenter
@@ -29,7 +30,7 @@ UM.MenuItem
color: UM.Theme.getColor("setting_control_text")
}
- indicator: UM.RecolorImage
+ indicator: UM.ColorImage
{
id: check
visible: menuItem.checkable && menuItem.checked
diff --git a/resources/qml/Widgets/TextField.qml b/resources/qml/Widgets/TextField.qml
index b708446d65..085c7b7742 100644
--- a/resources/qml/Widgets/TextField.qml
+++ b/resources/qml/Widgets/TextField.qml
@@ -23,6 +23,8 @@ TextField
selectByMouse: true
font: UM.Theme.getFont("default")
color: UM.Theme.getColor("text_field_text")
+ selectedTextColor: UM.Theme.getColor("text_field_text")
+ placeholderTextColor: UM.Theme.getColor("text_field_text_disabled")
renderType: Text.NativeRendering
selectionColor: UM.Theme.getColor("text_selection")
leftPadding: iconLeft.visible ? iconLeft.width + UM.Theme.getSize("default_margin").width * 2 : UM.Theme.getSize("thin_margin").width
@@ -43,9 +45,24 @@ TextField
},
State
{
+ name: "active"
+ when: control.activeFocus
+ PropertyChanges
+ {
+ target: backgroundRectangle
+ liningColor: UM.Theme.getColor("text_field_border_active")
+ borderColor: UM.Theme.getColor("text_field_border_active")
+ }
+ },
+ State
+ {
name: "hovered"
- when: control.hovered || control.activeFocus
- PropertyChanges { target: backgroundRectangle; liningColor: UM.Theme.getColor("text_field_border_hovered")}
+ when: control.hovered && !control.activeFocus
+ PropertyChanges
+ {
+ target: backgroundRectangle
+ liningColor: UM.Theme.getColor("text_field_border_hovered")
+ }
}
]
@@ -53,7 +70,7 @@ TextField
{
id: backgroundRectangle
//Optional icon added on the left hand side.
- UM.RecolorImage
+ UM.ColorImage
{
id: iconLeft