mirror of
https://github.com/subhobhai943/SUB-OS.git
synced 2026-10-27 09:32:34 +00:00
feat(gui,kernel): 1080p HD desktop, polished chrome, ktime clock + live FPS
GUI polish / HD: - Default display mode raised to 1920x1080 (video=1920x1080); make run/vnc use vgamem_mb=64 and -m 512M. The growable heap absorbs the larger backbuffer, shadow and wallpaper (observed: one 16 MB growth to a 48 MB heap). - Wallpaper: three-stop vertical gradient, a soft concentric-frame edge vignette for depth, a finer faint grid, and a centred brand mark. - Window chrome: brighter/saturated titlebar gradient when focused, an accent underline on the active window, and larger/softer drop shadows. - Default session windows are placed and sized for the HD work area. - Live FPS pill in the taskbar tray (green/amber/red by rate); tray widened so FPS + CPU trace + memory badge + clock no longer overlap. Kernel: - kernel/time/ktime.c + include/kernel/ktime.h (new): a unified monotonic high-resolution clock that prefers the HPET (nanosecond) and falls back to the 100 Hz PIT tick. Wired ktime_init() into boot; drives the compositor's FPS sampling. New `ktime` LazyBox applet reports the source and uptime. Verified live (screenshotted): boots to 1920x1080, KTIME reports "source: HPET, nanosecond resolution", the polished desktop renders with the active-window accent and vignette, and the tray shows a live FPS reading. Clean build on x86_64/aarch64/armv8i; 0 panics / 0 OOM. Co-Authored-By: Claude Opus 4.8 <[email protected]> Claude-Session: https://claude.ai/code/session_01Fh5z6V7nGPbHvqVG5p4CXX
This commit is contained in:
1 parent
ef6714a004
commit
4ecf119377
7 files changed
+154
-26
No files matched your search
+12
-3
@@ -616,15 +616,24 @@ void gui_wm_render(void) {
|
||||
gui_window_t* win = gui_wm_get_window(g_window_order[i]);
|
||||
if (!win || !win->visible || win->minimized) continue;
|
||||
|
||||
gui_gfx_draw_shadow(win->x, win->y, win->width, win->height, 6);
|
||||
// A larger, softer drop shadow reads as real depth on the HD desktop.
|
||||
gui_gfx_draw_shadow(win->x, win->y, win->width, win->height,
|
||||
win->active ? 12 : 7);
|
||||
|
||||
uint32_t border = win->active ? GUI_THEME_PRIMARY : GUI_THEME_BORDER;
|
||||
gui_gfx_draw_rect(win->x, win->y, win->width, win->height, border);
|
||||
|
||||
uint32_t top_bg = win->active ? 0xFF1E293B : 0xFF0F172A;
|
||||
uint32_t bot_bg = win->active ? 0xFF0F172A : 0xFF0A0E1A;
|
||||
// Brighter, more saturated titlebar when focused; muted when not.
|
||||
uint32_t top_bg = win->active ? 0xFF24345A : 0xFF141C2E;
|
||||
uint32_t bot_bg = win->active ? 0xFF141E38 : 0xFF0B1120;
|
||||
gui_gfx_draw_gradient_v(win->x + 1, win->y + 1, win->width - 2,
|
||||
GUI_TITLEBAR_HEIGHT - 1, top_bg, bot_bg);
|
||||
|
||||
// Accent underline on the active window's titlebar; plain divider otherwise.
|
||||
if (win->active) {
|
||||
gui_gfx_fill_rect(win->x + 1, win->y + GUI_TITLEBAR_HEIGHT - 1,
|
||||
win->width - 2, 2, GUI_THEME_PRIMARY);
|
||||
}
|
||||
gui_gfx_draw_line(win->x, win->y + GUI_TITLEBAR_HEIGHT,
|
||||
win->x + win->width - 1, win->y + GUI_TITLEBAR_HEIGHT, border);
|
||||
|
||||
|
||||
Reference in new issue
Block a user