Skip to content

Commit 3f5c451

Browse files
committed
design changes
1 parent b2851a8 commit 3f5c451

9 files changed

Lines changed: 62 additions & 35 deletions

File tree

.build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2815
1+
2828

Makefile

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -124,13 +124,6 @@ $(ISO): limine.conf $(LIMINE_TOOL) buildgen $(BUILD_DIR)/kernel.elf disk userspa
124124
@cp $(USERSPACE_DIR)/bin/dofetch/dofetch.elf $(DISK_DIR)/rd/bin/
125125
@cp $(USERSPACE_DIR)/bin/wav/wav.elf $(DISK_DIR)/rd/bin/
126126

127-
# libs arent copied anymore due merge conflicts in prs
128-
#@echo "[MK] copying libs..."
129-
#@cp src/userspace/libs/libfont/libfont.a $(DISK_DIR)/rd/emr/system/libraries/
130-
#@cp src/userspace/libs/emxfb0/libemxfb0.a $(DISK_DIR)/rd/emr/system/libraries/
131-
#@cp src/userspace/libs/libdesktop/libdesktop.a $(DISK_DIR)/rd/emr/system/libraries/
132-
133-
134127
@echo "[MK] creating initrd.cpio..."
135128
@chmod +x tools/initrd.sh
136129
./tools/initrd.sh
@@ -153,7 +146,7 @@ run: $(ISO)
153146
@qemu-system-x86_64 \
154147
-M pc \
155148
-cpu qemu64 \
156-
-m 512M \
149+
-m 1024M \
157150
-netdev user,id=net0 \
158151
-device e1000,netdev=net0 \
159152
-device AC97 \

dsk/rd/emr/system/sysinfo.elf

0 Bytes
Binary file not shown.

dsk/rd/emr/system/system.elf

0 Bytes
Binary file not shown.

emex/ebuild.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#pragma once
22
// this file will always be regenerated when building emexOS
33
// if you want to disable it goto /tools/genbuild.sh
4-
#define ___EMEX_BUILD "26JE.0-7.2815"
4+
#define ___EMEX_BUILD "26JE.0-7.2828"

emex/kernel/user/ulime.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ ulime_proc_t *ulime_proc_create(ulime_t *ulime, u8 *name, u64 entry_point)
9797
proc->code_base = (ulime->user_space_used + 0xFFF) & ~0xFFF;
9898
ulime->user_space_used = proc->code_base + proc->code_size;
9999

100-
proc->heap_size = 10 * 1024 * 1024; // 6 MB
100+
proc->heap_size = 16 * 1024 * 1024; // 16 MB
101101
proc->heap_base = (ulime->user_space_used + 0xFFF) & ~0xFFF;
102102
ulime->user_space_used = proc->heap_base + proc->heap_size;
103103

user/apps/desktop/config/cfg.h

Lines changed: 41 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,7 @@
1919

2020
#define DT_BG 0xFF008080u // win95/98 teal ig
2121

22-
// window frame
23-
#define WIN_BLACK 0xFF000000u
24-
#define WIN_WHITE 0xFFFFFFFFu
25-
#define WIN_FACE 0xFFD4D0C8u
26-
#define WIN_BUTTON 0xFFD4D0C8u
27-
#define WIN_FOCUSED_BG 0xFFA0A0A0u
28-
#define WIN_UNFOCUSED_BG 0xFF000000u
22+
#define DARK_MODE 1
2923

3024
// rubber band selection colors
3125
#define BAND_BORDER 0xCCA8A5A5u // border
@@ -41,21 +35,50 @@
4135
#define TB_ENTRY_EXECLEN 64
4236
#define TB_MAX_ENTRIES 10
4337

44-
#define TB_BACKGROUND 0xFF202020u
45-
#define TB_TOP_BORDER 0xFF707070u
46-
#define TB_BUTTON_BG 0xFF404040u
47-
#define TB_BLACK 0xFF000000u
48-
#define TB_WHITE 0xFFFFFFFFu
49-
#define TB_LIGHT 0xFF808080u
50-
#define TB_SHADOW 0xFF606060u
51-
#define TB_BTN_TOP 0xFF6A89A7u
52-
#define TB_FACE 0xFFD4D0C8u
38+
#if DARK_MODE == 1
39+
#define TB_BACKGROUND 0xFF202020u
40+
#define TB_TOP_BORDER 0xFF707070u
41+
#define TB_BUTTON_BG 0xFF404040u
42+
#define TB_BLACK 0xFF000000u
43+
#define TB_WHITE 0xFFFFFFFFu
44+
#define TB_LIGHT 0xFF808080u
45+
#define TB_SHADOW 0xFF606060u
46+
#define TB_BTN_TOP 0xFF6A89A7u
47+
#define TB_FACE 0xFFD4D0C8u
48+
#define TB_TRANSPARENT 0x00FFFFFFu
49+
50+
#define WIN_BLACK 0xFF000000u
51+
#define WIN_WHITE 0xFF404040u
52+
#define WIN_FACE 0xFFD4D0C8u
53+
#define WIN_BUTTON 0xFFD4D0C8u
54+
#define WIN_FOCUSED_BG 0xFF5F5F5Fu
55+
#define WIN_UNFOCUSED_BG 0xFF5F5F5Fu
56+
#elif DARK_MODE == 0
57+
#define TB_BACKGROUND 0xFFDFDFDFu
58+
#define TB_TOP_BORDER 0xFF8F8F8Fu
59+
#define TB_BUTTON_BG 0xFFBFBFBFu
60+
#define TB_BLACK 0xFFFFFFFFu
61+
#define TB_WHITE 0xFF000000u
62+
#define TB_LIGHT 0xFF7F7F7Fu
63+
#define TB_SHADOW 0xFF9F9F9Fu
64+
#define TB_BTN_TOP 0xFF957658u
65+
#define TB_FACE 0xFF2B2F37u
66+
#define TB_TRANSPARENT 0x00000000u
67+
68+
#define WIN_BLACK 0xFF000000u
69+
#define WIN_WHITE 0xFFFFFFFFu
70+
#define WIN_FACE 0xFFD4D0C8u
71+
#define WIN_BUTTON 0xFFD4D0C8u
72+
#define WIN_FOCUSED_BG 0xFFA0A0A0u
73+
#define WIN_UNFOCUSED_BG 0xFF000000u
74+
#endif
5375

5476
#define DT_ENABLE_RESIZING 0
5577

5678
// window title bar
57-
#define DT_TITLE_ACT 0xFFB0D0C0u // when focused
58-
#define DT_TITLE_INA 0xFF808080u // when unfocused
79+
#define DT_TITLE_ACT 0xFFB0D0C0u // green; when focused
80+
#define DT_TITLE_INA 0xFF808080u // grey ; when unfocused
81+
//#define DT_TITLE_INA 0xFF4F2F3Fu //red
5982
#define DT_TITLE_TXT 0xFFFFFFFFu // text of titlebar
6083

6184
// titlebar config

user/apps/desktop/render/render.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,13 @@ static int slen(const char *s) { int n = 0; while (s[n]) n++; return n; }
2323

2424
static unsigned int stripe(int y, int focused)
2525
{
26-
if (focused) return (y & 1) ? WIN_BLACK : WIN_WHITE;
27-
return (y & 1) ? WIN_UNFOCUSED_BG : WIN_FOCUSED_BG;
26+
#if DARK_MODE == 1
27+
return focused ? DT_TITLE_ACT : DT_TITLE_INA;
28+
#else
29+
if (focused) return (y & 1) ? WIN_BLACK : WIN_WHITE;
30+
31+
return (y & 1) ? WIN_UNFOCUSED_BG : WIN_FOCUSED_BG;
32+
#endif
2833
}
2934

3035
static void buf_char(int bx, char c, unsigned int fg, unsigned int bg, int frow)

user/apps/desktop/taskbar/taskbar.c

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -161,11 +161,16 @@ void taskbar_draw(int mx, int my, int btn_down)
161161
unsigned int col = press ? TB_BTN_TOP : TB_LIGHT;
162162

163163
comp_fill(bx, by, TB_BTN_W, TB_BORDER_W, col);
164-
//comp_fill(bx, by + bh - TB_BORDER_W, TB_BTN_W, TB_BORDER_W, col);
165-
//comp_fill(bx, by, TB_BORDER_W, bh, col);
166-
//comp_fill(bx + TB_BTN_W - TB_BORDER_W, by, TB_BORDER_W, bh, col);
164+
comp_fill(bx, by + bh - TB_BORDER_W, TB_BTN_W, TB_BORDER_W, col);
165+
comp_fill(bx, by, TB_BORDER_W, bh, col);
166+
comp_fill(bx + TB_BTN_W - TB_BORDER_W, by, TB_BORDER_W, bh, col);
167167

168168
comp_fill(bx, by, TB_BTN_W, bh, TB_BUTTON_BG);
169+
170+
if (hov || press)
171+
{
172+
comp_fill(bx, by, TB_BTN_W, 2, TB_TOP_BORDER);
173+
}
169174
}
170175
}
171176

@@ -185,7 +190,8 @@ void taskbar_draw(int mx, int my, int btn_down)
185190
uint16_t bits = font_glyph(FONT8X12_BOLD, c, row);
186191
for (int col = 0; col < fw; col++)
187192
{
188-
unsigned int color = (bits & (1u << col)) ? TB_WHITE : TB_BUTTON_BG;
193+
unsigned int bg_col = (hov || press) ? TB_BUTTON_BG : TB_BACKGROUND;
194+
unsigned int color = (bits & (1u << col)) ? TB_WHITE : bg_col;
189195
comp_set(tx + ci * fw + col, ty + row, color);
190196
}
191197
}

0 commit comments

Comments
 (0)