forked from Shinonome/dots-hyprland
overview: fix blurry icons
This commit is contained in:
@@ -180,8 +180,8 @@ Item {
|
|||||||
repeat: false
|
repeat: false
|
||||||
running: false
|
running: false
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
window.x = Math.max((windowData?.at[0] - monitorData?.reserved[0]) * root.scale, 0) + xOffset
|
window.x = Math.round(Math.max((windowData?.at[0] - monitorData?.reserved[0]) * root.scale, 0) + xOffset)
|
||||||
window.y = Math.max((windowData?.at[1] - monitorData?.reserved[1]) * root.scale, 0) + yOffset
|
window.y = Math.round(Math.max((windowData?.at[1] - monitorData?.reserved[1]) * root.scale, 0) + yOffset)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import Quickshell.Io
|
|||||||
import Quickshell.Wayland
|
import Quickshell.Wayland
|
||||||
import Quickshell.Hyprland
|
import Quickshell.Hyprland
|
||||||
|
|
||||||
Rectangle { // Window
|
Item { // Window
|
||||||
id: root
|
id: root
|
||||||
property var toplevel
|
property var toplevel
|
||||||
property var windowData
|
property var windowData
|
||||||
@@ -42,8 +42,8 @@ Rectangle { // Window
|
|||||||
|
|
||||||
x: initX
|
x: initX
|
||||||
y: initY
|
y: initY
|
||||||
width: Math.min(windowData?.size[0] * root.scale, (restrictToWorkspace ? windowData?.size[0] : availableWorkspaceWidth - x + xOffset))
|
width: Math.round(Math.min(windowData?.size[0] * root.scale, (restrictToWorkspace ? windowData?.size[0] : availableWorkspaceWidth - x + xOffset)))
|
||||||
height: Math.min(windowData?.size[1] * root.scale, (restrictToWorkspace ? windowData?.size[1] : availableWorkspaceHeight - y + yOffset))
|
height: Math.round(Math.min(windowData?.size[1] * root.scale, (restrictToWorkspace ? windowData?.size[1] : availableWorkspaceHeight - y + yOffset)))
|
||||||
|
|
||||||
layer.enabled: true
|
layer.enabled: true
|
||||||
layer.effect: OpacityMask {
|
layer.effect: OpacityMask {
|
||||||
@@ -78,7 +78,6 @@ Rectangle { // Window
|
|||||||
color: pressed ? Appearance.colors.colLayer2Active : hovered ? Appearance.colors.colLayer2Hover : Appearance.colors.colLayer2
|
color: pressed ? Appearance.colors.colLayer2Active : hovered ? Appearance.colors.colLayer2Hover : Appearance.colors.colLayer2
|
||||||
opacity: pressed ? 0.3 : hovered ? 0.2 : 0
|
opacity: pressed ? 0.3 : hovered ? 0.2 : 0
|
||||||
border.color : ColorUtils.transparentize(Appearance.m3colors.m3outline, 0.9)
|
border.color : ColorUtils.transparentize(Appearance.m3colors.m3outline, 0.9)
|
||||||
border.pixelAligned : false
|
|
||||||
border.width : 1
|
border.width : 1
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -88,13 +87,20 @@ Rectangle { // Window
|
|||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
spacing: Appearance.font.pixelSize.smaller * 0.5
|
spacing: Appearance.font.pixelSize.smaller * 0.5
|
||||||
|
|
||||||
IconImage {
|
Image {
|
||||||
id: windowIcon
|
id: windowIcon
|
||||||
|
property var iconSize: Math.min(targetWindowWidth, targetWindowHeight) * (root.compactMode ? root.iconToWindowRatioCompact : root.iconToWindowRatio)
|
||||||
|
// mipmap: true
|
||||||
Layout.alignment: Qt.AlignHCenter
|
Layout.alignment: Qt.AlignHCenter
|
||||||
source: root.iconPath
|
source: root.iconPath
|
||||||
implicitSize: Math.min(targetWindowWidth, targetWindowHeight) * (root.compactMode ? root.iconToWindowRatioCompact : root.iconToWindowRatio)
|
width: iconSize
|
||||||
|
height: iconSize
|
||||||
|
sourceSize: Qt.size(iconSize, iconSize)
|
||||||
|
|
||||||
Behavior on implicitSize {
|
Behavior on width {
|
||||||
|
animation: Appearance.animation.elementMoveEnter.numberAnimation.createObject(this)
|
||||||
|
}
|
||||||
|
Behavior on height {
|
||||||
animation: Appearance.animation.elementMoveEnter.numberAnimation.createObject(this)
|
animation: Appearance.animation.elementMoveEnter.numberAnimation.createObject(this)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user