mirror of
https://github.com/tiennm99/claude-code-usage-bubble.git
synced 2026-09-02 22:17:28 +00:00
feat: threshold balloons + dark/light auto-follow
- Threshold balloons fire the cycle utilization crosses 80% or 95%
on either provider, with the title showing "{Provider} · {N}%" and
body translated per shipped locale. Reuses the existing
BALLOON_COOLDOWN so notifications stay calm.
- Dark/light auto-follow: bubble's WM_SETTINGCHANGE handler now calls
app::recheck_theme(), which re-reads HKCU\…\Personalize, updates
state.is_dark if changed, and triggers a UI repaint + tray refresh.
Windows posts WM_SETTINGCHANGE to every top-level window when the
user toggles light/dark in Settings, so the bubble repaints in
near-real-time.
- Adds 2 new i18n keys (threshold_80_body, threshold_95_body) across
all eight shipped locales.
Bumps version to 0.1.5.
This commit is contained in:
+6
-3
@@ -478,10 +478,13 @@ unsafe extern "system" fn wnd_proc(
|
||||
LRESULT(0)
|
||||
}
|
||||
WM_SETTINGCHANGE => {
|
||||
// Taskbar move / auto-hide toggle / DPI change all post this.
|
||||
// Just re-clamp into the new work area so the bubble can't end up
|
||||
// hidden behind the new taskbar position.
|
||||
// Taskbar move / auto-hide toggle / DPI change / theme toggle
|
||||
// all post this. Re-clamp into the new work area (bubble must
|
||||
// not end up hidden behind the new taskbar position) and ask
|
||||
// the app to re-read the light/dark setting — Windows fires
|
||||
// this message when the user flips the OS theme in Settings.
|
||||
clamp_into_work_area(hwnd);
|
||||
crate::app::recheck_theme();
|
||||
LRESULT(0)
|
||||
}
|
||||
WM_DESTROY => {
|
||||
|
||||
Reference in New Issue
Block a user