From 09d4e4810803f6679ee9f2b44f8e0880a1197105 Mon Sep 17 00:00:00 2001
From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>
Date: Sun, 9 Feb 2025 17:16:53 +1100
Subject: tooltip: ensure fully visible

---
 src/modules/popdowns/sideright.tsx | 16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)

(limited to 'src/modules/popdowns/sideright.tsx')

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>
-- 
cgit v1.2.3-freya

