mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-14 02:07:51 -06:00
Update PerObjectCategory
to QtQuick.Controls 2.1
CURA-8684
This commit is contained in:
parent
204d965df2
commit
f2ee58a08b
1 changed files with 32 additions and 36 deletions
|
@ -1,10 +1,8 @@
|
||||||
// Copyright (c) 2015 Ultimaker B.V.
|
// Copyright (c) 2022 Ultimaker B.V.
|
||||||
// Uranium is released under the terms of the LGPLv3 or higher.
|
// Uranium is released under the terms of the LGPLv3 or higher.
|
||||||
|
|
||||||
import QtQuick 2.2
|
import QtQuick 2.2
|
||||||
import QtQuick.Controls 1.1
|
import QtQuick.Controls 2.1
|
||||||
import QtQuick.Controls.Styles 1.1
|
|
||||||
import QtQuick.Layouts 1.1
|
|
||||||
|
|
||||||
import UM 1.1 as UM
|
import UM 1.1 as UM
|
||||||
|
|
||||||
|
@ -13,9 +11,9 @@ import ".."
|
||||||
Button {
|
Button {
|
||||||
id: base;
|
id: base;
|
||||||
|
|
||||||
style: ButtonStyle {
|
|
||||||
background: Item { }
|
background: Item { }
|
||||||
label: Row
|
|
||||||
|
contentItem: Row
|
||||||
{
|
{
|
||||||
spacing: UM.Theme.getSize("default_lining").width
|
spacing: UM.Theme.getSize("default_lining").width
|
||||||
|
|
||||||
|
@ -24,36 +22,34 @@ Button {
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
height: (label.height / 2) | 0
|
height: (label.height / 2) | 0
|
||||||
width: height
|
width: height
|
||||||
source: control.checked ? UM.Theme.getIcon("ChevronSingleDown") : UM.Theme.getIcon("ChevronSingleRight");
|
source: base.checked ? UM.Theme.getIcon("ChevronSingleDown") : UM.Theme.getIcon("ChevronSingleRight");
|
||||||
color: control.hovered ? palette.highlight : palette.buttonText
|
color: base.hovered ? palette.highlight : palette.buttonText
|
||||||
}
|
}
|
||||||
UM.RecolorImage
|
UM.RecolorImage
|
||||||
{
|
{
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
height: label.height
|
height: label.height
|
||||||
width: height
|
width: height
|
||||||
source: control.iconSource
|
source: UM.Theme.getIcon(definition.icon)
|
||||||
color: control.hovered ? palette.highlight : palette.buttonText
|
color: base.hovered ? palette.highlight : palette.buttonText
|
||||||
}
|
}
|
||||||
Label
|
Label
|
||||||
{
|
{
|
||||||
id: label
|
id: label
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
text: control.text
|
text: base.text
|
||||||
color: control.hovered ? palette.highlight : palette.buttonText
|
color: base.hovered ? palette.highlight : palette.buttonText
|
||||||
font.bold: true
|
font.bold: true
|
||||||
}
|
}
|
||||||
|
|
||||||
SystemPalette { id: palette }
|
SystemPalette { id: palette }
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
signal showTooltip(string text);
|
signal showTooltip(string text);
|
||||||
signal hideTooltip();
|
signal hideTooltip();
|
||||||
signal contextMenuRequested()
|
signal contextMenuRequested()
|
||||||
|
|
||||||
text: definition.label
|
text: definition.label
|
||||||
iconSource: UM.Theme.getIcon(definition.icon)
|
|
||||||
|
|
||||||
checkable: true
|
checkable: true
|
||||||
checked: definition.expanded
|
checked: definition.expanded
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue