mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-20 14:39:10 +08:00
Style categories for advanced mode
This commit is contained in:
parent
411a2f2d7d
commit
0ce3ff174a
@ -9,6 +9,12 @@ UM.SettingsView {
|
|||||||
id: settingsView;
|
id: settingsView;
|
||||||
|
|
||||||
onShowDescription: base.showDescription(text, x, y);
|
onShowDescription: base.showDescription(text, x, y);
|
||||||
|
|
||||||
|
categoryStyle: UM.Theme.styles.category;
|
||||||
|
|
||||||
|
spacing: UM.Theme.sizes.default_margin.height;
|
||||||
|
|
||||||
|
style: ScrollViewStyle { }
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
// Rectangle {
|
// Rectangle {
|
||||||
|
@ -5,11 +5,17 @@ import QtQuick.Layouts 1.1
|
|||||||
|
|
||||||
import UM 1.0 as UM
|
import UM 1.0 as UM
|
||||||
|
|
||||||
Rectangle {
|
UM.AngledCornerRectangle {
|
||||||
|
id: base;
|
||||||
|
|
||||||
Layout.preferredHeight: UM.Theme.sizes.section.height;
|
Layout.preferredHeight: UM.Theme.sizes.section.height;
|
||||||
Layout.preferredWidth: UM.Theme.sizes.section.width;
|
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 icon: iconImage.source;
|
||||||
property alias text: label.text;
|
property alias text: label.text;
|
||||||
@ -43,4 +49,29 @@ Rectangle {
|
|||||||
font: UM.Theme.fonts.large;
|
font: UM.Theme.fonts.large;
|
||||||
color: UM.Theme.colors.primary_text;
|
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…
x
Reference in New Issue
Block a user