Bring up SSD2092 display/touch, USB NCM, HiDPI XLibre/DWM, and USB charging
This commit is contained in:
1 parent
034c1f61b1
commit
9db15e30ce
150 files changed
+2356
-446
No files matched your search
@@ -195,7 +195,7 @@ int main(int argc, char **argv) {
|
||||
snprintf(st.state_label, sizeof(st.state_label), "Connecting Voice Call...");
|
||||
}
|
||||
|
||||
st.app = gemui_create("geminux-callscreen", "Geminux Voice Call", 1600, 860, false);
|
||||
st.app = gemui_create("geminux-callscreen", "Geminux Voice Call", 1900, 920, false);
|
||||
if (!st.app) return 1;
|
||||
|
||||
gemui_handlers_t h = { .on_draw = on_draw, .on_key = on_key, .on_ptr = on_ptr };
|
||||
|
||||
@@ -429,7 +429,8 @@ static void on_draw(gemui_app_t *app, cairo_t *cr, int w, int h, void *ud) {
|
||||
gemui_draw_header(app, cr, "\xef\x80\xb0", "Geminux Camera", badge);
|
||||
|
||||
int pad = 20;
|
||||
gemui_rect_t vf = {pad, 80, w - 260 - pad * 3, h - 100};
|
||||
int rw = 320;
|
||||
gemui_rect_t vf = {pad, 92, w - rw - pad * 3, h - 112};
|
||||
gemui_fill_round(cr, vf, 14, t->bg_overlay);
|
||||
gemui_stroke_round(cr, vf, 14, 2.0, st->recording ? t->danger : t->border);
|
||||
|
||||
@@ -448,25 +449,24 @@ static void on_draw(gemui_app_t *app, cairo_t *cr, int w, int h, void *ud) {
|
||||
cairo_paint(cr);
|
||||
cairo_restore(cr);
|
||||
} else {
|
||||
gemui_draw_text(cr, t, (gemui_rect_t){vf.x + 24, vf.y + vf.h / 2 - 40, vf.w - 48, 40},
|
||||
gemui_draw_text(cr, t, (gemui_rect_t){vf.x + 24, vf.y + vf.h / 2 - 48, vf.w - 48, 48},
|
||||
"Camera Stream Unavailable", 4, true, GEMUI_ALIGN_CENTER, t->fg_bright);
|
||||
gemui_draw_text(cr, t, (gemui_rect_t){vf.x + 24, vf.y + vf.h / 2 + 8, vf.w - 48, 36},
|
||||
gemui_draw_text(cr, t, (gemui_rect_t){vf.x + 24, vf.y + vf.h / 2 + 10, vf.w - 48, 42},
|
||||
"Waiting for hi556 / mt6797-seninf V4L2 /dev/video* device",
|
||||
-2, false, GEMUI_ALIGN_CENTER, t->fg_muted);
|
||||
}
|
||||
|
||||
int rx = vf.x + vf.w + pad;
|
||||
int rw = 260;
|
||||
gemui_draw_button(app, cr, (gemui_rect_t){rx, 96, rw, 92},
|
||||
gemui_draw_button(app, cr, (gemui_rect_t){rx, 96, rw, 96},
|
||||
"Photo (JPEG)", HIT_SHUTTER, 0, true, false, false);
|
||||
gemui_draw_button(app, cr, (gemui_rect_t){rx, 208, rw, 92},
|
||||
gemui_draw_button(app, cr, (gemui_rect_t){rx, 210, rw, 96},
|
||||
st->recording ? "Stop AVI" : "Record AVI", HIT_RECORD, 0, false, st->recording, false);
|
||||
gemui_draw_button(app, cr, (gemui_rect_t){rx, 320, rw, 76},
|
||||
gemui_draw_button(app, cr, (gemui_rect_t){rx, 324, rw, 80},
|
||||
"Switch Sensor", HIT_SWITCH, 0, false, false, false);
|
||||
|
||||
gemui_draw_text(cr, t, (gemui_rect_t){rx, 430, rw, 36},
|
||||
gemui_draw_text(cr, t, (gemui_rect_t){rx, 430, rw, 40},
|
||||
st->last_file[0] ? "Last Saved:" : "", -3, true, GEMUI_ALIGN_LEFT, t->fg_muted);
|
||||
gemui_draw_text(cr, t, (gemui_rect_t){rx, 466, rw, 36},
|
||||
gemui_draw_text(cr, t, (gemui_rect_t){rx, 474, rw, 40},
|
||||
st->last_file[0] ? st->last_file : "Space: Shutter",
|
||||
-3, false, GEMUI_ALIGN_LEFT, t->accent);
|
||||
}
|
||||
@@ -514,7 +514,7 @@ int main(void) {
|
||||
st.vfd = -1;
|
||||
discover_cameras(&st);
|
||||
|
||||
st.app = gemui_create("geminux-camera", "Geminux Camera", 1640, 900, false);
|
||||
st.app = gemui_create("geminux-camera", "Geminux Camera", 1920, 940, false);
|
||||
if (!st.app) return 1;
|
||||
if (st.num_devs > 0) open_camera_idx(&st, 0);
|
||||
|
||||
|
||||
@@ -124,18 +124,18 @@ static void on_draw(gemui_app_t *app, cairo_t *cr, int w, int h, void *ud) {
|
||||
gemui_draw_header(app, cr, "\xef\x8a\xb9", "Geminux Contacts", badge);
|
||||
|
||||
int pad = 20;
|
||||
int top = 80;
|
||||
int top = 92;
|
||||
int left_w = (w - pad * 3) / 2;
|
||||
int right_x = pad * 2 + left_w;
|
||||
int right_w = w - right_x - pad;
|
||||
|
||||
gemui_draw_input(app, cr, (gemui_rect_t){pad, top, left_w - 148, 60},
|
||||
gemui_draw_input(app, cr, (gemui_rect_t){pad, top, left_w - 172, 68},
|
||||
"Search name or number...", st->search, false,
|
||||
st->focus == 0, HIT_SEARCH, 0);
|
||||
gemui_draw_button(app, cr, (gemui_rect_t){pad + left_w - 136, top, 136, 60},
|
||||
gemui_draw_button(app, cr, (gemui_rect_t){pad + left_w - 160, top, 160, 68},
|
||||
"+ New", HIT_NEW, 0, true, false, false);
|
||||
|
||||
gemui_rect_t list = {pad, top + 74, left_w, h - (top + 74) - pad};
|
||||
gemui_rect_t list = {pad, top + 82, left_w, h - (top + 82) - pad};
|
||||
gemui_fill_round(cr, list, 12, t->bg_bar);
|
||||
gemui_stroke_round(cr, list, 12, 1.5, t->border);
|
||||
|
||||
@@ -143,17 +143,17 @@ static void on_draw(gemui_app_t *app, cairo_t *cr, int w, int h, void *ud) {
|
||||
gemui_draw_text(cr, t, list, "No matching contacts", 0, false,
|
||||
GEMUI_ALIGN_CENTER, t->fg_muted);
|
||||
} else {
|
||||
int rh = 72;
|
||||
int rh = 84;
|
||||
for (int i = 0; i < st->num_filtered; i++) {
|
||||
int idx = st->filtered[i];
|
||||
gemui_rect_t rr = {list.x + 10, list.y + 8 + i * rh, list.w - 20, rh - 6};
|
||||
if (rr.y + rr.h > list.y + list.h) break;
|
||||
bool sel = (idx == st->sel_idx);
|
||||
gemui_fill_round(cr, rr, 10, sel ? t->sel_bg : (i % 2 ? t->bg_alt_odd : t->bg_alt_even));
|
||||
gemui_draw_text(cr, t, (gemui_rect_t){rr.x + 14, rr.y + 4, rr.w - 28, 32},
|
||||
gemui_draw_text(cr, t, (gemui_rect_t){rr.x + 14, rr.y + 4, rr.w - 28, 38},
|
||||
st->items[idx].name, -1, true, GEMUI_ALIGN_LEFT,
|
||||
sel ? t->sel_fg : t->fg_bright);
|
||||
gemui_draw_text(cr, t, (gemui_rect_t){rr.x + 14, rr.y + 34, rr.w - 28, 28},
|
||||
gemui_draw_text(cr, t, (gemui_rect_t){rr.x + 14, rr.y + 42, rr.w - 28, 34},
|
||||
st->items[idx].number, -2, false, GEMUI_ALIGN_LEFT,
|
||||
sel ? t->sel_fg : t->accent_alt);
|
||||
gemui_hit_add(app, rr, HIT_ROW, idx);
|
||||
@@ -165,31 +165,31 @@ static void on_draw(gemui_app_t *app, cairo_t *cr, int w, int h, void *ud) {
|
||||
gemui_fill_round(cr, card, 14, t->bg_overlay);
|
||||
gemui_stroke_round(cr, card, 14, 1.5, t->border);
|
||||
|
||||
gemui_draw_text(cr, t, (gemui_rect_t){card.x + 24, card.y + 20, card.w - 48, 36},
|
||||
gemui_draw_text(cr, t, (gemui_rect_t){card.x + 24, card.y + 20, card.w - 48, 42},
|
||||
st->sel_idx >= 0 ? "Edit Contact" : "New Contact",
|
||||
4, true, GEMUI_ALIGN_LEFT, t->fg_bright);
|
||||
|
||||
gemui_draw_text(cr, t, (gemui_rect_t){card.x + 24, card.y + 74, card.w - 48, 30},
|
||||
gemui_draw_text(cr, t, (gemui_rect_t){card.x + 24, card.y + 82, card.w - 48, 36},
|
||||
"Full Name", -2, false, GEMUI_ALIGN_LEFT, t->fg_muted);
|
||||
gemui_draw_input(app, cr, (gemui_rect_t){card.x + 24, card.y + 108, card.w - 48, 66},
|
||||
gemui_draw_input(app, cr, (gemui_rect_t){card.x + 24, card.y + 122, card.w - 48, 72},
|
||||
"Enter contact name", st->edit_name, false,
|
||||
st->focus == 1, HIT_NAME, 0);
|
||||
|
||||
gemui_draw_text(cr, t, (gemui_rect_t){card.x + 24, card.y + 194, card.w - 48, 30},
|
||||
gemui_draw_text(cr, t, (gemui_rect_t){card.x + 24, card.y + 212, card.w - 48, 36},
|
||||
"Phone Number", -2, false, GEMUI_ALIGN_LEFT, t->fg_muted);
|
||||
gemui_draw_input(app, cr, (gemui_rect_t){card.x + 24, card.y + 228, card.w - 48, 66},
|
||||
gemui_draw_input(app, cr, (gemui_rect_t){card.x + 24, card.y + 252, card.w - 48, 72},
|
||||
"+1...", st->edit_phone, false,
|
||||
st->focus == 2, HIT_PHONE, 0);
|
||||
|
||||
int bw = (card.w - 60) / 2;
|
||||
gemui_draw_button(app, cr, (gemui_rect_t){card.x + 24, card.y + 324, bw, 72},
|
||||
gemui_draw_button(app, cr, (gemui_rect_t){card.x + 24, card.y + 352, bw, 78},
|
||||
"Save Contact", HIT_SAVE, 0, true, false, false);
|
||||
gemui_draw_button(app, cr, (gemui_rect_t){card.x + 36 + bw, card.y + 324, bw, 72},
|
||||
gemui_draw_button(app, cr, (gemui_rect_t){card.x + 36 + bw, card.y + 352, bw, 78},
|
||||
"Delete", HIT_DEL, 0, false, false, false);
|
||||
|
||||
gemui_draw_button(app, cr, (gemui_rect_t){card.x + 24, card.y + 420, bw, 76},
|
||||
gemui_draw_button(app, cr, (gemui_rect_t){card.x + 24, card.y + 452, bw, 82},
|
||||
"Call Contact", HIT_CALL, 0, false, st->edit_phone[0] != '\0', false);
|
||||
gemui_draw_button(app, cr, (gemui_rect_t){card.x + 36 + bw, card.y + 420, bw, 76},
|
||||
gemui_draw_button(app, cr, (gemui_rect_t){card.x + 36 + bw, card.y + 452, bw, 82},
|
||||
"Send SMS", HIT_SMS, 0, false, false, false);
|
||||
}
|
||||
|
||||
@@ -290,7 +290,7 @@ int main(void) {
|
||||
load_contacts(&st);
|
||||
if (st.num_items > 0) select_contact(&st, 0);
|
||||
|
||||
st.app = gemui_create("geminux-contacts", "Geminux Contacts", 1640, 900, false);
|
||||
st.app = gemui_create("geminux-contacts", "Geminux Contacts", 1920, 940, false);
|
||||
if (!st.app) return 1;
|
||||
|
||||
gemui_handlers_t h = { .on_draw = on_draw, .on_key = on_key, .on_ptr = on_ptr };
|
||||
|
||||
@@ -98,45 +98,45 @@ static void on_draw(gemui_app_t *app, cairo_t *cr, int w, int h, void *ud) {
|
||||
int pad = 24;
|
||||
int cw = (w - pad * 2);
|
||||
|
||||
st->bri_rect = (gemui_rect_t){pad, 88, cw, 92};
|
||||
st->bri_rect = (gemui_rect_t){pad, 92, cw, 104};
|
||||
char btxt[32];
|
||||
double bnorm = st->bl_max > 0 ? (double)st->bl_cur / st->bl_max : 0.5;
|
||||
snprintf(btxt, sizeof(btxt), "%d%%", (int)(bnorm * 100.0 + 0.5));
|
||||
gemui_draw_slider(app, cr, st->bri_rect, "Display Backlight", bnorm, btxt, HIT_BRI, 0, false);
|
||||
|
||||
st->vol_rect = (gemui_rect_t){pad, 196, cw, 92};
|
||||
st->vol_rect = (gemui_rect_t){pad, 210, cw, 104};
|
||||
char vtxt[32];
|
||||
snprintf(vtxt, sizeof(vtxt), "%d%%", st->vol_pct);
|
||||
gemui_draw_slider(app, cr, st->vol_rect, "Master Audio Volume", st->vol_pct / 100.0, vtxt, HIT_VOL, 0, false);
|
||||
|
||||
gemui_draw_text(cr, t, (gemui_rect_t){pad, 308, cw, 34},
|
||||
gemui_draw_text(cr, t, (gemui_rect_t){pad, 330, cw, 40},
|
||||
"MT6797X Power Profile (A72 Big Cluster + Schedutil)",
|
||||
-1, true, GEMUI_ALIGN_LEFT, t->fg_bright);
|
||||
int pw = (cw - 24) / 3;
|
||||
static const char *profs[3] = {"Eco (A53 Only)", "Balanced", "Performance (10-Core)"};
|
||||
for (int i = 0; i < 3; i++) {
|
||||
gemui_draw_button(app, cr, (gemui_rect_t){pad + i * (pw + 12), 348, pw, 72},
|
||||
gemui_draw_button(app, cr, (gemui_rect_t){pad + i * (pw + 12), 376, pw, 78},
|
||||
profs[i], HIT_PROF, i, false, st->profile == i, false);
|
||||
}
|
||||
|
||||
gemui_draw_text(cr, t, (gemui_rect_t){pad, 444, cw, 34},
|
||||
gemui_draw_text(cr, t, (gemui_rect_t){pad, 472, cw, 40},
|
||||
"AW9120 LED Strip Indicator", -1, true, GEMUI_ALIGN_LEFT, t->fg_bright);
|
||||
int lw = (cw - 36) / 4;
|
||||
static const char *leds[4] = {"Off", "Cyan Pulse", "Green OK", "Amber Warn"};
|
||||
for (int i = 0; i < 4; i++) {
|
||||
gemui_draw_button(app, cr, (gemui_rect_t){pad + i * (lw + 12), 484, lw, 68},
|
||||
gemui_draw_button(app, cr, (gemui_rect_t){pad + i * (lw + 12), 518, lw, 76},
|
||||
leds[i], HIT_LED, i, false, false, false);
|
||||
}
|
||||
|
||||
int ay = h - 104;
|
||||
int ay = h - 106;
|
||||
int aw = (cw - 36) / 4;
|
||||
gemui_draw_button(app, cr, (gemui_rect_t){pad, ay, aw, 78},
|
||||
gemui_draw_button(app, cr, (gemui_rect_t){pad, ay, aw, 82},
|
||||
"Lock Screen", HIT_LOCK, 0, false, false, false);
|
||||
gemui_draw_button(app, cr, (gemui_rect_t){pad + aw + 12, ay, aw, 78},
|
||||
gemui_draw_button(app, cr, (gemui_rect_t){pad + aw + 12, ay, aw, 82},
|
||||
"Suspend Now", HIT_SUSPEND, 0, true, false, false);
|
||||
gemui_draw_button(app, cr, (gemui_rect_t){pad + 2 * (aw + 12), ay, aw, 78},
|
||||
gemui_draw_button(app, cr, (gemui_rect_t){pad + 2 * (aw + 12), ay, aw, 82},
|
||||
"Reboot", HIT_REBOOT, 0, false, false, false);
|
||||
gemui_draw_button(app, cr, (gemui_rect_t){pad + 3 * (aw + 12), ay, aw, 78},
|
||||
gemui_draw_button(app, cr, (gemui_rect_t){pad + 3 * (aw + 12), ay, aw, 82},
|
||||
"Power Off", HIT_POWER, 0, false, false, false);
|
||||
}
|
||||
|
||||
@@ -210,7 +210,7 @@ int main(void) {
|
||||
st.profile = 1;
|
||||
refresh_hw(&st);
|
||||
|
||||
st.app = gemui_create("geminux-control", "Geminux Control Center", 1480, 720, false);
|
||||
st.app = gemui_create("geminux-control", "Geminux Control Center", 1880, 900, false);
|
||||
if (!st.app) return 1;
|
||||
|
||||
gemui_handlers_t h = { .on_draw = on_draw, .on_key = on_key, .on_ptr = on_ptr };
|
||||
|
||||
@@ -120,21 +120,21 @@ static void on_draw(gemui_app_t *app, cairo_t *cr, int w, int h, void *ud) {
|
||||
gemui_draw_header(app, cr, "\xef\x82\x95", "Geminux Dialer", st->modem_status);
|
||||
|
||||
int pad = 20;
|
||||
int top = 80;
|
||||
int top = 92;
|
||||
int left_w = (w - pad * 3) / 2;
|
||||
int right_x = pad * 2 + left_w;
|
||||
int right_w = w - right_x - pad;
|
||||
|
||||
/* Number input box */
|
||||
gemui_rect_t disp = {pad, top, left_w, 80};
|
||||
gemui_rect_t disp = {pad, top, left_w, 88};
|
||||
gemui_fill_round(cr, disp, 12, t->bg_input_focus);
|
||||
gemui_stroke_round(cr, disp, 12, 2.0, t->accent);
|
||||
gemui_draw_text(cr, t, (gemui_rect_t){disp.x + 18, disp.y, disp.w - 130, disp.h},
|
||||
gemui_draw_text(cr, t, (gemui_rect_t){disp.x + 18, disp.y, disp.w - 140, disp.h},
|
||||
st->number[0] ? st->number : "Type or tap number...",
|
||||
10, true, GEMUI_ALIGN_LEFT,
|
||||
st->number[0] ? t->fg_bright : t->fg_muted);
|
||||
|
||||
gemui_rect_t clr = {disp.x + disp.w - 108, disp.y + 10, 96, 60};
|
||||
gemui_rect_t clr = {disp.x + disp.w - 116, disp.y + 12, 104, 64};
|
||||
gemui_draw_button(app, cr, clr, "CLR", HIT_CLEAR, 0, false, false, false);
|
||||
|
||||
/* DTMF 4x3 keypad + Back/Dial action bar */
|
||||
@@ -144,9 +144,9 @@ static void on_draw(gemui_app_t *app, cairo_t *cr, int w, int h, void *ud) {
|
||||
"7 PQRS", "8 TUV", "9 WXYZ",
|
||||
"*", "0 +", "#"
|
||||
};
|
||||
int kp_top = top + 96;
|
||||
int btn_h = (h - kp_top - 104 - 3 * 12) / 4;
|
||||
if (btn_h < 64) btn_h = 64;
|
||||
int kp_top = top + 104;
|
||||
int btn_h = (h - kp_top - 110 - 3 * 12) / 4;
|
||||
if (btn_h < 68) btn_h = 68;
|
||||
int btn_w = (left_w - 2 * 12) / 3;
|
||||
|
||||
for (int i = 0; i < 12; i++) {
|
||||
@@ -161,24 +161,24 @@ static void on_draw(gemui_app_t *app, cairo_t *cr, int w, int h, void *ud) {
|
||||
gemui_draw_button(app, cr, br, keys[i], HIT_DIGIT, i, false, false, false);
|
||||
}
|
||||
|
||||
int act_y = h - 88;
|
||||
int act_y = h - 94;
|
||||
int third = (left_w - 24) / 3;
|
||||
gemui_draw_button(app, cr, (gemui_rect_t){pad, act_y, third, 68},
|
||||
gemui_draw_button(app, cr, (gemui_rect_t){pad, act_y, third, 74},
|
||||
"Backspace", HIT_BACK, 0, false, false, false);
|
||||
gemui_draw_button(app, cr, (gemui_rect_t){pad + third + 12, act_y, third, 68},
|
||||
gemui_draw_button(app, cr, (gemui_rect_t){pad + third + 12, act_y, third, 74},
|
||||
"Send SMS", HIT_SMS, 0, false, false, false);
|
||||
gemui_draw_button(app, cr, (gemui_rect_t){pad + 2 * (third + 12), act_y,
|
||||
left_w - 2 * (third + 12), 68},
|
||||
left_w - 2 * (third + 12), 74},
|
||||
"Call Now", HIT_DIAL, 0, true, false, false);
|
||||
|
||||
/* Right panel: Recents / Contacts tabs */
|
||||
int tab_w = (right_w - 12) / 2;
|
||||
gemui_draw_button(app, cr, (gemui_rect_t){right_x, top, tab_w, 60},
|
||||
gemui_draw_button(app, cr, (gemui_rect_t){right_x, top, tab_w, 66},
|
||||
"Recent Calls", HIT_RECENT, -1, false, st->list_tab == 0, false);
|
||||
gemui_draw_button(app, cr, (gemui_rect_t){right_x + tab_w + 12, top, tab_w, 60},
|
||||
gemui_draw_button(app, cr, (gemui_rect_t){right_x + tab_w + 12, top, tab_w, 66},
|
||||
"Contacts", HIT_CONTACT, -1, false, st->list_tab == 1, false);
|
||||
|
||||
gemui_rect_t list_box = {right_x, top + 74, right_w, h - (top + 74) - 20};
|
||||
gemui_rect_t list_box = {right_x, top + 80, right_w, h - (top + 80) - 20};
|
||||
gemui_fill_round(cr, list_box, 12, t->bg_bar);
|
||||
gemui_stroke_round(cr, list_box, 12, 1.5, t->border);
|
||||
|
||||
@@ -191,20 +191,20 @@ static void on_draw(gemui_app_t *app, cairo_t *cr, int w, int h, void *ud) {
|
||||
return;
|
||||
}
|
||||
|
||||
int row_h = 72;
|
||||
int row_h = 84;
|
||||
int max_rows = (list_box.h - 16) / row_h;
|
||||
for (int i = 0; i < count && i < max_rows; i++) {
|
||||
int idx = (st->list_tab == 0) ? (count - 1 - i) : i;
|
||||
gemui_rect_t rr = {list_box.x + 10, list_box.y + 8 + i * row_h, list_box.w - 20, row_h - 6};
|
||||
bool sel = (idx == st->selected);
|
||||
gemui_fill_round(cr, rr, 10, sel ? t->sel_bg : (i % 2 ? t->bg_alt_odd : t->bg_alt_even));
|
||||
gemui_draw_text(cr, t, (gemui_rect_t){rr.x + 14, rr.y + 4, rr.w - 220, 32},
|
||||
gemui_draw_text(cr, t, (gemui_rect_t){rr.x + 14, rr.y + 4, rr.w - 240, 38},
|
||||
arr[idx].name, -1, true, GEMUI_ALIGN_LEFT,
|
||||
sel ? t->sel_fg : t->fg_bright);
|
||||
gemui_draw_text(cr, t, (gemui_rect_t){rr.x + 14, rr.y + 34, rr.w - 220, 28},
|
||||
gemui_draw_text(cr, t, (gemui_rect_t){rr.x + 14, rr.y + 42, rr.w - 240, 34},
|
||||
arr[idx].number, -2, false, GEMUI_ALIGN_LEFT,
|
||||
sel ? t->sel_fg : t->accent_alt);
|
||||
gemui_draw_text(cr, t, (gemui_rect_t){rr.x + rr.w - 200, rr.y, 186, rr.h},
|
||||
gemui_draw_text(cr, t, (gemui_rect_t){rr.x + rr.w - 220, rr.y, 206, rr.h},
|
||||
arr[idx].detail, -3, false, GEMUI_ALIGN_RIGHT,
|
||||
sel ? t->sel_fg : t->fg_muted);
|
||||
gemui_hit_add(app, rr, (st->list_tab == 0) ? HIT_RECENT : HIT_CONTACT, idx);
|
||||
@@ -299,7 +299,7 @@ int main(int argc, char **argv) {
|
||||
}
|
||||
refresh_state(&st);
|
||||
|
||||
st.app = gemui_create("geminux-dialer", "Geminux Dialer", 1600, 900, false);
|
||||
st.app = gemui_create("geminux-dialer", "Geminux Dialer", 1920, 940, false);
|
||||
if (!st.app) return 1;
|
||||
|
||||
gemui_handlers_t h = { .on_draw = on_draw, .on_key = on_key, .on_ptr = on_ptr };
|
||||
|
||||
@@ -117,36 +117,36 @@ static void on_draw(gemui_app_t *app, cairo_t *cr, int w, int h, void *ud) {
|
||||
strftime(clock_str, sizeof(clock_str), "%H:%M", &tm);
|
||||
strftime(date_str, sizeof(date_str), "%A, %d %B %Y", &tm);
|
||||
|
||||
int cw = 760;
|
||||
int cw = 920;
|
||||
if (cw > w - 80) cw = w - 80;
|
||||
gemui_rect_t card = {(w - cw) / 2, (h - 520) / 2, cw, 520};
|
||||
gemui_rect_t card = {(w - cw) / 2, (h - 620) / 2, cw, 620};
|
||||
gemui_fill_round(cr, card, 18, t->bg_overlay);
|
||||
gemui_stroke_round(cr, card, 18, 2.0, t->border);
|
||||
|
||||
gemui_draw_icon(cr, t, (gemui_rect_t){card.x, card.y + 28, card.w, 52},
|
||||
gemui_draw_icon(cr, t, (gemui_rect_t){card.x, card.y + 32, card.w, 60},
|
||||
"\xef\x80\xa3", 14, GEMUI_ALIGN_CENTER, t->accent);
|
||||
gemui_draw_text(cr, t, (gemui_rect_t){card.x + 24, card.y + 84, card.w - 48, 84},
|
||||
gemui_draw_text(cr, t, (gemui_rect_t){card.x + 24, card.y + 96, card.w - 48, 100},
|
||||
clock_str, 26, true, GEMUI_ALIGN_CENTER, t->fg_bright);
|
||||
gemui_draw_text(cr, t, (gemui_rect_t){card.x + 24, card.y + 172, card.w - 48, 40},
|
||||
gemui_draw_text(cr, t, (gemui_rect_t){card.x + 24, card.y + 204, card.w - 48, 46},
|
||||
date_str, 2, false, GEMUI_ALIGN_CENTER, t->fg_muted);
|
||||
|
||||
char status[128];
|
||||
snprintf(status, sizeof(status), "%s | User: %s", st->bat_text, st->user);
|
||||
gemui_draw_text(cr, t, (gemui_rect_t){card.x + 24, card.y + 220, card.w - 48, 36},
|
||||
gemui_draw_text(cr, t, (gemui_rect_t){card.x + 24, card.y + 256, card.w - 48, 42},
|
||||
status, -1, false, GEMUI_ALIGN_CENTER, t->accent_alt);
|
||||
|
||||
gemui_draw_input(app, cr, (gemui_rect_t){card.x + 48, card.y + 280, card.w - 96, 72},
|
||||
gemui_draw_input(app, cr, (gemui_rect_t){card.x + 48, card.y + 322, card.w - 96, 82},
|
||||
"Type password and press Enter...", st->password, true, true, -1, 0);
|
||||
|
||||
if (st->err_msg[0]) {
|
||||
gemui_draw_text(cr, t, (gemui_rect_t){card.x + 48, card.y + 362, card.w - 96, 36},
|
||||
gemui_draw_text(cr, t, (gemui_rect_t){card.x + 48, card.y + 414, card.w - 96, 42},
|
||||
st->err_msg, -1, true, GEMUI_ALIGN_CENTER, t->danger);
|
||||
}
|
||||
|
||||
int bw = (card.w - 112) / 2;
|
||||
gemui_draw_button(app, cr, (gemui_rect_t){card.x + 48, card.y + 414, bw, 72},
|
||||
gemui_draw_button(app, cr, (gemui_rect_t){card.x + 48, card.y + 474, bw, 84},
|
||||
"Clear", HIT_CLEAR, 0, false, false, false);
|
||||
gemui_draw_button(app, cr, (gemui_rect_t){card.x + 64 + bw, card.y + 414, bw, 72},
|
||||
gemui_draw_button(app, cr, (gemui_rect_t){card.x + 64 + bw, card.y + 474, bw, 84},
|
||||
"Unlock", HIT_UNLOCK, 0, true, false, false);
|
||||
}
|
||||
|
||||
@@ -198,6 +198,17 @@ int main(void) {
|
||||
if (!st.app) return 1;
|
||||
st.grabbed = gemui_grab_input(st.app);
|
||||
|
||||
const char *rfd_s = getenv("GEMINUX_LOCK_READY_FD");
|
||||
if (rfd_s && rfd_s[0]) {
|
||||
int rfd = atoi(rfd_s);
|
||||
if (rfd >= 0) {
|
||||
ssize_t wr = write(rfd, "1", 1);
|
||||
(void)wr;
|
||||
close(rfd);
|
||||
}
|
||||
unsetenv("GEMINUX_LOCK_READY_FD");
|
||||
}
|
||||
|
||||
gemui_handlers_t h = { .on_draw = on_draw, .on_key = on_key, .on_ptr = on_ptr };
|
||||
gemui_set_handlers(st.app, &h, &st);
|
||||
gemui_set_timer_ms(st.app, 1000, on_timer, &st);
|
||||
|
||||
@@ -118,40 +118,40 @@ static void on_draw(gemui_app_t *app, cairo_t *cr, int w, int h, void *ud) {
|
||||
gemui_draw_header(app, cr, "\xef\x87\xab", "Geminux Network & Radios", st->status_text);
|
||||
|
||||
int pad = 20;
|
||||
int top = 80;
|
||||
int top = 92;
|
||||
int tab_w = (w - pad * 2 - 3 * 12) / 4;
|
||||
static const char *tabs[4] = {"Wi-Fi", "4G / CCCI", "Bluetooth", "USB & HDMI"};
|
||||
for (int i = 0; i < 4; i++) {
|
||||
gemui_draw_button(app, cr, (gemui_rect_t){pad + i * (tab_w + 12), top, tab_w, 60},
|
||||
gemui_draw_button(app, cr, (gemui_rect_t){pad + i * (tab_w + 12), top, tab_w, 66},
|
||||
tabs[i], HIT_TAB, i, false, st->tab == i, false);
|
||||
}
|
||||
|
||||
int cy = top + 76;
|
||||
int cy = top + 82;
|
||||
int ctrl_w = (w - pad * 2 - 12) / 2;
|
||||
if (st->tab == 0) {
|
||||
gemui_draw_toggle(app, cr, (gemui_rect_t){pad, cy, ctrl_w, 66},
|
||||
gemui_draw_toggle(app, cr, (gemui_rect_t){pad, cy, ctrl_w, 72},
|
||||
"Wi-Fi Radio", st->wifi_on, HIT_TOGGLE, 0, false);
|
||||
gemui_draw_button(app, cr, (gemui_rect_t){pad + ctrl_w + 12, cy, ctrl_w, 66},
|
||||
gemui_draw_button(app, cr, (gemui_rect_t){pad + ctrl_w + 12, cy, ctrl_w, 72},
|
||||
"Rescan Networks", HIT_ACTION, 0, true, false, false);
|
||||
} else if (st->tab == 1) {
|
||||
gemui_draw_toggle(app, cr, (gemui_rect_t){pad, cy, ctrl_w, 66},
|
||||
gemui_draw_toggle(app, cr, (gemui_rect_t){pad, cy, ctrl_w, 72},
|
||||
"MT6797 Modem Active", st->cellular_on, HIT_TOGGLE, 1, false);
|
||||
gemui_draw_button(app, cr, (gemui_rect_t){pad + ctrl_w + 12, cy, ctrl_w, 66},
|
||||
gemui_draw_button(app, cr, (gemui_rect_t){pad + ctrl_w + 12, cy, ctrl_w, 72},
|
||||
"Reset CCCI Modem", HIT_ACTION, 1, false, false, false);
|
||||
} else if (st->tab == 2) {
|
||||
gemui_draw_toggle(app, cr, (gemui_rect_t){pad, cy, ctrl_w, 66},
|
||||
gemui_draw_toggle(app, cr, (gemui_rect_t){pad, cy, ctrl_w, 72},
|
||||
"Bluetooth Radio", st->bt_on, HIT_TOGGLE, 2, false);
|
||||
gemui_draw_button(app, cr, (gemui_rect_t){pad + ctrl_w + 12, cy, ctrl_w, 66},
|
||||
gemui_draw_button(app, cr, (gemui_rect_t){pad + ctrl_w + 12, cy, ctrl_w, 72},
|
||||
"Scan 10s", HIT_ACTION, 2, true, false, false);
|
||||
} else {
|
||||
gemui_draw_toggle(app, cr, (gemui_rect_t){pad, cy, ctrl_w, 66},
|
||||
gemui_draw_toggle(app, cr, (gemui_rect_t){pad, cy, ctrl_w, 72},
|
||||
"SiI9024 HDMI Extend", st->hdmi_on, HIT_TOGGLE, 3, false);
|
||||
gemui_draw_button(app, cr, (gemui_rect_t){pad + ctrl_w + 12, cy, ctrl_w, 66},
|
||||
gemui_draw_button(app, cr, (gemui_rect_t){pad + ctrl_w + 12, cy, ctrl_w, 72},
|
||||
"Mirror Primary Display", HIT_ACTION, 3, true, false, false);
|
||||
}
|
||||
|
||||
int foot_h = (st->tab == 0) ? 84 : 0;
|
||||
gemui_rect_t box = {pad, cy + 80, w - pad * 2, h - (cy + 80) - pad - foot_h};
|
||||
int foot_h = (st->tab == 0) ? 94 : 0;
|
||||
gemui_rect_t box = {pad, cy + 88, w - pad * 2, h - (cy + 88) - pad - foot_h};
|
||||
gemui_fill_round(cr, box, 12, t->bg_bar);
|
||||
gemui_stroke_round(cr, box, 12, 1.5, t->border);
|
||||
|
||||
@@ -159,19 +159,19 @@ static void on_draw(gemui_app_t *app, cairo_t *cr, int w, int h, void *ud) {
|
||||
gemui_draw_text(cr, t, box, "No interfaces or scan results available", 0, false,
|
||||
GEMUI_ALIGN_CENTER, t->fg_muted);
|
||||
} else {
|
||||
int rh = 64;
|
||||
int rh = 72;
|
||||
for (int i = 0; i < st->num_rows; i++) {
|
||||
gemui_rect_t rr = {box.x + 10, box.y + 8 + i * rh, box.w - 20, rh - 6};
|
||||
if (rr.y + rr.h > box.y + box.h) break;
|
||||
bool sel = (i == st->sel_row);
|
||||
gemui_fill_round(cr, rr, 10, sel ? t->sel_bg : (i % 2 ? t->bg_alt_odd : t->bg_alt_even));
|
||||
gemui_draw_text(cr, t, (gemui_rect_t){rr.x + 16, rr.y, rr.w - 320, rr.h},
|
||||
gemui_draw_text(cr, t, (gemui_rect_t){rr.x + 16, rr.y, rr.w - 360, rr.h},
|
||||
st->rows[i].col1, -1, true, GEMUI_ALIGN_LEFT,
|
||||
sel ? t->sel_fg : t->fg_bright);
|
||||
gemui_draw_text(cr, t, (gemui_rect_t){rr.x + rr.w - 300, rr.y, 160, rr.h},
|
||||
gemui_draw_text(cr, t, (gemui_rect_t){rr.x + rr.w - 340, rr.y, 190, rr.h},
|
||||
st->rows[i].col2, -2, false, GEMUI_ALIGN_RIGHT,
|
||||
sel ? t->sel_fg : t->accent_alt);
|
||||
gemui_draw_text(cr, t, (gemui_rect_t){rr.x + rr.w - 130, rr.y, 116, rr.h},
|
||||
gemui_draw_text(cr, t, (gemui_rect_t){rr.x + rr.w - 140, rr.y, 126, rr.h},
|
||||
st->rows[i].col3, -2, false, GEMUI_ALIGN_RIGHT,
|
||||
sel ? t->sel_fg : t->fg_muted);
|
||||
gemui_hit_add(app, rr, HIT_ROW, i);
|
||||
@@ -179,11 +179,11 @@ static void on_draw(gemui_app_t *app, cairo_t *cr, int w, int h, void *ud) {
|
||||
}
|
||||
|
||||
if (st->tab == 0) {
|
||||
int cw = 220;
|
||||
gemui_draw_input(app, cr, (gemui_rect_t){pad, h - 84, w - pad * 2 - cw - 12, 64},
|
||||
int cw = 260;
|
||||
gemui_draw_input(app, cr, (gemui_rect_t){pad, h - 92, w - pad * 2 - cw - 12, 72},
|
||||
"Wi-Fi passphrase (if connecting to secured SSID)...",
|
||||
st->psk, true, st->focus_psk, HIT_PSK, 0);
|
||||
gemui_draw_button(app, cr, (gemui_rect_t){w - pad - cw, h - 84, cw, 64},
|
||||
gemui_draw_button(app, cr, (gemui_rect_t){w - pad - cw, h - 92, cw, 72},
|
||||
"Connect Wi-Fi", HIT_CONNECT, 0, true, false, false);
|
||||
}
|
||||
}
|
||||
@@ -293,7 +293,7 @@ int main(void) {
|
||||
st.sel_row = -1;
|
||||
refresh_tab(&st);
|
||||
|
||||
st.app = gemui_create("geminux-net", "Geminux Network & Radios", 1680, 920, false);
|
||||
st.app = gemui_create("geminux-net", "Geminux Network & Radios", 1920, 940, false);
|
||||
if (!st.app) return 1;
|
||||
|
||||
gemui_handlers_t h = { .on_draw = on_draw, .on_key = on_key, .on_ptr = on_ptr };
|
||||
|
||||
@@ -147,18 +147,18 @@ static void on_draw(gemui_app_t *app, cairo_t *cr, int w, int h, void *ud) {
|
||||
"Tab: Switch Field | Enter: Send");
|
||||
|
||||
int pad = 20;
|
||||
int top = 80;
|
||||
int left_w = 520;
|
||||
int top = 92;
|
||||
int left_w = 560;
|
||||
if (left_w > w / 3) left_w = w / 3;
|
||||
int right_x = pad * 2 + left_w;
|
||||
int right_w = w - right_x - pad;
|
||||
|
||||
/* Left pane: recipient input + thread list */
|
||||
gemui_draw_input(app, cr, (gemui_rect_t){pad, top, left_w, 60},
|
||||
gemui_draw_input(app, cr, (gemui_rect_t){pad, top, left_w, 68},
|
||||
"New recipient number...", st->new_peer, false,
|
||||
st->focus_mode == 1, HIT_NEW, 0);
|
||||
|
||||
gemui_rect_t pane = {pad, top + 74, left_w, h - (top + 74) - pad};
|
||||
gemui_rect_t pane = {pad, top + 82, left_w, h - (top + 82) - pad};
|
||||
gemui_fill_round(cr, pane, 12, t->bg_bar);
|
||||
gemui_stroke_round(cr, pane, 12, 1.5, t->border);
|
||||
|
||||
@@ -166,18 +166,18 @@ static void on_draw(gemui_app_t *app, cairo_t *cr, int w, int h, void *ud) {
|
||||
gemui_draw_text(cr, t, pane, "No SMS threads yet", 0, false,
|
||||
GEMUI_ALIGN_CENTER, t->fg_muted);
|
||||
} else {
|
||||
int rh = 76;
|
||||
int rh = 84;
|
||||
for (int i = 0; i < st->num_threads; i++) {
|
||||
gemui_rect_t rr = {pane.x + 10, pane.y + 10 + i * rh, pane.w - 20, rh - 8};
|
||||
if (rr.y + rr.h > pane.y + pane.h) break;
|
||||
bool sel = (i == st->sel_thread);
|
||||
gemui_fill_round(cr, rr, 10, sel ? t->sel_bg : (i % 2 ? t->bg_alt_odd : t->bg_alt_even));
|
||||
thread_t *th = &st->threads[i];
|
||||
gemui_draw_text(cr, t, (gemui_rect_t){rr.x + 14, rr.y + 4, rr.w - 28, 32},
|
||||
gemui_draw_text(cr, t, (gemui_rect_t){rr.x + 14, rr.y + 4, rr.w - 28, 38},
|
||||
th->peer, -1, true, GEMUI_ALIGN_LEFT,
|
||||
sel ? t->sel_fg : t->fg_bright);
|
||||
const char *preview = (th->num_msgs > 0) ? th->msgs[th->num_msgs - 1].text : "";
|
||||
gemui_draw_text(cr, t, (gemui_rect_t){rr.x + 14, rr.y + 34, rr.w - 28, 28},
|
||||
gemui_draw_text(cr, t, (gemui_rect_t){rr.x + 14, rr.y + 42, rr.w - 28, 34},
|
||||
preview, -2, false, GEMUI_ALIGN_LEFT,
|
||||
sel ? t->sel_fg : t->fg_muted);
|
||||
gemui_hit_add(app, rr, HIT_THREAD, i);
|
||||
@@ -185,13 +185,13 @@ static void on_draw(gemui_app_t *app, cairo_t *cr, int w, int h, void *ud) {
|
||||
}
|
||||
|
||||
/* Right pane: chat history bubbles + compose bar */
|
||||
gemui_rect_t chat = {right_x, top, right_w, h - top - 104};
|
||||
gemui_rect_t chat = {right_x, top, right_w, h - top - 114};
|
||||
gemui_fill_round(cr, chat, 12, t->bg_overlay);
|
||||
gemui_stroke_round(cr, chat, 12, 1.5, t->border);
|
||||
|
||||
if (st->sel_thread >= 0 && st->sel_thread < st->num_threads) {
|
||||
thread_t *th = &st->threads[st->sel_thread];
|
||||
int bh = 84;
|
||||
int bh = 94;
|
||||
int cap = (chat.h - 24) / bh;
|
||||
int start = (th->num_msgs > cap) ? (th->num_msgs - cap) : 0;
|
||||
int y = chat.y + 12;
|
||||
@@ -201,9 +201,9 @@ static void on_draw(gemui_app_t *app, cairo_t *cr, int w, int h, void *ud) {
|
||||
int bx = m->outgoing ? (chat.x + chat.w - bw - 16) : (chat.x + 16);
|
||||
gemui_rect_t br = {bx, y, bw, bh - 10};
|
||||
gemui_fill_round(cr, br, 12, m->outgoing ? t->bg_bubble_out : t->bg_bubble_in);
|
||||
gemui_draw_text(cr, t, (gemui_rect_t){br.x + 14, br.y + 6, br.w - 28, 34},
|
||||
gemui_draw_text(cr, t, (gemui_rect_t){br.x + 14, br.y + 6, br.w - 28, 42},
|
||||
m->text, -1, false, GEMUI_ALIGN_LEFT, t->fg_bright);
|
||||
gemui_draw_text(cr, t, (gemui_rect_t){br.x + 14, br.y + 42, br.w - 28, 22},
|
||||
gemui_draw_text(cr, t, (gemui_rect_t){br.x + 14, br.y + 50, br.w - 28, 28},
|
||||
m->ts, -4, false, m->outgoing ? GEMUI_ALIGN_RIGHT : GEMUI_ALIGN_LEFT, t->fg_muted);
|
||||
y += bh;
|
||||
}
|
||||
@@ -212,11 +212,11 @@ static void on_draw(gemui_app_t *app, cairo_t *cr, int w, int h, void *ud) {
|
||||
false, GEMUI_ALIGN_CENTER, t->fg_muted);
|
||||
}
|
||||
|
||||
int send_w = 180;
|
||||
gemui_draw_input(app, cr, (gemui_rect_t){right_x, h - 88, right_w - send_w - 12, 68},
|
||||
int send_w = 210;
|
||||
gemui_draw_input(app, cr, (gemui_rect_t){right_x, h - 94, right_w - send_w - 12, 74},
|
||||
"Type SMS message...", st->compose, false,
|
||||
st->focus_mode == 0, HIT_INPUT, 0);
|
||||
gemui_draw_button(app, cr, (gemui_rect_t){right_x + right_w - send_w, h - 88, send_w, 68},
|
||||
gemui_draw_button(app, cr, (gemui_rect_t){right_x + right_w - send_w, h - 94, send_w, 74},
|
||||
"Send", HIT_SEND, 0, true, false, false);
|
||||
}
|
||||
|
||||
@@ -295,7 +295,7 @@ int main(int argc, char **argv) {
|
||||
}
|
||||
load_threads(&st);
|
||||
|
||||
st.app = gemui_create("geminux-sms", "Geminux SMS Messages", 1640, 900, false);
|
||||
st.app = gemui_create("geminux-sms", "Geminux SMS Messages", 1920, 940, false);
|
||||
if (!st.app) return 1;
|
||||
|
||||
st.inotify_fd = inotify_init1(IN_NONBLOCK | IN_CLOEXEC);
|
||||
|
||||
@@ -90,7 +90,7 @@ static void on_draw(gemui_app_t *app, cairo_t *cr, int w, int h, void *ud) {
|
||||
gemui_draw_header(app, cr, "\xee\x88\xab", "Geminux Unified Themes", t->name);
|
||||
|
||||
int pad = 20;
|
||||
int top = 80;
|
||||
int top = 92;
|
||||
int left_w = (w - pad * 3) / 2;
|
||||
int right_x = pad * 2 + left_w;
|
||||
int right_w = w - right_x - pad;
|
||||
@@ -99,7 +99,7 @@ static void on_draw(gemui_app_t *app, cairo_t *cr, int w, int h, void *ud) {
|
||||
gemui_fill_round(cr, list, 12, t->bg_bar);
|
||||
gemui_stroke_round(cr, list, 12, 1.5, t->border);
|
||||
|
||||
int rh = 64;
|
||||
int rh = 70;
|
||||
int cap = (list.h - 16) / rh;
|
||||
int start = (st->sel >= cap) ? (st->sel - cap + 1) : 0;
|
||||
for (int i = start; i < st->num_items && (i - start) < cap; i++) {
|
||||
@@ -110,42 +110,42 @@ static void on_draw(gemui_app_t *app, cairo_t *cr, int w, int h, void *ud) {
|
||||
const gemui_theme_t *pt = &st->items[i].parsed;
|
||||
gemui_color_t sw[4] = {pt->bg_main, pt->accent, pt->success, pt->danger};
|
||||
for (int k = 0; k < 4; k++) {
|
||||
gemui_fill_round(cr, (gemui_rect_t){rr.x + 12 + k * 28, rr.y + 18, 22, 22}, 5, sw[k]);
|
||||
gemui_fill_round(cr, (gemui_rect_t){rr.x + 12 + k * 30, rr.y + 20, 24, 24}, 6, sw[k]);
|
||||
}
|
||||
gemui_draw_text(cr, t, (gemui_rect_t){rr.x + 132, rr.y, rr.w - 144, rr.h},
|
||||
gemui_draw_text(cr, t, (gemui_rect_t){rr.x + 140, rr.y, rr.w - 152, rr.h},
|
||||
st->items[i].name, -1, sel, GEMUI_ALIGN_LEFT,
|
||||
sel ? t->sel_fg : t->fg_bright);
|
||||
gemui_hit_add(app, rr, HIT_ITEM, i);
|
||||
}
|
||||
|
||||
/* Live Preview Card */
|
||||
gemui_rect_t prev = {right_x, top, right_w, h - top - 104};
|
||||
gemui_rect_t prev = {right_x, top, right_w, h - top - 114};
|
||||
const gemui_theme_t *pt = (st->sel >= 0 && st->sel < st->num_items) ? &st->items[st->sel].parsed : t;
|
||||
gemui_fill_round(cr, prev, 14, pt->bg_main);
|
||||
gemui_stroke_round(cr, prev, 14, 2.0, pt->border);
|
||||
|
||||
gemui_fill_round(cr, (gemui_rect_t){prev.x + 16, prev.y + 16, prev.w - 32, 56}, 10, pt->bg_header);
|
||||
gemui_draw_text(cr, pt, (gemui_rect_t){prev.x + 32, prev.y + 16, prev.w - 64, 56},
|
||||
gemui_fill_round(cr, (gemui_rect_t){prev.x + 16, prev.y + 16, prev.w - 32, 64}, 10, pt->bg_header);
|
||||
gemui_draw_text(cr, pt, (gemui_rect_t){prev.x + 32, prev.y + 16, prev.w - 64, 64},
|
||||
pt->name, 2, true, GEMUI_ALIGN_LEFT, pt->fg_bright);
|
||||
|
||||
gemui_fill_round(cr, (gemui_rect_t){prev.x + 24, prev.y + 92, prev.w - 48, 72}, 10, pt->bg_bubble_in);
|
||||
gemui_draw_text(cr, pt, (gemui_rect_t){prev.x + 40, prev.y + 92, prev.w - 80, 72},
|
||||
gemui_fill_round(cr, (gemui_rect_t){prev.x + 24, prev.y + 96, prev.w - 48, 80}, 10, pt->bg_bubble_in);
|
||||
gemui_draw_text(cr, pt, (gemui_rect_t){prev.x + 40, prev.y + 96, prev.w - 80, 80},
|
||||
"Fira Code Ligatures: -> => !== <= >=", -1, false, GEMUI_ALIGN_LEFT, pt->fg_main);
|
||||
|
||||
gemui_fill_round(cr, (gemui_rect_t){prev.x + 24, prev.y + 180, prev.w - 48, 72}, 10, pt->sel_bg);
|
||||
gemui_draw_text(cr, pt, (gemui_rect_t){prev.x + 40, prev.y + 180, prev.w - 80, 72},
|
||||
gemui_fill_round(cr, (gemui_rect_t){prev.x + 24, prev.y + 192, prev.w - 48, 80}, 10, pt->sel_bg);
|
||||
gemui_draw_text(cr, pt, (gemui_rect_t){prev.x + 40, prev.y + 192, prev.w - 80, 80},
|
||||
"Selected Item & Accent Highlight", -1, true, GEMUI_ALIGN_LEFT, pt->sel_fg);
|
||||
|
||||
int sw_w = (prev.w - 48 - 4 * 10) / 5;
|
||||
gemui_color_t badges[5] = {pt->accent, pt->success, pt->info, pt->warning, pt->danger};
|
||||
static const char *labels[5] = {"Accent", "Success", "Info", "Warn", "Danger"};
|
||||
for (int i = 0; i < 5; i++) {
|
||||
gemui_rect_t br = {prev.x + 24 + i * (sw_w + 10), prev.y + 276, sw_w, 60};
|
||||
gemui_rect_t br = {prev.x + 24 + i * (sw_w + 10), prev.y + 294, sw_w, 68};
|
||||
gemui_fill_round(cr, br, 8, badges[i]);
|
||||
gemui_draw_text(cr, pt, br, labels[i], -3, true, GEMUI_ALIGN_CENTER, pt->bg_main);
|
||||
}
|
||||
|
||||
gemui_draw_button(app, cr, (gemui_rect_t){right_x, h - 88, right_w, 68},
|
||||
gemui_draw_button(app, cr, (gemui_rect_t){right_x, h - 94, right_w, 74},
|
||||
"Apply Across DWM, st, dmenu, dunst & Apps", HIT_APPLY, 0, true, false, false);
|
||||
}
|
||||
|
||||
@@ -176,7 +176,7 @@ static void on_ptr(gemui_app_t *app, int type, int x, int y, unsigned int btn, v
|
||||
int main(void) {
|
||||
themes_state_t st;
|
||||
memset(&st, 0, sizeof(st));
|
||||
st.app = gemui_create("geminux-themes", "Geminux Unified Themes", 1560, 860, false);
|
||||
st.app = gemui_create("geminux-themes", "Geminux Unified Themes", 1900, 920, false);
|
||||
if (!st.app) return 1;
|
||||
load_themes(&st);
|
||||
|
||||
|
||||
Reference in new issue
Block a user