mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-04-03 20:32:07 -04:00
widgets: add a button color setting
This commit is contained in:
@@ -89,7 +89,7 @@ Flow {
|
||||
width: Math.max(contentItem.implicitWidth + root.buttonPadding * 2, root.minButtonWidth) + (selected ? 4 : 0)
|
||||
height: root.buttonHeight
|
||||
|
||||
color: selected ? Theme.primary : Theme.surfaceVariant
|
||||
color: selected ? Theme.buttonBg : Theme.surfaceVariant
|
||||
border.color: "transparent"
|
||||
border.width: 0
|
||||
|
||||
@@ -155,9 +155,9 @@ Flow {
|
||||
bottomRightRadius: parent.bottomRightRadius
|
||||
color: {
|
||||
if (pressed)
|
||||
return selected ? Theme.primaryPressed : Theme.surfaceTextHover;
|
||||
return selected ? Theme.buttonPressed : Theme.surfaceTextHover;
|
||||
if (hovered)
|
||||
return selected ? Theme.primaryHover : Theme.surfaceTextHover;
|
||||
return selected ? Theme.buttonHover : Theme.surfaceTextHover;
|
||||
return "transparent";
|
||||
}
|
||||
|
||||
@@ -183,7 +183,7 @@ Flow {
|
||||
id: checkIcon
|
||||
name: "check"
|
||||
size: root.checkIconSize
|
||||
color: segment.selected ? Theme.primaryText : Theme.surfaceVariantText
|
||||
color: segment.selected ? Theme.buttonText : Theme.surfaceVariantText
|
||||
visible: root.checkEnabled && segment.selected
|
||||
opacity: segment.selected ? 1 : 0
|
||||
scale: segment.selected ? 1 : 0.6
|
||||
@@ -211,7 +211,7 @@ Flow {
|
||||
text: typeof modelData === "string" ? modelData : modelData.text || ""
|
||||
font.pixelSize: root.textSize
|
||||
font.weight: segment.selected ? Font.Medium : Font.Normal
|
||||
color: segment.selected ? Theme.primaryText : Theme.surfaceVariantText
|
||||
color: segment.selected ? Theme.buttonText : Theme.surfaceVariantText
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user