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