forked from Shinonome/dots-hyprland
workaround for hyprland's 1px dead right edge
This commit is contained in:
@@ -75,10 +75,17 @@ Scope {
|
|||||||
right: true
|
right: true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
margins {
|
||||||
|
right: (Config.options.interactions.deadPixelWorkaround.enable && barRoot.anchors.right) * -1
|
||||||
|
}
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
id: hoverRegion
|
id: hoverRegion
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
anchors.fill: parent
|
anchors {
|
||||||
|
fill: parent
|
||||||
|
rightMargin: (Config.options.interactions.deadPixelWorkaround.enable && barRoot.anchors.right) * 1
|
||||||
|
}
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: hoverMaskRegion
|
id: hoverMaskRegion
|
||||||
@@ -100,6 +107,7 @@ Scope {
|
|||||||
bottom: undefined
|
bottom: undefined
|
||||||
topMargin: (Config?.options.bar.autoHide.enable && !mustShow) ? -Appearance.sizes.barHeight : 0
|
topMargin: (Config?.options.bar.autoHide.enable && !mustShow) ? -Appearance.sizes.barHeight : 0
|
||||||
bottomMargin: 0
|
bottomMargin: 0
|
||||||
|
rightMargin: (Config.options.interactions.deadPixelWorkaround.enable && barRoot.anchors.right) * -1
|
||||||
}
|
}
|
||||||
Behavior on anchors.topMargin {
|
Behavior on anchors.topMargin {
|
||||||
animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this)
|
animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this)
|
||||||
|
|||||||
@@ -226,6 +226,9 @@ Singleton {
|
|||||||
property int mouseScrollFactor: 120
|
property int mouseScrollFactor: 120
|
||||||
property int touchpadScrollFactor: 450
|
property int touchpadScrollFactor: 450
|
||||||
}
|
}
|
||||||
|
property JsonObject deadPixelWorkaround: JsonObject { // Hyprland leaves out 1 pixel on the right for interactions
|
||||||
|
property bool enable: true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
property JsonObject language: JsonObject {
|
property JsonObject language: JsonObject {
|
||||||
|
|||||||
@@ -6,6 +6,10 @@ Item {
|
|||||||
|
|
||||||
enum CornerEnum { TopLeft, TopRight, BottomLeft, BottomRight }
|
enum CornerEnum { TopLeft, TopRight, BottomLeft, BottomRight }
|
||||||
property var corner: RoundCorner.CornerEnum.TopLeft
|
property var corner: RoundCorner.CornerEnum.TopLeft
|
||||||
|
property alias leftVisualMargin: shape.anchors.leftMargin
|
||||||
|
property alias topVisualMargin: shape.anchors.topMargin
|
||||||
|
property alias rightVisualMargin: shape.anchors.rightMargin
|
||||||
|
property alias bottomVisualMargin: shape.anchors.bottomMargin
|
||||||
|
|
||||||
property int implicitSize: 25
|
property int implicitSize: 25
|
||||||
property color color: "#000000"
|
property color color: "#000000"
|
||||||
@@ -23,6 +27,7 @@ Item {
|
|||||||
property bool isRight: isTopRight || isBottomRight
|
property bool isRight: isTopRight || isBottomRight
|
||||||
|
|
||||||
Shape {
|
Shape {
|
||||||
|
id: shape
|
||||||
anchors {
|
anchors {
|
||||||
top: root.isTop ? parent.top : undefined
|
top: root.isTop ? parent.top : undefined
|
||||||
bottom: root.isBottom ? parent.bottom : undefined
|
bottom: root.isBottom ? parent.bottom : undefined
|
||||||
|
|||||||
@@ -41,13 +41,19 @@ Scope {
|
|||||||
bottom: cornerWidget.isBottomLeft || cornerWidget.isBottomRight
|
bottom: cornerWidget.isBottomLeft || cornerWidget.isBottomRight
|
||||||
right: cornerWidget.isTopRight || cornerWidget.isBottomRight
|
right: cornerWidget.isTopRight || cornerWidget.isBottomRight
|
||||||
}
|
}
|
||||||
|
margins {
|
||||||
|
right: (Config.options.interactions.deadPixelWorkaround.enable && cornerPanelWindow.anchors.right) * -1
|
||||||
|
}
|
||||||
|
|
||||||
implicitWidth: cornerWidget.implicitWidth
|
implicitWidth: cornerWidget.implicitWidth
|
||||||
implicitHeight: cornerWidget.implicitHeight
|
implicitHeight: cornerWidget.implicitHeight
|
||||||
|
|
||||||
RoundCorner {
|
RoundCorner {
|
||||||
id: cornerWidget
|
id: cornerWidget
|
||||||
|
anchors.fill: parent
|
||||||
corner: cornerPanelWindow.corner
|
corner: cornerPanelWindow.corner
|
||||||
|
rightVisualMargin: (Config.options.interactions.deadPixelWorkaround.enable && cornerPanelWindow.anchors.right) * 1
|
||||||
|
|
||||||
implicitSize: Appearance.rounding.screenRounding
|
implicitSize: Appearance.rounding.screenRounding
|
||||||
implicitHeight: Math.max(implicitSize, sidebarCornerOpenInteractionLoader.implicitHeight)
|
implicitHeight: Math.max(implicitSize, sidebarCornerOpenInteractionLoader.implicitHeight)
|
||||||
implicitWidth: Math.max(implicitSize, sidebarCornerOpenInteractionLoader.implicitWidth)
|
implicitWidth: Math.max(implicitSize, sidebarCornerOpenInteractionLoader.implicitWidth)
|
||||||
|
|||||||
Reference in New Issue
Block a user