forked from Shinonome/dots-hyprland
replace multieffect shadows with rectangularshadow ones
This commit is contained in:
@@ -55,7 +55,16 @@ Scope { // Scope
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Background
|
||||
RectangularShadow {
|
||||
anchors.fill: cheatsheetBackground
|
||||
radius: cheatsheetBackground.radius
|
||||
blur: 1.2 * Appearance.sizes.elevationMargin
|
||||
spread: 1
|
||||
color: Appearance.colors.colShadow
|
||||
cached: true
|
||||
}
|
||||
Rectangle {
|
||||
id: cheatsheetBackground
|
||||
anchors.centerIn: parent
|
||||
@@ -65,16 +74,6 @@ Scope { // Scope
|
||||
implicitWidth: cheatsheetColumnLayout.implicitWidth + padding * 2
|
||||
implicitHeight: cheatsheetColumnLayout.implicitHeight + padding * 2
|
||||
|
||||
layer.enabled: true
|
||||
layer.effect: MultiEffect {
|
||||
source: cheatsheetBackground
|
||||
anchors.fill: cheatsheetBackground
|
||||
shadowEnabled: true
|
||||
shadowVerticalOffset: 1
|
||||
shadowColor: Appearance.colors.colShadow
|
||||
shadowBlur: 0.5
|
||||
}
|
||||
|
||||
Keys.onPressed: (event) => { // Esc to close
|
||||
if (event.key === Qt.Key_Escape) {
|
||||
cheatsheetRoot.hide()
|
||||
|
||||
@@ -128,7 +128,7 @@ Singleton {
|
||||
property color colTooltip: "#3C4043" // m3colors.m3inverseSurface in the specs, but the m3 website actually uses this color
|
||||
property color colOnTooltip: "#F8F9FA" // m3colors.m3inverseOnSurface in the specs, but the m3 website actually uses this color
|
||||
property color colScrim: ColorUtils.transparentize(m3colors.m3scrim, 0.5)
|
||||
property color colShadow: ColorUtils.transparentize(m3colors.m3shadow, 0.75)
|
||||
property color colShadow: ColorUtils.transparentize(m3colors.m3shadow, 0.85)
|
||||
}
|
||||
|
||||
rounding: QtObject {
|
||||
|
||||
@@ -106,7 +106,14 @@ Item { // Notification group area
|
||||
}
|
||||
|
||||
|
||||
|
||||
RectangularShadow {
|
||||
visible: popup
|
||||
anchors.fill: background
|
||||
radius: background.radius
|
||||
blur: 1.2 * Appearance.sizes.elevationMargin
|
||||
spread: 1
|
||||
color: Appearance.colors.colShadow
|
||||
}
|
||||
Rectangle { // Background of the notification
|
||||
id: background
|
||||
anchors.left: parent.left
|
||||
@@ -134,16 +141,6 @@ Item { // Notification group area
|
||||
animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this)
|
||||
}
|
||||
|
||||
layer.enabled: true
|
||||
layer.effect: MultiEffect {
|
||||
source: background
|
||||
anchors.fill: background
|
||||
shadowEnabled: popup
|
||||
shadowColor: Appearance.colors.colShadow
|
||||
shadowVerticalOffset: 1
|
||||
shadowBlur: 0.5
|
||||
}
|
||||
|
||||
RowLayout { // Left column for icon, right column for content
|
||||
id: row
|
||||
anchors.top: parent.top
|
||||
|
||||
@@ -74,12 +74,6 @@ Item { // Player instance
|
||||
id: coverArtDownloader
|
||||
property string targetFile: playerController.artUrl
|
||||
command: [ "bash", "-c", `[ -f ${artFilePath} ] || curl -sSL '${targetFile}' -o '${artFilePath}'` ]
|
||||
stdout: SplitParser {
|
||||
onRead: data => {
|
||||
// console.log("Color quantizer output:", data)
|
||||
playerController.artDominantColor = "#" + data
|
||||
}
|
||||
}
|
||||
onExited: (exitCode, exitStatus) => {
|
||||
colorQuantizer.targetFile = playerController.artUrl // Yes this binding break is intentional
|
||||
colorQuantizer.running = true
|
||||
@@ -93,7 +87,6 @@ Item { // Player instance
|
||||
command: [ "sh", "-c", `magick '${targetFile}' -scale 1x1\\! -format '%[fx:int(255*r+.5)],%[fx:int(255*g+.5)],%[fx:int(255*b+.5)]' info: | sed 's/,/\\n/g' | xargs -L 1 printf '%02x' ; echo` ]
|
||||
stdout: SplitParser {
|
||||
onRead: data => {
|
||||
// console.log("Color quantizer output:", data)
|
||||
playerController.artDominantColor = "#" + data
|
||||
}
|
||||
}
|
||||
@@ -115,26 +108,19 @@ Item { // Player instance
|
||||
property color colOnSecondaryContainer: ColorUtils.mix(Appearance.m3colors.m3onSecondaryContainer, artDominantColor, 0.2)
|
||||
|
||||
}
|
||||
Rectangle { // Background wrapper with shadow
|
||||
id: backgroundShadowLayer
|
||||
anchors.fill: parent
|
||||
anchors.margins: Appearance.sizes.elevationMargin
|
||||
color: blendedColors.colLayer0
|
||||
radius: root.popupRounding
|
||||
|
||||
layer.enabled: true
|
||||
layer.effect: MultiEffect {
|
||||
source: backgroundShadowLayer
|
||||
anchors.fill: backgroundShadowLayer
|
||||
shadowEnabled: true
|
||||
shadowColor: Appearance.colors.colShadow
|
||||
shadowVerticalOffset: 1
|
||||
shadowBlur: 0.5
|
||||
RectangularShadow {
|
||||
anchors.fill: background
|
||||
radius: background.radius
|
||||
blur: 1.2 * Appearance.sizes.elevationMargin
|
||||
spread: 1
|
||||
color: Appearance.colors.colShadow
|
||||
cached: true
|
||||
}
|
||||
|
||||
Rectangle { // Background
|
||||
id: background
|
||||
anchors.fill: parent
|
||||
anchors.margins: Appearance.sizes.elevationMargin
|
||||
color: blendedColors.colLayer0
|
||||
radius: root.popupRounding
|
||||
|
||||
@@ -306,4 +292,3 @@ Item { // Player instance
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -25,6 +25,13 @@ Item {
|
||||
implicitWidth: Appearance.sizes.osdWidth
|
||||
implicitHeight: valueIndicator.implicitHeight
|
||||
|
||||
RectangularShadow {
|
||||
anchors.fill: valueIndicator
|
||||
radius: valueIndicator.radius
|
||||
blur: 1.2 * Appearance.sizes.elevationMargin
|
||||
spread: 1
|
||||
color: Appearance.colors.colShadow
|
||||
}
|
||||
WrapperRectangle {
|
||||
id: valueIndicator
|
||||
anchors.fill: parent
|
||||
@@ -32,16 +39,6 @@ Item {
|
||||
color: Appearance.colors.colLayer0
|
||||
implicitWidth: valueRow.implicitWidth
|
||||
|
||||
layer.enabled: true
|
||||
layer.effect: MultiEffect {
|
||||
source: valueIndicator
|
||||
anchors.fill: valueIndicator
|
||||
shadowEnabled: true
|
||||
shadowColor: Appearance.colors.colShadow
|
||||
shadowVerticalOffset: 1
|
||||
shadowBlur: 0.5
|
||||
}
|
||||
|
||||
RowLayout { // Icon on the left, stuff on the right
|
||||
id: valueRow
|
||||
Layout.margins: 10
|
||||
|
||||
@@ -49,7 +49,14 @@ Item {
|
||||
property Component windowComponent: OverviewWindow {}
|
||||
property list<OverviewWindow> windowWidgets: []
|
||||
|
||||
Rectangle {
|
||||
RectangularShadow { // Background shadow
|
||||
anchors.fill: overviewBackground
|
||||
radius: overviewBackground.radius
|
||||
blur: 1.2 * Appearance.sizes.elevationMargin
|
||||
spread: 1
|
||||
color: Appearance.colors.colShadow
|
||||
}
|
||||
Rectangle { // Background
|
||||
id: overviewBackground
|
||||
|
||||
anchors.fill: parent
|
||||
@@ -59,16 +66,6 @@ Item {
|
||||
color: Appearance.colors.colLayer0
|
||||
radius: Appearance.rounding.screenRounding * root.scale + 5 * 2
|
||||
|
||||
layer.enabled: true
|
||||
layer.effect: MultiEffect {
|
||||
source: overviewBackground
|
||||
anchors.fill: overviewBackground
|
||||
shadowEnabled: true
|
||||
shadowColor: Appearance.colors.colShadow
|
||||
shadowVerticalOffset: 1
|
||||
shadowBlur: 0.5
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
id: workspaceColumnLayout
|
||||
|
||||
|
||||
@@ -175,6 +175,13 @@ Item { // Wrapper
|
||||
}
|
||||
}
|
||||
|
||||
RectangularShadow { // Background shadow
|
||||
anchors.fill: searchWidgetContent
|
||||
radius: searchWidgetContent.radius
|
||||
blur: 1.2 * Appearance.sizes.elevationMargin
|
||||
spread: 1
|
||||
color: Appearance.colors.colShadow
|
||||
}
|
||||
Rectangle { // Background
|
||||
id: searchWidgetContent
|
||||
anchors.centerIn: parent
|
||||
@@ -182,15 +189,6 @@ Item { // Wrapper
|
||||
implicitHeight: columnLayout.implicitHeight
|
||||
radius: Appearance.rounding.large
|
||||
color: Appearance.colors.colLayer0
|
||||
layer.enabled: true
|
||||
layer.effect: MultiEffect {
|
||||
source: searchWidgetContent
|
||||
anchors.fill: searchWidgetContent
|
||||
shadowEnabled: true
|
||||
shadowColor: Appearance.colors.colShadow
|
||||
shadowVerticalOffset: 1
|
||||
shadowBlur: 0.5
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
id: columnLayout
|
||||
|
||||
@@ -65,6 +65,13 @@ Scope { // Scope
|
||||
}
|
||||
|
||||
// Background
|
||||
RectangularShadow { // Background shadow
|
||||
anchors.fill: sidebarLeftBackground
|
||||
radius: sidebarLeftBackground.radius
|
||||
blur: 1.2 * Appearance.sizes.elevationMargin
|
||||
spread: 1
|
||||
color: Appearance.colors.colShadow
|
||||
}
|
||||
Rectangle {
|
||||
id: sidebarLeftBackground
|
||||
|
||||
@@ -78,16 +85,6 @@ Scope { // Scope
|
||||
radius: Appearance.rounding.screenRounding - Appearance.sizes.elevationMargin + 1
|
||||
focus: sidebarRoot.visible
|
||||
|
||||
layer.enabled: true
|
||||
layer.effect: MultiEffect {
|
||||
source: sidebarLeftBackground
|
||||
anchors.fill: sidebarLeftBackground
|
||||
shadowEnabled: true
|
||||
shadowColor: Appearance.colors.colShadow
|
||||
shadowVerticalOffset: 1
|
||||
shadowBlur: 0.5
|
||||
}
|
||||
|
||||
Behavior on width {
|
||||
animation: Appearance.animation.elementMove.numberAnimation.createObject(this)
|
||||
}
|
||||
|
||||
@@ -43,6 +43,10 @@ Button {
|
||||
}
|
||||
}
|
||||
|
||||
StyledToolTip {
|
||||
content: `${StringUtils.wordWrap(root.imageData.tags, root.maxTagStringLineLength)}`
|
||||
}
|
||||
|
||||
padding: 0
|
||||
implicitWidth: root.rowHeight * modelData.aspect_ratio
|
||||
implicitHeight: root.rowHeight
|
||||
@@ -97,10 +101,6 @@ Button {
|
||||
colBackgroundHover: ColorUtils.transparentize(ColorUtils.mix(Appearance.m3colors.m3surface, Appearance.m3colors.m3onSurface, 0.8), 0.2)
|
||||
colRipple: ColorUtils.transparentize(ColorUtils.mix(Appearance.m3colors.m3surface, Appearance.m3colors.m3onSurface, 0.6), 0.1)
|
||||
|
||||
StyledToolTip {
|
||||
content: `${StringUtils.wordWrap(root.imageData.tags, root.maxTagStringLineLength)}\n${qsTr("Click for options")}`
|
||||
}
|
||||
|
||||
contentItem: MaterialSymbol {
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
iconSize: Appearance.font.pixelSize.large
|
||||
@@ -124,6 +124,13 @@ Button {
|
||||
width: contextMenu.width
|
||||
height: contextMenu.height
|
||||
|
||||
RectangularShadow { // Background shadow
|
||||
anchors.fill: contextMenu
|
||||
radius: contextMenu.radius
|
||||
blur: 1.2 * Appearance.sizes.elevationMargin
|
||||
spread: 1
|
||||
color: Appearance.colors.colShadow
|
||||
}
|
||||
Rectangle {
|
||||
id: contextMenu
|
||||
anchors.centerIn: parent
|
||||
@@ -134,16 +141,6 @@ Button {
|
||||
implicitHeight: contextMenuColumnLayout.implicitHeight + radius * 2
|
||||
implicitWidth: contextMenuColumnLayout.implicitWidth
|
||||
|
||||
layer.enabled: true
|
||||
layer.effect: MultiEffect {
|
||||
source: contextMenu
|
||||
anchors.fill: contextMenu
|
||||
shadowEnabled: true
|
||||
shadowColor: Appearance.colors.colShadow
|
||||
shadowVerticalOffset: 1
|
||||
shadowBlur: 0.5
|
||||
}
|
||||
|
||||
Behavior on opacity {
|
||||
NumberAnimation {
|
||||
duration: Appearance.animation.elementMoveFast.duration
|
||||
|
||||
@@ -56,24 +56,26 @@ Scope {
|
||||
width: sidebarWidth - Appearance.sizes.hyprlandGapsOut * 2
|
||||
height: parent.height - Appearance.sizes.hyprlandGapsOut * 2
|
||||
|
||||
sourceComponent: Rectangle {
|
||||
sourceComponent: Item {
|
||||
implicitHeight: sidebarRightBackground.implicitHeight
|
||||
implicitWidth: sidebarRightBackground.implicitWidth
|
||||
|
||||
RectangularShadow { // Background shadow
|
||||
anchors.fill: sidebarRightBackground
|
||||
radius: sidebarRightBackground.radius
|
||||
blur: 1.2 * Appearance.sizes.elevationMargin
|
||||
spread: 1
|
||||
color: Appearance.colors.colShadow
|
||||
}
|
||||
Rectangle {
|
||||
id: sidebarRightBackground
|
||||
|
||||
anchors.fill: parent
|
||||
implicitHeight: parent.height - Appearance.sizes.hyprlandGapsOut * 2
|
||||
implicitWidth: sidebarWidth - Appearance.sizes.hyprlandGapsOut * 2
|
||||
color: Appearance.colors.colLayer0
|
||||
radius: Appearance.rounding.screenRounding - Appearance.sizes.elevationMargin + 1
|
||||
|
||||
layer.enabled: true
|
||||
layer.effect: MultiEffect {
|
||||
source: sidebarRightBackground
|
||||
anchors.fill: sidebarRightBackground
|
||||
shadowEnabled: true
|
||||
shadowColor: Appearance.colors.colShadow
|
||||
shadowVerticalOffset: 1
|
||||
shadowBlur: 0.5
|
||||
}
|
||||
|
||||
Keys.onPressed: (event) => {
|
||||
if (event.key === Qt.Key_Escape) {
|
||||
sidebarRoot.hide();
|
||||
@@ -162,6 +164,7 @@ Scope {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -152,6 +152,13 @@ Item {
|
||||
}
|
||||
|
||||
// + FAB
|
||||
RectangularShadow { // Background shadow
|
||||
anchors.fill: fabButton
|
||||
radius: Appearance.rounding.normal
|
||||
blur: 1.2 * Appearance.sizes.elevationMargin
|
||||
spread: 1
|
||||
color: Appearance.colors.colShadow
|
||||
}
|
||||
Button {
|
||||
id: fabButton
|
||||
anchors.right: parent.right
|
||||
@@ -173,16 +180,6 @@ Item {
|
||||
Behavior on color {
|
||||
animation: Appearance.animation.elementMoveFast.colorAnimation.createObject(this)
|
||||
}
|
||||
|
||||
layer.enabled: true
|
||||
layer.effect: MultiEffect {
|
||||
source: fabBackground
|
||||
anchors.fill: fabBackground
|
||||
shadowEnabled: true
|
||||
shadowColor: Appearance.colors.colShadow
|
||||
shadowBlur: 0.6
|
||||
shadowVerticalOffset: fabButton.hovered ? 4 : 2
|
||||
}
|
||||
}
|
||||
|
||||
contentItem: MaterialSymbol {
|
||||
|
||||
Reference in New Issue
Block a user