Add LazyLoader to the hover popup, add env to wal theme folder, fix a bug in popup calendar text
This commit is contained in:
@@ -18,7 +18,7 @@ Singleton {
|
||||
// Colors
|
||||
FileView {
|
||||
id: walColors
|
||||
path: Qt.resolvedUrl("/home/amaro/.cache/wal/colors")
|
||||
path: Qt.resolvedUrl(Quickshell.env("XDG_CACHE_HOME")+"/wal/colors")
|
||||
blockLoading: true
|
||||
watchChanges: true
|
||||
onFileChanged: this.reload()
|
||||
@@ -44,24 +44,4 @@ Singleton {
|
||||
readonly property color foregroundColorBright: walColorsText[15]
|
||||
|
||||
readonly property color textColor: foregroundColorBright
|
||||
// background "#0e1721"
|
||||
// color2 "#463e44"
|
||||
// color3 "#7b4834"
|
||||
// color4 "#735148"
|
||||
// color5 "#896451"
|
||||
// color6 "#9d7057"
|
||||
// color7 "#595563"
|
||||
// foreground "#91959b"
|
||||
// "#5d6772"
|
||||
// "#5E535B"
|
||||
// "#A56046"
|
||||
// "#9A6C60"
|
||||
// "#B7866C"
|
||||
// "#D29674"
|
||||
// "#777285"
|
||||
// "#c2c5c7"
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -10,6 +10,9 @@ import qs.Common.Styled
|
||||
import qs.Services
|
||||
|
||||
Singleton {
|
||||
id: root
|
||||
|
||||
property bool showWindow: false
|
||||
|
||||
function start(component, type) {
|
||||
HoverMediator.component = component;
|
||||
@@ -19,10 +22,22 @@ Singleton {
|
||||
|
||||
function exit() {
|
||||
hoverTimer.stop();
|
||||
hoverPopUp.visible = false;
|
||||
root.showWindow = false;
|
||||
}
|
||||
|
||||
PopupWindow {
|
||||
Timer {
|
||||
id: hoverTimer
|
||||
|
||||
interval: 300
|
||||
onTriggered: {
|
||||
// wsPopUp.opacity = 1
|
||||
root.showWindow = true;
|
||||
}
|
||||
}
|
||||
|
||||
LazyLoader {
|
||||
active: root.showWindow
|
||||
component: PopupWindow {
|
||||
id: hoverPopUp
|
||||
|
||||
anchor.item: HoverMediator.component
|
||||
@@ -31,6 +46,7 @@ Singleton {
|
||||
anchor.rect.x: (HoverMediator.x - this.implicitWidth) / 2
|
||||
implicitHeight: wsPopUp.implicitHeight
|
||||
implicitWidth: wsPopUp.implicitWidth
|
||||
visible: true
|
||||
|
||||
color: "transparent"
|
||||
|
||||
@@ -63,6 +79,8 @@ Singleton {
|
||||
property string calendar: (HoverMediator.component.calendar) ? HoverMediator.component.calendar : ""
|
||||
|
||||
text: calendar
|
||||
|
||||
textFormat: Text.AutoText
|
||||
font.family: Theme.fontFamilyMono
|
||||
}
|
||||
}
|
||||
@@ -137,13 +155,5 @@ Singleton {
|
||||
}
|
||||
}
|
||||
|
||||
Timer {
|
||||
id: hoverTimer
|
||||
|
||||
interval: 300
|
||||
onTriggered: {
|
||||
// wsPopUp.opacity = 1
|
||||
hoverPopUp.visible = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -129,6 +129,7 @@ WrapperMouseArea {
|
||||
}
|
||||
;
|
||||
Hyprland.dispatch("workspace " + workspacesRectangle.workspace.id);
|
||||
PopUpHover.exit();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user