mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 01:35:53 +08:00
Restyle simple mode Infill controls
Tweak scrollbar colors
This commit is contained in:
parent
66782d41f7
commit
101df0035d
@ -41,7 +41,7 @@ Item
|
|||||||
}
|
}
|
||||||
Label{
|
Label{
|
||||||
id: infillCaption
|
id: infillCaption
|
||||||
width: infillCellLeft.width - UM.Theme.sizes.default_margin.width
|
width: infillCellLeft.width - UM.Theme.sizes.default_margin.width * 2
|
||||||
text: infillModel.count > 0 && infillListView.activeIndex != -1 ? infillModel.get(infillListView.activeIndex).text : ""
|
text: infillModel.count > 0 && infillListView.activeIndex != -1 ? infillModel.get(infillListView.activeIndex).text : ""
|
||||||
font: UM.Theme.fonts.caption
|
font: UM.Theme.fonts.caption
|
||||||
wrapMode: Text.Wrap
|
wrapMode: Text.Wrap
|
||||||
@ -57,10 +57,9 @@ Item
|
|||||||
|
|
||||||
height: childrenRect.height;
|
height: childrenRect.height;
|
||||||
width: base.width / 100 * 55
|
width: base.width / 100 * 55
|
||||||
spacing: 12
|
spacing: UM.Theme.sizes.default_margin.width
|
||||||
|
|
||||||
anchors.right: parent.right
|
anchors.left: infillCellLeft.right
|
||||||
anchors.rightMargin: UM.Theme.sizes.default_margin.width - (UM.Theme.sizes.default_margin.width/4)
|
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.topMargin: UM.Theme.sizes.default_margin.height
|
anchors.topMargin: UM.Theme.sizes.default_margin.height
|
||||||
|
|
||||||
@ -92,29 +91,35 @@ Item
|
|||||||
Rectangle{
|
Rectangle{
|
||||||
id: infillIconLining
|
id: infillIconLining
|
||||||
|
|
||||||
width: infillCellRight.width / 3 - UM.Theme.sizes.default_margin.width;
|
width: (infillCellRight.width - 2 * UM.Theme.sizes.default_margin.width) / 3;
|
||||||
height: width
|
height: width
|
||||||
|
|
||||||
border.color: infillListView.activeIndex == index ? UM.Theme.colors.setting_control_text : UM.Theme.colors.setting_control_border
|
border.color: (infillListView.activeIndex == index) ? UM.Theme.colors.setting_control_selected :
|
||||||
border.width: infillListView.activeIndex == index ? 2 : 1
|
(parent.hovered ? UM.Theme.colors.setting_control_border_highlight : UM.Theme.colors.setting_control_border)
|
||||||
color: infillListView.activeIndex == index ? UM.Theme.colors.setting_category_active : "transparent"
|
border.width: UM.Theme.sizes.default_lining.width
|
||||||
|
color: infillListView.activeIndex == index ? UM.Theme.colors.setting_control_selected : "transparent"
|
||||||
|
|
||||||
Image {
|
UM.RecolorImage {
|
||||||
id: infillIcon
|
id: infillIcon
|
||||||
anchors.fill: parent;
|
anchors.fill: parent;
|
||||||
anchors.margins: UM.Theme.sizes.default_margin.width / 2
|
anchors.margins: UM.Theme.sizes.default_margin.width
|
||||||
|
|
||||||
sourceSize.width: width
|
sourceSize.width: width
|
||||||
sourceSize.height: width
|
sourceSize.height: width
|
||||||
source: UM.Theme.icons[model.icon];
|
source: UM.Theme.icons[model.icon];
|
||||||
|
color: (infillListView.activeIndex == index) ? UM.Theme.colors.text_white : UM.Theme.colors.text
|
||||||
}
|
}
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
onClicked: {
|
onClicked: {
|
||||||
infillListView.activeIndex = index
|
if (infillListView.activeIndex != index)
|
||||||
UM.MachineManager.setSettingValue("infill_sparse_density", model.percentage)
|
{
|
||||||
|
infillListView.activeIndex = index
|
||||||
|
UM.MachineManager.setSettingValue("infill_sparse_density", model.percentage)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
cursorShape: (infillListView.activeIndex != index) ? Qt.PointingHandCursor : Qt.ArrowCursor
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Label{
|
Label{
|
||||||
|
@ -13,7 +13,7 @@ QtObject {
|
|||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
color: UM.Theme.colors.setting_control
|
color: UM.Theme.colors.setting_control
|
||||||
border.width: 1
|
border.width: 1
|
||||||
border.color: UM.Theme.colors.setting_control_border
|
border.color: control.hovered ? UM.Theme.colors.setting_control_border_highlight : UM.Theme.colors.setting_control_border
|
||||||
UM.RecolorImage {
|
UM.RecolorImage {
|
||||||
id: downArrow
|
id: downArrow
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
@ -100,19 +100,20 @@
|
|||||||
"action_button_disabled_text": [127, 127, 127, 255],
|
"action_button_disabled_text": [127, 127, 127, 255],
|
||||||
"action_button_disabled_border": [127, 127, 127, 255],
|
"action_button_disabled_border": [127, 127, 127, 255],
|
||||||
|
|
||||||
"scrollbar_background": [245, 245, 245, 255],
|
"scrollbar_background": [255, 255, 255, 255],
|
||||||
"scrollbar_handle": [12, 159, 227, 255],
|
"scrollbar_handle": [24, 41, 77, 255],
|
||||||
"scrollbar_handle_hover": [174, 174, 174, 255],
|
"scrollbar_handle_hover": [12, 159, 227, 255],
|
||||||
"scrollbar_handle_down": [12, 159, 227, 255],
|
"scrollbar_handle_down": [12, 159, 227, 255],
|
||||||
|
|
||||||
"setting_category": [255, 255, 255, 255],
|
"setting_category": [255, 255, 255, 255],
|
||||||
"setting_category_disabled": [255, 255, 255, 255],
|
"setting_category_disabled": [255, 255, 255, 255],
|
||||||
"setting_category_hover": [245, 245, 245, 255],
|
"setting_category_hover": [245, 245, 245, 255],
|
||||||
"setting_category_active": [240, 248, 255, 255],
|
"setting_category_active": [255, 255, 255, 255],
|
||||||
"setting_category_active_hover": [233, 244, 245, 255],
|
"setting_category_active_hover": [245, 245, 245, 255],
|
||||||
"setting_category_text": [24, 41, 77, 255],
|
"setting_category_text": [24, 41, 77, 255],
|
||||||
|
|
||||||
"setting_control": [255, 255, 255, 255],
|
"setting_control": [255, 255, 255, 255],
|
||||||
|
"setting_control_selected": [24, 41, 77, 255],
|
||||||
"setting_control_highlight": [255, 255, 255, 0],
|
"setting_control_highlight": [255, 255, 255, 0],
|
||||||
"setting_control_border": [127, 127, 127, 255],
|
"setting_control_border": [127, 127, 127, 255],
|
||||||
"setting_control_border_highlight": [12, 169, 227, 255],
|
"setting_control_border_highlight": [12, 169, 227, 255],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user