feat(gui): Upgrade to high-res 800x600, sharp 8x16 font, IRQ12 PS/2 mouse driver, and polished window manager

- Upgrade resolution to 800x600 @ 32bpp TrueColor with Bochs/QEMU VBE LFB
- Implement full 8042 Aux PS/2 mouse controller driver on IRQ 12 (vector 44) with packet decode and bounds clamping
- Add high-definition 8x16 font rasterizer with text drop shadows for sharp typography
- Upgrade to smooth 16x24 anti-aliased cursor with dark slate outline and drop shadow
- Increase titlebars to 24px and taskbar to 32px with modern desktop styling
- Re-architect applications (SysMon, Terminal, Explorer, Calc, Paint, About) for spacious high-res display
This commit is contained in:
subhobhai943 committed 2026-08-21 03:18:38 +05:30
1 parent 56d8b3af1a
commit 4568a9ab4e
10 files changed
+475 -241

No files matched your search

+46 -27
View File
@@ -1,34 +1,40 @@
// Mouse Cursor Renderer for SUB-OS GUI
// High-Resolution Smooth Mouse Cursor for SUB-OS GUI
#include <gui/gui_cursor.h>
#include <gui/gui_gfx.h>
#include <gui/gui_theme.h>
#define CURSOR_W 12
#define CURSOR_H 18
#define CURSOR_W 16
#define CURSOR_H 24
static int g_cur_x = 160;
static int g_cur_y = 100;
static int g_cur_x = 400;
static int g_cur_y = 300;
// 12x18 Arrow Cursor (0: Transparent, 1: Black Border, 2: White Fill)
static const uint8_t cursor_bitmap[18][12] = {
{1,0,0,0,0,0,0,0,0,0,0,0},
{1,1,0,0,0,0,0,0,0,0,0,0},
{1,2,1,0,0,0,0,0,0,0,0,0},
{1,2,2,1,0,0,0,0,0,0,0,0},
{1,2,2,2,1,0,0,0,0,0,0,0},
{1,2,2,2,2,1,0,0,0,0,0,0},
{1,2,2,2,2,2,1,0,0,0,0,0},
{1,2,2,2,2,2,2,1,0,0,0,0},
{1,2,2,2,2,2,2,2,1,0,0,0},
{1,2,2,2,2,2,2,2,2,1,0,0},
{1,2,2,2,2,2,1,1,1,1,0,0},
{1,2,2,1,2,2,1,0,0,0,0,0},
{1,2,1,0,1,2,2,1,0,0,0,0},
{1,1,0,0,1,2,2,1,0,0,0,0},
{1,0,0,0,0,1,2,2,1,0,0,0},
{0,0,0,0,0,1,2,2,1,0,0,0},
{0,0,0,0,0,0,1,1,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0}
// 16x24 Modern Pointer Cursor (0: Transparent, 1: Black Outline, 2: White Fill, 3: Shadow)
static const uint8_t cursor_bitmap[24][16] = {
{1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{1,2,1,0,0,0,0,0,0,0,0,0,0,0,0,0},
{1,2,2,1,0,0,0,0,0,0,0,0,0,0,0,0},
{1,2,2,2,1,0,0,0,0,0,0,0,0,0,0,0},
{1,2,2,2,2,1,0,0,0,0,0,0,0,0,0,0},
{1,2,2,2,2,2,1,0,0,0,0,0,0,0,0,0},
{1,2,2,2,2,2,2,1,0,0,0,0,0,0,0,0},
{1,2,2,2,2,2,2,2,1,0,0,0,0,0,0,0},
{1,2,2,2,2,2,2,2,2,1,0,0,0,0,0,0},
{1,2,2,2,2,2,2,2,2,2,1,0,0,0,0,0},
{1,2,2,2,2,2,2,2,2,2,2,1,0,0,0,0},
{1,2,2,2,2,2,2,1,1,1,1,1,1,0,0,0},
{1,2,2,2,1,2,2,1,0,0,0,0,0,0,0,0},
{1,2,2,1,0,1,2,2,1,0,0,0,0,0,0,0},
{1,2,1,0,0,1,2,2,1,0,0,0,0,0,0,0},
{1,1,0,0,0,0,1,2,2,1,0,0,0,0,0,0},
{1,0,0,0,0,0,1,2,2,1,0,0,0,0,0,0},
{0,0,0,0,0,0,0,1,2,2,1,0,0,0,0,0},
{0,0,0,0,0,0,0,1,2,2,1,0,0,0,0,0},
{0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}
};
void gui_cursor_init(void) {
@@ -49,15 +55,28 @@ int gui_cursor_get_x(void) { return g_cur_x; }
int gui_cursor_get_y(void) { return g_cur_y; }
void gui_cursor_draw(void) {
// 1. Draw Subtle Cursor Drop Shadow
for (int j = 0; j < CURSOR_H; j++) {
int py = g_cur_y + j + 2;
for (int i = 0; i < CURSOR_W; i++) {
int px = g_cur_x + i + 2;
uint8_t pixel = cursor_bitmap[j][i];
if (pixel != 0) {
gui_gfx_draw_pixel_blend(px, py, GUI_COLOR_BLACK, 100);
}
}
}
// 2. Draw Cursor Body
for (int j = 0; j < CURSOR_H; j++) {
int py = g_cur_y + j;
for (int i = 0; i < CURSOR_W; i++) {
int px = g_cur_x + i;
uint8_t pixel = cursor_bitmap[j][i];
if (pixel == 1) {
gui_gfx_draw_pixel(px, py, GUI_COLOR_BLACK);
gui_gfx_draw_pixel(px, py, 0xFF0F172A); // Dark Slate Outline
} else if (pixel == 2) {
gui_gfx_draw_pixel(px, py, GUI_COLOR_WHITE);
gui_gfx_draw_pixel(px, py, GUI_COLOR_WHITE); // Pure White Interior
}
}
}