|
@@ -372,233 +372,4 @@ QtObject
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
- property Component print_setup_action_button: Component
|
|
|
- {
|
|
|
- ButtonStyle
|
|
|
- {
|
|
|
- background: Rectangle
|
|
|
- {
|
|
|
- border.width: UM.Theme.getSize("default_lining").width
|
|
|
- border.color:
|
|
|
- {
|
|
|
- if(!control.enabled)
|
|
|
- {
|
|
|
- return UM.Theme.getColor("action_button_disabled_border");
|
|
|
- }
|
|
|
- else if(control.pressed)
|
|
|
- {
|
|
|
- return UM.Theme.getColor("action_button_active_border");
|
|
|
- }
|
|
|
- else if(control.hovered)
|
|
|
- {
|
|
|
- return UM.Theme.getColor("action_button_hovered_border");
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- return UM.Theme.getColor("action_button_border");
|
|
|
- }
|
|
|
- }
|
|
|
- color:
|
|
|
- {
|
|
|
- if(!control.enabled)
|
|
|
- {
|
|
|
- return UM.Theme.getColor("action_button_disabled");
|
|
|
- }
|
|
|
- else if(control.pressed)
|
|
|
- {
|
|
|
- return UM.Theme.getColor("action_button_active");
|
|
|
- }
|
|
|
- else if(control.hovered)
|
|
|
- {
|
|
|
- return UM.Theme.getColor("action_button_hovered");
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- return UM.Theme.getColor("action_button");
|
|
|
- }
|
|
|
- }
|
|
|
- Behavior on color { ColorAnimation { duration: 50 } }
|
|
|
-
|
|
|
- implicitWidth: actualLabel.contentWidth + (UM.Theme.getSize("thick_margin").width * 2)
|
|
|
-
|
|
|
- Label
|
|
|
- {
|
|
|
- id: actualLabel
|
|
|
- anchors.centerIn: parent
|
|
|
- color:
|
|
|
- {
|
|
|
- if(!control.enabled)
|
|
|
- {
|
|
|
- return UM.Theme.getColor("action_button_disabled_text");
|
|
|
- }
|
|
|
- else if(control.pressed)
|
|
|
- {
|
|
|
- return UM.Theme.getColor("action_button_active_text");
|
|
|
- }
|
|
|
- else if(control.hovered)
|
|
|
- {
|
|
|
- return UM.Theme.getColor("action_button_hovered_text");
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- return UM.Theme.getColor("action_button_text");
|
|
|
- }
|
|
|
- }
|
|
|
- font: UM.Theme.getFont("medium")
|
|
|
- text: control.text
|
|
|
- }
|
|
|
- }
|
|
|
- label: Item { }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- property Component monitor_button_style: Component
|
|
|
- {
|
|
|
- ButtonStyle
|
|
|
- {
|
|
|
- background: Rectangle
|
|
|
- {
|
|
|
- border.width: UM.Theme.getSize("default_lining").width
|
|
|
- border.color:
|
|
|
- {
|
|
|
- if(!control.enabled)
|
|
|
- {
|
|
|
- return UM.Theme.getColor("action_button_disabled_border");
|
|
|
- }
|
|
|
- else if(control.pressed)
|
|
|
- {
|
|
|
- return UM.Theme.getColor("action_button_active_border");
|
|
|
- }
|
|
|
- else if(control.hovered)
|
|
|
- {
|
|
|
- return UM.Theme.getColor("action_button_hovered_border");
|
|
|
- }
|
|
|
- return UM.Theme.getColor("action_button_border");
|
|
|
- }
|
|
|
- color:
|
|
|
- {
|
|
|
- if(!control.enabled)
|
|
|
- {
|
|
|
- return UM.Theme.getColor("action_button_disabled");
|
|
|
- }
|
|
|
- else if(control.pressed)
|
|
|
- {
|
|
|
- return UM.Theme.getColor("action_button_active");
|
|
|
- }
|
|
|
- else if(control.hovered)
|
|
|
- {
|
|
|
- return UM.Theme.getColor("action_button_hovered");
|
|
|
- }
|
|
|
- return UM.Theme.getColor("action_button");
|
|
|
- }
|
|
|
- Behavior on color
|
|
|
- {
|
|
|
- ColorAnimation
|
|
|
- {
|
|
|
- duration: 50
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- label: Item
|
|
|
- {
|
|
|
- UM.RecolorImage
|
|
|
- {
|
|
|
- anchors.verticalCenter: parent.verticalCenter
|
|
|
- anchors.horizontalCenter: parent.horizontalCenter
|
|
|
- width: Math.floor(control.width / 2)
|
|
|
- height: Math.floor(control.height / 2)
|
|
|
- sourceSize.height: width
|
|
|
- color:
|
|
|
- {
|
|
|
- if(!control.enabled)
|
|
|
- {
|
|
|
- return UM.Theme.getColor("action_button_disabled_text");
|
|
|
- }
|
|
|
- else if(control.pressed)
|
|
|
- {
|
|
|
- return UM.Theme.getColor("action_button_active_text");
|
|
|
- }
|
|
|
- else if(control.hovered)
|
|
|
- {
|
|
|
- return UM.Theme.getColor("action_button_hovered_text");
|
|
|
- }
|
|
|
- return UM.Theme.getColor("action_button_text");
|
|
|
- }
|
|
|
- source: control.iconSource
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- property Component monitor_checkable_button_style: Component
|
|
|
- {
|
|
|
- ButtonStyle {
|
|
|
- background: Rectangle {
|
|
|
- border.width: control.checked ? UM.Theme.getSize("default_lining").width * 2 : UM.Theme.getSize("default_lining").width
|
|
|
- border.color:
|
|
|
- {
|
|
|
- if(!control.enabled)
|
|
|
- {
|
|
|
- return UM.Theme.getColor("action_button_disabled_border");
|
|
|
- }
|
|
|
- else if (control.checked || control.pressed)
|
|
|
- {
|
|
|
- return UM.Theme.getColor("action_button_active_border");
|
|
|
- }
|
|
|
- else if(control.hovered)
|
|
|
- {
|
|
|
- return UM.Theme.getColor("action_button_hovered_border");
|
|
|
- }
|
|
|
- return UM.Theme.getColor("action_button_border");
|
|
|
- }
|
|
|
- color:
|
|
|
- {
|
|
|
- if(!control.enabled)
|
|
|
- {
|
|
|
- return UM.Theme.getColor("action_button_disabled");
|
|
|
- }
|
|
|
- else if (control.checked || control.pressed)
|
|
|
- {
|
|
|
- return UM.Theme.getColor("action_button_active");
|
|
|
- }
|
|
|
- else if (control.hovered)
|
|
|
- {
|
|
|
- return UM.Theme.getColor("action_button_hovered");
|
|
|
- }
|
|
|
- return UM.Theme.getColor("action_button");
|
|
|
- }
|
|
|
- Behavior on color { ColorAnimation { duration: 50; } }
|
|
|
- Label {
|
|
|
- anchors.left: parent.left
|
|
|
- anchors.right: parent.right
|
|
|
- anchors.verticalCenter: parent.verticalCenter
|
|
|
- anchors.leftMargin: UM.Theme.getSize("default_lining").width * 2
|
|
|
- anchors.rightMargin: UM.Theme.getSize("default_lining").width * 2
|
|
|
- color:
|
|
|
- {
|
|
|
- if(!control.enabled)
|
|
|
- {
|
|
|
- return UM.Theme.getColor("action_button_disabled_text");
|
|
|
- }
|
|
|
- else if (control.checked || control.pressed)
|
|
|
- {
|
|
|
- return UM.Theme.getColor("action_button_active_text");
|
|
|
- }
|
|
|
- else if (control.hovered)
|
|
|
- {
|
|
|
- return UM.Theme.getColor("action_button_hovered_text");
|
|
|
- }
|
|
|
- return UM.Theme.getColor("action_button_text");
|
|
|
- }
|
|
|
- font: UM.Theme.getFont("default")
|
|
|
- text: control.text
|
|
|
- horizontalAlignment: Text.AlignHCenter
|
|
|
- elide: Text.ElideMiddle
|
|
|
- }
|
|
|
- }
|
|
|
- label: Item { }
|
|
|
- }
|
|
|
- }
|
|
|
}
|