adjust fab icon size and region selector fab color

This commit is contained in:
end-4
2025-10-25 10:02:36 +02:00
parent 43fe3874dd
commit 5dd0fe2761
3 changed files with 11 additions and 11 deletions
@@ -18,7 +18,8 @@ RippleButton {
colBackground: Appearance.colors.colPrimaryContainer colBackground: Appearance.colors.colPrimaryContainer
colBackgroundHover: Appearance.colors.colPrimaryContainerHover colBackgroundHover: Appearance.colors.colPrimaryContainerHover
colRipple: Appearance.colors.colPrimaryContainerActive colRipple: Appearance.colors.colPrimaryContainerActive
contentItem: RowLayout { property color colOnBackground: Appearance.colors.colOnPrimaryContainer
contentItem: Row {
id: contentRowLayout id: contentRowLayout
property real horizontalMargins: (root.baseSize - icon.width) / 2 property real horizontalMargins: (root.baseSize - icon.width) / 2
anchors { anchors {
@@ -30,13 +31,16 @@ RippleButton {
MaterialSymbol { MaterialSymbol {
id: icon id: icon
Layout.fillWidth: true anchors.verticalCenter: parent.verticalCenter
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
iconSize: 24 verticalAlignment: Text.AlignVCenter
color: Appearance.colors.colOnPrimaryContainer iconSize: 26
color: root.colOnBackground
text: root.iconText text: root.iconText
} }
Loader { Loader {
anchors.verticalCenter: parent.verticalCenter
visible: root.buttonText?.length > 0
active: true active: true
sourceComponent: Revealer { sourceComponent: Revealer {
visible: root.expanded || implicitWidth > 0 visible: root.expanded || implicitWidth > 0
@@ -47,6 +51,7 @@ RippleButton {
anchors { anchors {
left: parent.left left: parent.left
leftMargin: root.elementSpacing leftMargin: root.elementSpacing
verticalCenter: parent.verticalCenter
} }
text: root.buttonText text: root.buttonText
color: Appearance.colors.colOnPrimaryContainer color: Appearance.colors.colOnPrimaryContainer
@@ -469,6 +469,7 @@ PanelWindow {
colBackground: Appearance.colors.colTertiaryContainer colBackground: Appearance.colors.colTertiaryContainer
colBackgroundHover: Appearance.colors.colTertiaryContainerHover colBackgroundHover: Appearance.colors.colTertiaryContainerHover
colRipple: Appearance.colors.colTertiaryContainerActive colRipple: Appearance.colors.colTertiaryContainerActive
colOnBackground: Appearance.colors.colOnTertiaryContainer
} }
} }
} }
@@ -163,13 +163,7 @@ Item {
anchors.bottomMargin: root.fabMargins anchors.bottomMargin: root.fabMargins
onClicked: root.showAddDialog = true onClicked: root.showAddDialog = true
iconText: "add"
contentItem: MaterialSymbol {
text: "add"
horizontalAlignment: Text.AlignHCenter
iconSize: Appearance.font.pixelSize.huge
color: Appearance.m3colors.m3onPrimaryContainer
}
} }
Item { Item {