summaryrefslogtreecommitdiff
path: root/src/modules/popdowns/sideright.tsx
diff options
context:
space:
mode:
author2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-02-09 17:16:53 +1100
committer2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-02-09 17:16:53 +1100
commit09d4e4810803f6679ee9f2b44f8e0880a1197105 (patch)
treefb8e3631035dedf4599ee0cd12f05c0addc2cb32 /src/modules/popdowns/sideright.tsx
parentsideright: weather wind & rain tooltips (diff)
downloadcaelestia-shell-09d4e4810803f6679ee9f2b44f8e0880a1197105.tar.gz
caelestia-shell-09d4e4810803f6679ee9f2b44f8e0880a1197105.tar.bz2
caelestia-shell-09d4e4810803f6679ee9f2b44f8e0880a1197105.zip
tooltip: ensure fully visible
Diffstat (limited to 'src/modules/popdowns/sideright.tsx')
-rw-r--r--src/modules/popdowns/sideright.tsx16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/modules/popdowns/sideright.tsx b/src/modules/popdowns/sideright.tsx
index ca3e51c..5e873b3 100644
--- a/src/modules/popdowns/sideright.tsx
+++ b/src/modules/popdowns/sideright.tsx
@@ -1,7 +1,7 @@
import SWeather, { type WeatherData } from "@/services/weather";
import { ellipsize } from "@/utils/strings";
import { bindCurrentTime } from "@/utils/system";
-import { Calendar as WCal } from "@/utils/widgets";
+import { setupCustomTooltip, Calendar as WCal } from "@/utils/widgets";
import PopupWindow from "@/widgets/popupwindow";
import { bind, timeout } from "astal";
import { Astal, Gtk, type Gdk } from "astal/gtk3";
@@ -88,12 +88,22 @@ const Weather = () => {
<label
xalign={0}
label={bind(weather, "wind").as(w => ` ${w}`)}
- tooltipText={bind(weather, "wind").as(w => `${w} wind speed`)}
+ setup={self =>
+ setupCustomTooltip(
+ self,
+ bind(weather, "wind").as(w => `${w} wind speed`)
+ )
+ }
/>
<label
xalign={0}
label={bind(weather, "rainChance").as(r => ` ${r}`)}
- tooltipText={bind(weather, "rainChance").as(r => `${r} chance of rain`)}
+ setup={self =>
+ setupCustomTooltip(
+ self,
+ bind(weather, "rainChance").as(r => `${r} chance of rain`)
+ )
+ }
/>
</box>
</centerbox>