mirror of
https://github.com/tuxdotrs/tpanel.git
synced 2026-09-19 18:19:02 +05:30
style: format qml files
This commit is contained in:
@@ -5,42 +5,42 @@ import QtQuick.Controls
|
||||
import qs.config
|
||||
|
||||
Button {
|
||||
id: root
|
||||
id: root
|
||||
|
||||
property string label: ""
|
||||
property url iconSource: ""
|
||||
property bool iconOnly: false
|
||||
property bool hoverHighlight: true
|
||||
property bool pointerCursor: true
|
||||
property string label: ""
|
||||
property url iconSource: ""
|
||||
property bool iconOnly: false
|
||||
property bool hoverHighlight: true
|
||||
property bool pointerCursor: true
|
||||
|
||||
padding: Appearance.padding
|
||||
display: iconOnly ? AbstractButton.IconOnly : AbstractButton.TextBesideIcon
|
||||
padding: Appearance.padding
|
||||
display: iconOnly ? AbstractButton.IconOnly : AbstractButton.TextBesideIcon
|
||||
|
||||
text: label
|
||||
font.family: Appearance.font.family
|
||||
font.pointSize: Appearance.font.pointSize
|
||||
palette.buttonText: Appearance.colors.foreground
|
||||
icon.color: Appearance.colors.foreground
|
||||
icon.source: iconSource
|
||||
text: label
|
||||
font.family: Appearance.font.family
|
||||
font.pointSize: Appearance.font.pointSize
|
||||
palette.buttonText: Appearance.colors.foreground
|
||||
icon.color: Appearance.colors.foreground
|
||||
icon.source: iconSource
|
||||
|
||||
HoverHandler {
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
enabled: root.pointerCursor
|
||||
}
|
||||
|
||||
background: Rectangle {
|
||||
anchors.fill: parent
|
||||
radius: Appearance.radius
|
||||
color: {
|
||||
if (!root.hoverHighlight)
|
||||
return Appearance.colors.inActive;
|
||||
return root.hovered ? Appearance.colors.inActive : Appearance.colors.background;
|
||||
HoverHandler {
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
enabled: root.pointerCursor
|
||||
}
|
||||
|
||||
Behavior on color {
|
||||
ColorAnimation {
|
||||
duration: Appearance.duration
|
||||
}
|
||||
background: Rectangle {
|
||||
anchors.fill: parent
|
||||
radius: Appearance.radius
|
||||
color: {
|
||||
if (!root.hoverHighlight)
|
||||
return Appearance.colors.inActive;
|
||||
return root.hovered ? Appearance.colors.inActive : Appearance.colors.background;
|
||||
}
|
||||
|
||||
Behavior on color {
|
||||
ColorAnimation {
|
||||
duration: Appearance.duration
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user