1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-28 23:42:51 -05:00

respect cornerRadius setting in more places

This commit is contained in:
bbedward
2025-09-21 11:47:28 -04:00
parent 118375f004
commit c8f87085a0
4 changed files with 8 additions and 8 deletions

View File

@@ -245,7 +245,7 @@ DankPopout {
Rectangle { Rectangle {
width: batteryContentRow.implicitWidth + Theme.spacingS * 2 width: batteryContentRow.implicitWidth + Theme.spacingS * 2
height: 40 height: 40
radius: 20 radius: Theme.cornerRadius
color: batteryMouseArea.containsMouse ? Qt.rgba( color: batteryMouseArea.containsMouse ? Qt.rgba(
Theme.primary.r, Theme.primary.r,
Theme.primary.g, Theme.primary.g,

View File

@@ -16,7 +16,7 @@ StyledRect {
width: buttonSize width: buttonSize
height: buttonSize height: buttonSize
radius: circular ? buttonSize / 2 : Theme.cornerRadius radius: Theme.cornerRadius
color: backgroundColor color: backgroundColor
DankIcon { DankIcon {

View File

@@ -58,7 +58,7 @@ Item {
width: parent.width - (leftIconWidth + rightIconWidth + (slider.leftIcon.length > 0 ? Theme.spacingM : 0) + (slider.rightIcon.length > 0 ? Theme.spacingM : 0)) width: parent.width - (leftIconWidth + rightIconWidth + (slider.leftIcon.length > 0 ? Theme.spacingM : 0) + (slider.rightIcon.length > 0 ? Theme.spacingM : 0))
height: 12 height: 12
radius: height / 2 radius: Theme.cornerRadius
color: slider.trackColor color: slider.trackColor
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
clip: false clip: false
@@ -66,7 +66,7 @@ Item {
StyledRect { StyledRect {
id: sliderFill id: sliderFill
height: parent.height height: parent.height
radius: parent.radius radius: Theme.cornerRadius
width: { width: {
const ratio = (slider.value - slider.minimum) / (slider.maximum - slider.minimum) const ratio = (slider.value - slider.minimum) / (slider.maximum - slider.minimum)
const travel = sliderTrack.width - sliderHandle.width const travel = sliderTrack.width - sliderHandle.width
@@ -84,7 +84,7 @@ Item {
width: 8 width: 8
height: 24 height: 24
radius: 4 radius: Theme.cornerRadius
x: { x: {
const ratio = (slider.value - slider.minimum) / (slider.maximum - slider.minimum) const ratio = (slider.value - slider.minimum) / (slider.maximum - slider.minimum)
const travel = sliderTrack.width - width const travel = sliderTrack.width - width
@@ -98,7 +98,7 @@ Item {
StyledRect { StyledRect {
anchors.fill: parent anchors.fill: parent
radius: parent.radius radius: Theme.cornerRadius
color: Theme.onPrimary color: Theme.onPrimary
opacity: slider.enabled ? (sliderMouseArea.pressed ? 0.16 : (sliderMouseArea.containsMouse ? 0.08 : 0)) : 0 opacity: slider.enabled ? (sliderMouseArea.pressed ? 0.16 : (sliderMouseArea.containsMouse ? 0.08 : 0)) : 0
visible: opacity > 0 visible: opacity > 0

View File

@@ -87,7 +87,7 @@ Item {
anchors.right: parent.right anchors.right: parent.right
anchors.rightMargin: showText ? Theme.spacingM : 0 anchors.rightMargin: showText ? Theme.spacingM : 0
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
radius: height / 2 radius: Theme.cornerRadius
color: (checked && enabled) ? Theme.primary : Theme.surfaceVariantAlpha color: (checked && enabled) ? Theme.primary : Theme.surfaceVariantAlpha
opacity: toggling ? 0.6 : (enabled ? 1 : 0.4) opacity: toggling ? 0.6 : (enabled ? 1 : 0.4)
@@ -103,7 +103,7 @@ Item {
width: (checked && enabled) ? insetCircle : insetCircle - 4 width: (checked && enabled) ? insetCircle : insetCircle - 4
height: (checked && enabled) ? insetCircle : insetCircle - 4 height: (checked && enabled) ? insetCircle : insetCircle - 4
radius: width / 2 radius: Theme.cornerRadius
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
color: (checked && enabled) ? Theme.surface : Theme.outline color: (checked && enabled) ? Theme.surface : Theme.outline