Browse Source

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
Tamara Hogenhout 9 years ago
parent
commit
ac95858e4b
1 changed files with 11 additions and 14 deletions
  1. 11 14
      resources/themes/cura/styles.qml

+ 11 - 14
resources/themes/cura/styles.qml

@@ -90,34 +90,32 @@ QtObject {
     property Component tool_button: Component {
         ButtonStyle {
             background: Item {
+                ///////////TODO CHANGE SIZES!!
                 implicitWidth: UM.Theme.sizes.button.width;
                 implicitHeight: UM.Theme.sizes.button.height;
 
                 Rectangle {
-                    anchors.bottom: parent.verticalCenter;
+                    id: tool_button_background
+                    anchors.top: parent.verticalCenter;
 
                     width: parent.width;
+                    ///////////TODO CHANGE LABELHEIGHT!!
                     height: control.hovered ? parent.height / 2 + label.height : 0;
                     Behavior on height { NumberAnimation { duration: 100; } }
 
                     opacity: control.hovered ? 1.0 : 0.0;
                     Behavior on opacity { NumberAnimation { duration: 100; } }
 
-                    Rectangle {
-                        anchors.horizontalCenter: parent.horizontalCenter;
-                        width: childrenRect.width;
-                        height: childrenRect.height;
-
-                        Label {
-                            id: label
-                            text: control.text.replace("&", "");
-                            font: UM.Theme.fonts.button_tooltip;
-                            color: UM.Theme.colors.button_tooltip_text;
-                        }
+                    Label {
+                        id: label
+                        anchors.bottom: parent.bottom
+                        text: control.text.replace("&", "");
+                        font: UM.Theme.fonts.button_tooltip;
+                        color: UM.Theme.colors.button_tooltip_text;
                     }
                 }
 
-                UM.AngledCornerRectangle {
+                Rectangle {
                     id: buttonFace;
 
                     anchors.fill: parent;
@@ -138,7 +136,6 @@ QtObject {
                         }
                     }
                     Behavior on color { ColorAnimation { duration: 50; } }
-                    cornerSize: UM.Theme.sizes.default_margin.width;
 
                     Label {
                         anchors.right: parent.right;