Commit 8eecc27c authored by Devin Lin's avatar Devin Lin 🎨
Browse files

Tweak delegate padding and color choice

parent 0308d1fd
...@@ -32,21 +32,31 @@ ColumnLayout { ...@@ -32,21 +32,31 @@ ColumnLayout {
signal panelClosed signal panelClosed
Rectangle { Rectangle {
Layout.preferredWidth: units.iconSizes.large + units.smallSpacing * 2 Layout.preferredWidth: units.iconSizes.large + units.smallSpacing
Layout.minimumHeight: width Layout.minimumHeight: width
Layout.alignment: Qt.AlignHCenter Layout.alignment: Qt.AlignHCenter
radius: units.smallSpacing radius: units.smallSpacing
border.color: Qt.rgba(PlasmaCore.ColorScope.textColor.r, PlasmaCore.ColorScope.textColor.g, PlasmaCore.ColorScope.textColor.b, 0.2) border.color: toggled ?
color: toggled ? Qt.darker(Qt.rgba(PlasmaCore.ColorScope.highlightColor.r, PlasmaCore.ColorScope.highlightColor.g, PlasmaCore.ColorScope.highlightColor.b, 1), 1.25) :
Qt.rgba(PlasmaCore.ColorScope.highlightColor.r, PlasmaCore.ColorScope.highlightColor.g, PlasmaCore.ColorScope.highlightColor.b, iconMouseArea.pressed ? 0.5 : 0.3) : Qt.rgba(PlasmaCore.ColorScope.textColor.r, PlasmaCore.ColorScope.textColor.g, PlasmaCore.ColorScope.textColor.b, 0.2)
Qt.rgba(PlasmaCore.ColorScope.textColor.r, PlasmaCore.ColorScope.textColor.g, PlasmaCore.ColorScope.textColor.b, iconMouseArea.pressed ? 0.5 : 0.1) color: {
if (toggled) {
return Qt.rgba(PlasmaCore.ColorScope.highlightColor.r, PlasmaCore.ColorScope.highlightColor.g, PlasmaCore.ColorScope.highlightColor.b, iconMouseArea.pressed ? 0.5 : 0.3);
} else {
if (iconMouseArea.pressed) {
return Qt.darker(Qt.rgba(PlasmaCore.ColorScope.backgroundColor.r, PlasmaCore.ColorScope.backgroundColor.g, PlasmaCore.ColorScope.backgroundColor.b, 0.9), 1.25);
} else {
return Qt.rgba(PlasmaCore.ColorScope.backgroundColor.r, PlasmaCore.ColorScope.backgroundColor.g, PlasmaCore.ColorScope.backgroundColor.b, 0.3);
}
}
}
PlasmaCore.IconItem { PlasmaCore.IconItem {
id: icon id: icon
colorGroup: PlasmaCore.ColorScope.colorGroup colorGroup: PlasmaCore.ColorScope.colorGroup
anchors { anchors {
fill: parent fill: parent
margins: units.smallSpacing * 2 margins: units.smallSpacing
} }
source: model.icon source: model.icon
MouseArea { MouseArea {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment