mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-05-12 19:38:03 +08:00
15.10 Restyling buttons in the contentArea
Still have to change the buttonsizes, but I don't have the final designs/sizes yet. Contributes to: issue CURA-60
This commit is contained in:
parent
efbae53e6e
commit
ac95858e4b
@ -90,34 +90,32 @@ QtObject {
|
|||||||
property Component tool_button: Component {
|
property Component tool_button: Component {
|
||||||
ButtonStyle {
|
ButtonStyle {
|
||||||
background: Item {
|
background: Item {
|
||||||
|
///////////TODO CHANGE SIZES!!
|
||||||
implicitWidth: UM.Theme.sizes.button.width;
|
implicitWidth: UM.Theme.sizes.button.width;
|
||||||
implicitHeight: UM.Theme.sizes.button.height;
|
implicitHeight: UM.Theme.sizes.button.height;
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
anchors.bottom: parent.verticalCenter;
|
id: tool_button_background
|
||||||
|
anchors.top: parent.verticalCenter;
|
||||||
|
|
||||||
width: parent.width;
|
width: parent.width;
|
||||||
|
///////////TODO CHANGE LABELHEIGHT!!
|
||||||
height: control.hovered ? parent.height / 2 + label.height : 0;
|
height: control.hovered ? parent.height / 2 + label.height : 0;
|
||||||
Behavior on height { NumberAnimation { duration: 100; } }
|
Behavior on height { NumberAnimation { duration: 100; } }
|
||||||
|
|
||||||
opacity: control.hovered ? 1.0 : 0.0;
|
opacity: control.hovered ? 1.0 : 0.0;
|
||||||
Behavior on opacity { NumberAnimation { duration: 100; } }
|
Behavior on opacity { NumberAnimation { duration: 100; } }
|
||||||
|
|
||||||
Rectangle {
|
Label {
|
||||||
anchors.horizontalCenter: parent.horizontalCenter;
|
id: label
|
||||||
width: childrenRect.width;
|
anchors.bottom: parent.bottom
|
||||||
height: childrenRect.height;
|
text: control.text.replace("&", "");
|
||||||
|
font: UM.Theme.fonts.button_tooltip;
|
||||||
Label {
|
color: UM.Theme.colors.button_tooltip_text;
|
||||||
id: label
|
|
||||||
text: control.text.replace("&", "");
|
|
||||||
font: UM.Theme.fonts.button_tooltip;
|
|
||||||
color: UM.Theme.colors.button_tooltip_text;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
UM.AngledCornerRectangle {
|
Rectangle {
|
||||||
id: buttonFace;
|
id: buttonFace;
|
||||||
|
|
||||||
anchors.fill: parent;
|
anchors.fill: parent;
|
||||||
@ -138,7 +136,6 @@ QtObject {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
Behavior on color { ColorAnimation { duration: 50; } }
|
Behavior on color { ColorAnimation { duration: 50; } }
|
||||||
cornerSize: UM.Theme.sizes.default_margin.width;
|
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
anchors.right: parent.right;
|
anchors.right: parent.right;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user