1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-05-02 10:32:07 -04:00

blur: revise general blur styling and refine it

cherry-pick of 1abb2210 from master, translated to hotfix-1.4.5
(omits ElevationShadow gating since shadow overhaul isn't on this
branch; gates existing MultiEffect-based shadows by BlurService.enabled
instead). Drops DoNotDisturbDetail.qml hunk since the file does not
exist on this branch.
This commit is contained in:
bbedward
2026-04-25 11:15:01 -04:00
parent 6b15670918
commit e75b95b854
26 changed files with 221 additions and 170 deletions

View File

@@ -63,7 +63,7 @@ Item {
width: parent.width - (leftIconWidth + rightIconWidth + (slider.leftIcon.length > 0 ? Theme.spacingM : 0) + (slider.rightIcon.length > 0 ? Theme.spacingM : 0))
height: 12
radius: Theme.cornerRadius
color: slider.trackColor
color: Theme.withAlpha(slider.trackColor, Theme.popupTransparency)
anchors.verticalCenter: parent.verticalCenter
clip: false
@@ -71,13 +71,16 @@ Item {
id: sliderFill
height: parent.height
radius: Theme.cornerRadius
topRightRadius: 0
bottomRightRadius: 0
width: {
const range = slider.maximum - slider.minimum;
const rawRatio = range === 0 ? 0 : (slider.value - slider.minimum) / range;
const ratio = slider.centerMinimum ? (0.5 + rawRatio * 0.5) : rawRatio;
const travel = sliderTrack.width - sliderHandle.width;
const center = (travel * ratio) + sliderHandle.width / 2;
return Math.max(0, Math.min(sliderTrack.width, center));
const handleLeft = travel * ratio;
const endPoint = handleLeft - 3;
return Math.max(0, Math.min(sliderTrack.width, endPoint));
}
color: slider.enabled ? Theme.primary : Theme.withAlpha(Theme.onSurface, 0.12)
}
@@ -87,8 +90,8 @@ Item {
property bool active: sliderMouseArea.containsMouse || sliderMouseArea.pressed || slider.isDragging
width: 8
height: 24
width: 4
height: 20
radius: Theme.cornerRadius
x: {
const range = slider.maximum - slider.minimum;
@@ -99,7 +102,7 @@ Item {
}
anchors.verticalCenter: parent.verticalCenter
color: slider.enabled ? Theme.primary : Theme.withAlpha(Theme.onSurface, 0.12)
border.width: 3
border.width: 0
border.color: slider.thumbOutlineColor
StyledRect {