feat: improve session switching, fractional DPI/GTK theming, XDG launcher, CPU/RAM status, and power policy
This commit is contained in:
1 parent
72b05b650e
commit
07d9134d2d
28 files changed
+2670
-302
No files matched your search
@@ -135,13 +135,18 @@ static void apply_scale_now(disp_state_t *st, const char *scale_arg, int touch_o
|
||||
snprintf(sbuf, sizeof(sbuf), "%s", scale_arg);
|
||||
int t = (touch_override >= 0) ? touch_override : (st->touch_mode ? 1 : 0);
|
||||
snprintf(tbuf, sizeof(tbuf), "--touch=%d", t);
|
||||
unsetenv("ANODE_SCALE");
|
||||
unsetenv("ANODE_TOUCH");
|
||||
const char *av[] = {"anode-apply-scale", sbuf, tbuf, NULL};
|
||||
if (anode_run_cmd_timeout(av, NULL, 0, 5000) == 0) {
|
||||
gemui_theme_reload(st->app);
|
||||
const gemui_theme_t *th = gemui_theme(st->app);
|
||||
st->scale = th ? th->scale : st->scale;
|
||||
st->touch_mode = th ? th->touch_mode : (t != 0);
|
||||
gemui_show_toast(st->app, "Display scale updated", 1800);
|
||||
char msg[64];
|
||||
snprintf(msg, sizeof(msg), "Display scale: %.2fx (%d DPI)",
|
||||
st->scale, th ? th->dpi : (int)(96.0 * st->scale + 0.5));
|
||||
gemui_show_toast(st->app, msg, 1800);
|
||||
} else {
|
||||
gemui_show_toast(st->app, "Scale update failed", 2000);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user