forked from Shinonome/dots-hyprland
overview: indicate xwayland with italics and tooltip instead of icon
This commit is contained in:
@@ -176,8 +176,8 @@ Item {
|
||||
id: dragArea
|
||||
anchors.fill: parent
|
||||
hoverEnabled: true
|
||||
onEntered: hovered = true
|
||||
onExited: hovered = false
|
||||
onEntered: hovered = true // For hover color change
|
||||
onExited: hovered = false // For hover color change
|
||||
acceptedButtons: Qt.LeftButton | Qt.MiddleButton
|
||||
drag.target: parent
|
||||
onPressed: {
|
||||
@@ -212,6 +212,12 @@ Item {
|
||||
event.accepted = true
|
||||
}
|
||||
}
|
||||
|
||||
StyledToolTip {
|
||||
extraVisibleCondition: false
|
||||
alternativeVisibleCondition: dragArea.containsMouse && !window.Drag.active
|
||||
content: `${windowData.title}\n[${windowData.class}] ${windowData.xwayland ? "[XWayland] " : ""}\n`
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,7 +12,6 @@ import Quickshell.Hyprland
|
||||
|
||||
Rectangle { // Window
|
||||
id: root
|
||||
|
||||
property var windowData
|
||||
property var monitorData
|
||||
property var scale
|
||||
@@ -34,6 +33,8 @@ Rectangle { // Window
|
||||
property var iconToWindowRatioCompact: 0.6
|
||||
property var iconPath: Quickshell.iconPath(AppSearch.guessIcon(windowData?.class), "image-missing")
|
||||
property bool compactMode: Appearance.font.pixelSize.smaller * 4 > targetWindowHeight || Appearance.font.pixelSize.smaller * 4 > targetWindowWidth
|
||||
|
||||
property bool indicateXWayland: (ConfigOptions.overview.showXwaylandIndicator && windowData?.xwayland) ?? false
|
||||
|
||||
x: initX
|
||||
y: initY
|
||||
@@ -74,15 +75,6 @@ Rectangle { // Window
|
||||
Behavior on implicitSize {
|
||||
animation: Appearance.animation.elementMoveEnter.numberAnimation.createObject(this)
|
||||
}
|
||||
|
||||
IconImage {
|
||||
id: xwaylandIndicator
|
||||
visible: (ConfigOptions.overview.showXwaylandIndicator && windowData?.xwayland) ?? false
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: parent.bottom
|
||||
source: Quickshell.iconPath("xorg")
|
||||
implicitSize: windowIcon.implicitSize * xwaylandIndicatorToIconRatio
|
||||
}
|
||||
}
|
||||
|
||||
StyledText {
|
||||
@@ -93,8 +85,8 @@ Rectangle { // Window
|
||||
Layout.fillHeight: true
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
font.pixelSize: Appearance.font.pixelSize.smaller
|
||||
font.italic: indicateXWayland ? true : false
|
||||
elide: Text.ElideRight
|
||||
// wrapMode: Text.Wrap
|
||||
text: windowData?.title ?? ""
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user