feat: add top panel widgets

This commit is contained in:
daniel committed 2026-11-11 15:03:26 +01:00
1 parent 352c1307fe
commit b8085e0e2a
14 files changed
+1016 -47

No files matched your search

+2 -2
View File
@@ -40,9 +40,9 @@ struct CatalogBuiltinPage {
inline constexpr CatalogBuiltinPage kCatalogDesktopSettings = {
"desktop-settings", "Desktop Settings", "0:/os/icons/preferences-desktop-apps.svg",
"Personalization", "Wallpaper, accent color, panel and clock",
"Personalization", "Wallpaper, accent color, panel, widgets and clock",
"background wallpaper image accent color colour theme appearance panel "
"shadows clock 24-hour scale"
"shadows clock 24-hour scale top bar widgets cpu memory temperature weather"
};
inline constexpr CatalogBuiltinPage kCatalogUserManagement = {
"user-management", "User Management", "0:/os/icons/user-home.svg",
+8
View File
@@ -100,6 +100,14 @@ struct DesktopSettings {
bool clock_24h; // 24-hour clock format
int ui_scale; // 0=Small, 1=Default, 2=Large
int tz_offset_minutes; // timezone offset from UTC in minutes
// Top bar widgets (desktop/widgets.cpp): the ids pinned to the panel, in
// left-to-right order, plus the options individual widgets read.
static constexpr int MAX_PANEL_WIDGETS = 8;
static constexpr int PANEL_WIDGET_ID_CAP = 16;
char panel_widgets[MAX_PANEL_WIDGETS][PANEL_WIDGET_ID_CAP];
int panel_widget_count;
bool weather_fahrenheit; // weather widget unit
};
// The standard folders in a home directory, in display order, with their