settings: more icons

This commit is contained in:
end-4
2025-09-01 22:19:16 +02:00
parent cdc38f7e6e
commit 9f69b8815a
19 changed files with 522 additions and 240 deletions
@@ -1,3 +1,4 @@
import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
import Quickshell
@@ -12,13 +13,37 @@ GroupButton {
horizontalPadding: 12
verticalPadding: 8
bounce: false
property string buttonIcon
property bool leftmost: false
property bool rightmost: false
leftRadius: (toggled || leftmost) ? (height / 2) : Appearance.rounding.unsharpenmore
rightRadius: (toggled || rightmost) ? (height / 2) : Appearance.rounding.unsharpenmore
colBackground: Appearance.colors.colSecondaryContainer
contentItem: StyledText {
color: parent.toggled ? Appearance.colors.colOnPrimary : Appearance.colors.colOnSecondaryContainer
text: root.buttonText
colBackgroundHover: Appearance.colors.colSecondaryContainerHover
colBackgroundActive: Appearance.colors.colSecondaryContainerActive
contentItem: RowLayout {
spacing: 4
Loader {
Layout.alignment: Qt.AlignVCenter
active: root.buttonIcon && root.buttonIcon.length > 0
visible: active
sourceComponent: Item {
implicitWidth: materialSymbol.implicitWidth
MaterialSymbol {
id: materialSymbol
anchors.centerIn: parent
text: root.buttonIcon
iconSize: Appearance.font.pixelSize.larger
color: root.toggled ? Appearance.colors.colOnPrimary : Appearance.colors.colOnSecondaryContainer
}
}
}
StyledText {
color: root.toggled ? Appearance.colors.colOnPrimary : Appearance.colors.colOnSecondaryContainer
text: root.buttonText
}
}
}