mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-30 00:12:50 -05:00
Tweak colors a bit
This commit is contained in:
@@ -86,7 +86,7 @@ Rectangle {
|
|||||||
width: parent.width - Theme.spacingS * 2
|
width: parent.width - Theme.spacingS * 2
|
||||||
height: 44
|
height: 44
|
||||||
radius: Theme.cornerRadius
|
radius: Theme.cornerRadius
|
||||||
color: isActive ? Theme.primaryContainer : tabMouseArea.containsMouse ? Theme.surfaceHover : Theme.withAlpha(Theme.primaryContainer, 0)
|
color: isActive ? Theme.primary : tabMouseArea.containsMouse ? Theme.surfaceHover : "transparent"
|
||||||
|
|
||||||
Row {
|
Row {
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
@@ -97,14 +97,14 @@ Rectangle {
|
|||||||
DankIcon {
|
DankIcon {
|
||||||
name: modelData.icon || ""
|
name: modelData.icon || ""
|
||||||
size: Theme.iconSize - 2
|
size: Theme.iconSize - 2
|
||||||
color: parent.parent.isActive ? Theme.surfaceText : Theme.surfaceText
|
color: parent.parent.isActive ? Theme.primaryText : Theme.surfaceText
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
}
|
}
|
||||||
|
|
||||||
StyledText {
|
StyledText {
|
||||||
text: modelData.text || ""
|
text: modelData.text || ""
|
||||||
font.pixelSize: Theme.fontSizeMedium
|
font.pixelSize: Theme.fontSizeMedium
|
||||||
color: parent.parent.isActive ? Theme.surfaceText : Theme.surfaceText
|
color: parent.parent.isActive ? Theme.primaryText : Theme.surfaceText
|
||||||
font.weight: parent.parent.isActive ? Font.Medium : Font.Normal
|
font.weight: parent.parent.isActive ? Font.Medium : Font.Normal
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ Rectangle {
|
|||||||
DankIcon {
|
DankIcon {
|
||||||
name: root.iconName
|
name: root.iconName
|
||||||
size: Theme.iconSize
|
size: Theme.iconSize
|
||||||
color: isActive ? Theme.primaryContainer : Theme.primary
|
color: isActive ? Theme.primaryText : Theme.primary
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -77,7 +77,7 @@ Rectangle {
|
|||||||
width: parent.width
|
width: parent.width
|
||||||
text: root.text
|
text: root.text
|
||||||
style: Typography.Style.Body
|
style: Typography.Style.Body
|
||||||
color: isActive ? Theme.primaryContainer : Theme.surfaceText
|
color: isActive ? Theme.primaryText : Theme.surfaceText
|
||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
wrapMode: Text.NoWrap
|
wrapMode: Text.NoWrap
|
||||||
}
|
}
|
||||||
@@ -86,7 +86,7 @@ Rectangle {
|
|||||||
width: parent.width
|
width: parent.width
|
||||||
text: root.secondaryText
|
text: root.secondaryText
|
||||||
style: Typography.Style.Caption
|
style: Typography.Style.Caption
|
||||||
color: isActive ? Theme.primaryContainer : Theme.surfaceVariantText
|
color: isActive ? Theme.primaryText : Theme.surfaceVariantText
|
||||||
visible: text.length > 0
|
visible: text.length > 0
|
||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
wrapMode: Text.NoWrap
|
wrapMode: Text.NoWrap
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ Row {
|
|||||||
text: modelData.toString()
|
text: modelData.toString()
|
||||||
font.pixelSize: 8
|
font.pixelSize: 8
|
||||||
font.weight: Font.Medium
|
font.weight: Font.Medium
|
||||||
color: modelData === root.currentSize ? Theme.primaryContainer : Theme.surfaceText
|
color: modelData === root.currentSize ? Theme.primaryText : Theme.surfaceText
|
||||||
}
|
}
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ Rectangle {
|
|||||||
Qt.rgba(Theme.primaryText.r, Theme.primaryText.g, Theme.primaryText.b, 0.22)
|
Qt.rgba(Theme.primaryText.r, Theme.primaryText.g, Theme.primaryText.b, 0.22)
|
||||||
readonly property color _tileRingInactive:
|
readonly property color _tileRingInactive:
|
||||||
Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.18)
|
Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.18)
|
||||||
readonly property color _tileIconActive: Theme.primaryContainer
|
readonly property color _tileIconActive: Theme.primaryText
|
||||||
readonly property color _tileIconInactive: Theme.primary
|
readonly property color _tileIconInactive: Theme.primary
|
||||||
|
|
||||||
property int _padH: Theme.spacingS
|
property int _padH: Theme.spacingS
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ Rectangle {
|
|||||||
readonly property color _tileBgInactive: Theme.surfaceContainerHigh
|
readonly property color _tileBgInactive: Theme.surfaceContainerHigh
|
||||||
readonly property color _tileRingActive:
|
readonly property color _tileRingActive:
|
||||||
Qt.rgba(Theme.primaryText.r, Theme.primaryText.g, Theme.primaryText.b, 0.22)
|
Qt.rgba(Theme.primaryText.r, Theme.primaryText.g, Theme.primaryText.b, 0.22)
|
||||||
readonly property color _tileIconActive: Theme.primaryContainer
|
readonly property color _tileIconActive: Theme.primaryText
|
||||||
readonly property color _tileIconInactive: Theme.primary
|
readonly property color _tileIconInactive: Theme.primary
|
||||||
|
|
||||||
color: {
|
color: {
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ Rectangle {
|
|||||||
readonly property color _tileBgInactive: Theme.surfaceContainerHigh
|
readonly property color _tileBgInactive: Theme.surfaceContainerHigh
|
||||||
readonly property color _tileRingActive:
|
readonly property color _tileRingActive:
|
||||||
Qt.rgba(Theme.primaryText.r, Theme.primaryText.g, Theme.primaryText.b, 0.22)
|
Qt.rgba(Theme.primaryText.r, Theme.primaryText.g, Theme.primaryText.b, 0.22)
|
||||||
readonly property color _tileIconActive: Theme.primaryContainer
|
readonly property color _tileIconActive: Theme.primaryText
|
||||||
readonly property color _tileIconInactive: Theme.primary
|
readonly property color _tileIconInactive: Theme.primary
|
||||||
|
|
||||||
color: {
|
color: {
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ Rectangle {
|
|||||||
DankIcon {
|
DankIcon {
|
||||||
name: root.iconName
|
name: root.iconName
|
||||||
size: Theme.iconSize
|
size: Theme.iconSize
|
||||||
color: isActive ? Theme.primaryContainer : Theme.primary
|
color: isActive ? Theme.primaryText : Theme.primary
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
rotation: root.iconRotation
|
rotation: root.iconRotation
|
||||||
onRotationCompleted: root.iconRotationCompleted()
|
onRotationCompleted: root.iconRotationCompleted()
|
||||||
@@ -84,7 +84,7 @@ Rectangle {
|
|||||||
width: parent.width
|
width: parent.width
|
||||||
text: root.text
|
text: root.text
|
||||||
font.pixelSize: Theme.fontSizeMedium
|
font.pixelSize: Theme.fontSizeMedium
|
||||||
color: isActive ? Theme.primaryContainer : Theme.surfaceText
|
color: isActive ? Theme.primaryText : Theme.surfaceText
|
||||||
font.weight: Font.Medium
|
font.weight: Font.Medium
|
||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
wrapMode: Text.NoWrap
|
wrapMode: Text.NoWrap
|
||||||
@@ -94,7 +94,7 @@ Rectangle {
|
|||||||
width: parent.width
|
width: parent.width
|
||||||
text: root.secondaryText
|
text: root.secondaryText
|
||||||
font.pixelSize: Theme.fontSizeSmall
|
font.pixelSize: Theme.fontSizeSmall
|
||||||
color: isActive ? Theme.primaryContainer : Theme.surfaceVariantText
|
color: isActive ? Theme.primaryText : Theme.surfaceVariantText
|
||||||
visible: text.length > 0
|
visible: text.length > 0
|
||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
wrapMode: Text.NoWrap
|
wrapMode: Text.NoWrap
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ Flow {
|
|||||||
width: Math.max(contentItem.implicitWidth + root.buttonPadding * 2, root.minButtonWidth) + (selected ? 4 : 0)
|
width: Math.max(contentItem.implicitWidth + root.buttonPadding * 2, root.minButtonWidth) + (selected ? 4 : 0)
|
||||||
height: root.buttonHeight
|
height: root.buttonHeight
|
||||||
|
|
||||||
color: selected ? Theme.primaryContainer : Theme.primary
|
color: selected ? Theme.primary : Theme.surfaceVariant
|
||||||
border.color: "transparent"
|
border.color: "transparent"
|
||||||
border.width: 0
|
border.width: 0
|
||||||
|
|
||||||
@@ -139,8 +139,8 @@ Flow {
|
|||||||
topRightRadius: parent.topRightRadius
|
topRightRadius: parent.topRightRadius
|
||||||
bottomRightRadius: parent.bottomRightRadius
|
bottomRightRadius: parent.bottomRightRadius
|
||||||
color: {
|
color: {
|
||||||
if (pressed) return selected ? Theme.primaryPressed : Theme.surfacePressed
|
if (pressed) return selected ? Theme.primaryPressed : Theme.surfaceTextHover
|
||||||
if (hovered) return selected ? Theme.primaryHover : Theme.surfaceHover
|
if (hovered) return selected ? Theme.primaryHover : Theme.surfaceTextHover
|
||||||
return "transparent"
|
return "transparent"
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -166,7 +166,7 @@ Flow {
|
|||||||
id: checkIcon
|
id: checkIcon
|
||||||
name: "check"
|
name: "check"
|
||||||
size: root.checkIconSize
|
size: root.checkIconSize
|
||||||
color: segment.selected ? Theme.surfaceText : Theme.primaryText
|
color: segment.selected ? Theme.primaryText : Theme.surfaceVariantText
|
||||||
visible: root.checkEnabled && segment.selected
|
visible: root.checkEnabled && segment.selected
|
||||||
opacity: segment.selected ? 1 : 0
|
opacity: segment.selected ? 1 : 0
|
||||||
scale: segment.selected ? 1 : 0.6
|
scale: segment.selected ? 1 : 0.6
|
||||||
@@ -192,7 +192,7 @@ Flow {
|
|||||||
text: typeof modelData === "string" ? modelData : modelData.text || ""
|
text: typeof modelData === "string" ? modelData : modelData.text || ""
|
||||||
font.pixelSize: root.textSize
|
font.pixelSize: root.textSize
|
||||||
font.weight: segment.selected ? Font.Medium : Font.Normal
|
font.weight: segment.selected ? Font.Medium : Font.Normal
|
||||||
color: segment.selected ? Theme.surfaceText : Theme.primaryText
|
color: segment.selected ? Theme.primaryText : Theme.surfaceVariantText
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -107,11 +107,14 @@ PanelWindow {
|
|||||||
return Math.max(Theme.popupDistance, Math.min(screenHeight - popupHeight - Theme.popupDistance, triggerY + Theme.popupDistance))
|
return Math.max(Theme.popupDistance, Math.min(screenHeight - popupHeight - Theme.popupDistance, triggerY + Theme.popupDistance))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
width: popupWidth
|
readonly property real dpr: root.screen.devicePixelRatio
|
||||||
height: popupHeight
|
function snap(v) { return Math.round(v * dpr) / dpr }
|
||||||
x: Math.round(calculatedX)
|
width: snap(popupWidth)
|
||||||
y: Math.round(calculatedY)
|
height: snap(popupHeight)
|
||||||
|
x: snap(calculatedX)
|
||||||
|
y: snap(calculatedY)
|
||||||
|
|
||||||
opacity: shouldBeVisible ? 1 : 0
|
opacity: shouldBeVisible ? 1 : 0
|
||||||
scale: 1
|
scale: 1
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user