mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-09 23:05:01 -06:00
Style categories for advanced mode
This commit is contained in:
parent
411a2f2d7d
commit
0ce3ff174a
2 changed files with 39 additions and 2 deletions
|
@ -9,6 +9,12 @@ UM.SettingsView {
|
|||
id: settingsView;
|
||||
|
||||
onShowDescription: base.showDescription(text, x, y);
|
||||
|
||||
categoryStyle: UM.Theme.styles.category;
|
||||
|
||||
spacing: UM.Theme.sizes.default_margin.height;
|
||||
|
||||
style: ScrollViewStyle { }
|
||||
}
|
||||
//
|
||||
// Rectangle {
|
||||
|
|
|
@ -5,11 +5,17 @@ import QtQuick.Layouts 1.1
|
|||
|
||||
import UM 1.0 as UM
|
||||
|
||||
Rectangle {
|
||||
UM.AngledCornerRectangle {
|
||||
id: base;
|
||||
|
||||
Layout.preferredHeight: UM.Theme.sizes.section.height;
|
||||
Layout.preferredWidth: UM.Theme.sizes.section.width;
|
||||
|
||||
color: UM.Theme.colors.primary;
|
||||
property bool clickable: false;
|
||||
signal clicked();
|
||||
|
||||
color: clickable ? UM.Theme.colors.button : UM.Theme.colors.primary;
|
||||
cornerSize: UM.Theme.sizes.default_margin.width;
|
||||
|
||||
property alias icon: iconImage.source;
|
||||
property alias text: label.text;
|
||||
|
@ -43,4 +49,29 @@ Rectangle {
|
|||
font: UM.Theme.fonts.large;
|
||||
color: UM.Theme.colors.primary_text;
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
id: mouse;
|
||||
anchors.fill: parent;
|
||||
|
||||
enabled: base.clickable;
|
||||
hoverEnabled: true;
|
||||
|
||||
onClicked: {console.log('click'); base.clicked(); }
|
||||
}
|
||||
|
||||
states: [
|
||||
State {
|
||||
name: "hover";
|
||||
when: mouse.containsMouse;
|
||||
|
||||
PropertyChanges { target: base; color: UM.Theme.colors.button_hover; }
|
||||
},
|
||||
State {
|
||||
name: "down";
|
||||
when: mouse.pressed;
|
||||
|
||||
PropertyChanges { target: base; color: UM.Theme.colors.button_down; }
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue