Remove margins that keep listview items from being under the scrollbar. Instead set width of listView smaller so it doesn't overlap.

Update per object setting visibility dialog to have same category design as SettingVisibilityCategory.qml and SettingCategory.qml

CURA-9005
This commit is contained in:
j.delarago 2022-03-07 13:20:05 +01:00
parent 798e86646c
commit 76d9cf6f4d
5 changed files with 12 additions and 59 deletions

View file

@ -8,58 +8,16 @@ import UM 1.5 as UM
import Cura 1.0 as Cura
import ".."
Button {
UM.CategoryButton {
id: base;
background: Rectangle {
color: UM.Theme.getColor("category_background")
}
contentItem: Row
{
spacing: UM.Theme.getSize("default_lining").width
Item //Wrapper to give space before icon with fixed width. This allows aligning checkbox with category icon.
{
height: label.height
width: height
anchors.verticalCenter: parent.verticalCenter
UM.RecolorImage
{
anchors.verticalCenter: parent.verticalCenter
height: (label.height / 2) | 0
width: height
source: base.checked ? UM.Theme.getIcon("ChevronSingleDown") : UM.Theme.getIcon("ChevronSingleRight")
color: base.hovered ? UM.Theme.getColor("primary_button_hover"): UM.Theme.getColor("text")
}
}
UM.RecolorImage
{
anchors.verticalCenter: parent.verticalCenter
height: label.height
width: height
source: UM.Theme.getIcon(definition.icon)
color: base.hovered ? UM.Theme.getColor("primary_button_hover") : UM.Theme.getColor("text")
}
UM.Label
{
id: label
anchors.verticalCenter: parent.verticalCenter
text: base.text
color: base.hovered ? UM.Theme.getColor("primary_button_hover") : UM.Theme.getColor("text")
font.bold: true
}
}
categoryIcon: definition ? UM.Theme.getIcon(definition.icon) : ""
labelText: definition ? definition.label : ""
expanded: definition ? definition.expanded : false
signal showTooltip(string text)
signal hideTooltip()
signal contextMenuRequested()
text: definition.label
checkable: true
checked: definition.expanded
onClicked: definition.expanded ? settingDefinitionsModel.collapseRecursive(definition.key) : settingDefinitionsModel.expandRecursive(definition.key)
onClicked: expanded ? settingDefinitionsModel.collapseRecursive(definition.key) : settingDefinitionsModel.expandRecursive(definition.key)
}

View file

@ -10,19 +10,12 @@ import Cura 1.0 as Cura
UM.TooltipArea
{
x: model.depth * UM.Theme.getSize("default_margin").width
x: model.depth * UM.Theme.getSize("narrow_margin").width
text: model.description
width: childrenRect.width
height: childrenRect.height
Item
{
id: spacer
// Align checkbox with PerObjectCategory icon
width: UM.Theme.getSize("default_margin").width
}
UM.CheckBox
{
id: check

View file

@ -12,6 +12,8 @@ UM.Dialog
{
id: settingPickDialog
margin: UM.Theme.getSize("default_margin").width
title: catalog.i18nc("@title:window", "Select Settings to Customize for this model")
width: UM.Theme.getSize("small_popup_dialog").width
backgroundColor: UM.Theme.getColor("background_1")