This commit is contained in:
1 parent
989e36ffe2
commit
98a14bc7dc
10 files changed
+36871
-80
No files matched your search
+35
-1
@@ -8,7 +8,7 @@ LVGL_VERSION="v9.2.2"
|
|||||||
LVGL_REPO="https://github.com/lvgl/lvgl.git"
|
LVGL_REPO="https://github.com/lvgl/lvgl.git"
|
||||||
LVGL_DIR="/tmp/lvgl"
|
LVGL_DIR="/tmp/lvgl"
|
||||||
OBJ_DIR="/tmp/lvgl_obj"
|
OBJ_DIR="/tmp/lvgl_obj"
|
||||||
CONF_DIR="$(pwd)"
|
CONF_DIR="$(pwd)/lvglh"
|
||||||
OUT_DIR="$(pwd)/lib"
|
OUT_DIR="$(pwd)/lib"
|
||||||
|
|
||||||
CC="gcc"
|
CC="gcc"
|
||||||
@@ -71,6 +71,40 @@ OBJECTS=$(find "$OBJ_DIR" -name '*.o')
|
|||||||
ar rcs "${OUT_DIR}/liblvgl.a" $OBJECTS
|
ar rcs "${OUT_DIR}/liblvgl.a" $OBJECTS
|
||||||
echo "Created ${OUT_DIR}/liblvgl.a"
|
echo "Created ${OUT_DIR}/liblvgl.a"
|
||||||
|
|
||||||
|
# Compile custom LVGL extension files from lvglh/
|
||||||
|
LVGLH_SOURCES=$(find "${CONF_DIR}" -name '*.c' 2>/dev/null || true)
|
||||||
|
if [ -n "$LVGLH_SOURCES" ]; then
|
||||||
|
echo " "
|
||||||
|
echo "Compiling custom LVGL files from lvglh/..."
|
||||||
|
LVGLH_OBJ_DIR="/tmp/lvglh_obj"
|
||||||
|
rm -rf "$LVGLH_OBJ_DIR"
|
||||||
|
mkdir -p "$LVGLH_OBJ_DIR"
|
||||||
|
HCOUNT=0
|
||||||
|
HERRORS=0
|
||||||
|
for src in $LVGLH_SOURCES; do
|
||||||
|
HCOUNT=$((HCOUNT + 1))
|
||||||
|
rel="${src#${CONF_DIR}/}"
|
||||||
|
obj_path="${LVGLH_OBJ_DIR}/${rel%.c}.o"
|
||||||
|
mkdir -p "$(dirname "$obj_path")"
|
||||||
|
echo " [lvglh] $rel"
|
||||||
|
if ! $CC $CFLAGS -c "$src" -o "$obj_path" 2>&1; then
|
||||||
|
echo " FAILED: $rel"
|
||||||
|
HERRORS=$((HERRORS + 1))
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
echo "Compiled ${HCOUNT} custom files (${HERRORS} errors)."
|
||||||
|
if [ "$HERRORS" -ne 0 ]; then
|
||||||
|
echo "Custom LVGL compilation FAILED."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
# Append custom objects into the existing archive
|
||||||
|
HOBJECTS=$(find "$LVGLH_OBJ_DIR" -name '*.o')
|
||||||
|
ar rcs "${OUT_DIR}/liblvgl.a" $HOBJECTS
|
||||||
|
echo "Updated ${OUT_DIR}/liblvgl.a with custom objects."
|
||||||
|
else
|
||||||
|
echo "No custom LVGL files in lvglh/."
|
||||||
|
fi
|
||||||
|
|
||||||
# Copy source + objects to /lvgl host mount for debugging
|
# Copy source + objects to /lvgl host mount for debugging
|
||||||
echo "Copying LVGL source and objects to host mount..."
|
echo "Copying LVGL source and objects to host mount..."
|
||||||
rm -rf /lvgl/* /lvgl/.[!.]* /lvgl/..?* 2>/dev/null || true
|
rm -rf /lvgl/* /lvgl/.[!.]* /lvgl/..?* 2>/dev/null || true
|
||||||
|
|||||||
+1
-1
@@ -4,4 +4,4 @@ echo "======================="
|
|||||||
echo " "
|
echo " "
|
||||||
echo "Compiling FPC Sources..."
|
echo "Compiling FPC Sources..."
|
||||||
echo " "
|
echo " "
|
||||||
fpc -Aelf -gw -g -gl -n -vlewn -O3 -OpPENTIUM3 -Si -Sc -Sg -Xd -CX -XXs -CfSSE -CfSSE2 -Rintel -Pi386 -Tlinux -FElib/ -Fusrc/* -Fusrc/driver/* -Fusrc/driver/net/* src/kernel.pas
|
fpc -Aelf -gw -g -gl -n -v0ew -O3 -OpPENTIUM3 -Si -Sc -Sg -Xd -CX -XXs -CfSSE -CfSSE2 -Rintel -Pi386 -Tlinux -FElib/ -Fusrc/* -Fusrc/driver/* -Fusrc/driver/net/* src/kernel.pas
|
||||||
+374
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
@@ -269,6 +269,7 @@ var
|
|||||||
instr_box : Plv_obj;
|
instr_box : Plv_obj;
|
||||||
mem_str, res_str, cpu_str, clk_str : pchar;
|
mem_str, res_str, cpu_str, clk_str : pchar;
|
||||||
cw : sint32;
|
cw : sint32;
|
||||||
|
badge_h : sint32;
|
||||||
begin
|
begin
|
||||||
if windows.isWindowOpen(sysinfo_win_id) then exit;
|
if windows.isWindowOpen(sysinfo_win_id) then exit;
|
||||||
|
|
||||||
@@ -287,17 +288,6 @@ begin
|
|||||||
content := windows.getWindowContent(sysinfo_win_id);
|
content := windows.getWindowContent(sysinfo_win_id);
|
||||||
if content = nil then exit;
|
if content = nil then exit;
|
||||||
|
|
||||||
{ Enable scrolling on content area }
|
|
||||||
lv_obj_add_flag(content, LV_OBJ_FLAG_SCROLLABLE);
|
|
||||||
lv_obj_set_scrollbar_mode(content, LV_SCROLLBAR_MODE_ON);
|
|
||||||
|
|
||||||
{ Style the scrollbar so it's visible against dark background }
|
|
||||||
lv_obj_set_style_bg_color(content, lv_color_make(100, 115, 160), LV_PART_SCROLLBAR);
|
|
||||||
lv_obj_set_style_bg_opa(content, LV_OPA_COVER, LV_PART_SCROLLBAR);
|
|
||||||
lv_obj_set_style_radius(content, 4, LV_PART_SCROLLBAR);
|
|
||||||
lv_obj_set_style_width(content, 6, LV_PART_SCROLLBAR);
|
|
||||||
lv_obj_set_style_pad_all(content, 2, LV_PART_SCROLLBAR);
|
|
||||||
|
|
||||||
cw := SYSINFO_W;
|
cw := SYSINFO_W;
|
||||||
|
|
||||||
{ ---- System Information ---- }
|
{ ---- System Information ---- }
|
||||||
@@ -340,7 +330,7 @@ begin
|
|||||||
instr_box := lv_obj_create(content);
|
instr_box := lv_obj_create(content);
|
||||||
lv_obj_remove_style_all(instr_box);
|
lv_obj_remove_style_all(instr_box);
|
||||||
lv_obj_set_width(instr_box, cw - 40);
|
lv_obj_set_width(instr_box, cw - 40);
|
||||||
lv_obj_set_style_height(instr_box, LV_SIZE_CONTENT, 0);
|
lv_obj_set_height(instr_box, 800); { temporary large height for wrapping }
|
||||||
lv_obj_set_style_layout(instr_box, LV_LAYOUT_FLEX, 0);
|
lv_obj_set_style_layout(instr_box, LV_LAYOUT_FLEX, 0);
|
||||||
lv_obj_set_flex_flow(instr_box, LV_FLEX_FLOW_ROW_WRAP);
|
lv_obj_set_flex_flow(instr_box, LV_FLEX_FLOW_ROW_WRAP);
|
||||||
lv_obj_set_style_pad_row(instr_box, 4, 0);
|
lv_obj_set_style_pad_row(instr_box, 4, 0);
|
||||||
@@ -407,6 +397,14 @@ begin
|
|||||||
if cpu.CPUID.Capabilities1^.OSXSAVE then addBadge(instr_box, 'OSXSAVE');
|
if cpu.CPUID.Capabilities1^.OSXSAVE then addBadge(instr_box, 'OSXSAVE');
|
||||||
if cpu.CPUID.Capabilities1^.AVX then addBadge(instr_box, 'AVX');
|
if cpu.CPUID.Capabilities1^.AVX then addBadge(instr_box, 'AVX');
|
||||||
if cpu.CPUID.Capabilities1^.RDRAND then addBadge(instr_box, 'RDRAND');
|
if cpu.CPUID.Capabilities1^.RDRAND then addBadge(instr_box, 'RDRAND');
|
||||||
|
|
||||||
|
{ Force layout so wrapped row heights are resolved,
|
||||||
|
then set instr_box to its actual content height. }
|
||||||
|
lv_obj_update_layout(lv_screen_active);
|
||||||
|
badge_h := lv_obj_get_self_height(instr_box);
|
||||||
|
|
||||||
|
if badge_h > 0 then
|
||||||
|
lv_obj_set_height(instr_box, badge_h);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ ============================================================
|
{ ============================================================
|
||||||
|
|||||||
+84
-11
File diff suppressed because it is too large.
Load diff
@@ -34,7 +34,7 @@ implementation
|
|||||||
|
|
||||||
const
|
const
|
||||||
PANEL_W = 220;
|
PANEL_W = 220;
|
||||||
PANEL_H = 330;
|
PANEL_H = 280;
|
||||||
PANEL_PAD = 8;
|
PANEL_PAD = 8;
|
||||||
PANEL_MARGIN = 8;
|
PANEL_MARGIN = 8;
|
||||||
ROW_HEIGHT = 18;
|
ROW_HEIGHT = 18;
|
||||||
@@ -107,7 +107,7 @@ var
|
|||||||
begin
|
begin
|
||||||
lbl := lv_label_create(parent);
|
lbl := lv_label_create(parent);
|
||||||
lv_label_set_text(lbl, '...');
|
lv_label_set_text(lbl, '...');
|
||||||
lv_obj_set_style_text_color(lbl, lv_color_make(0, 255, 100), 0);
|
lv_obj_set_style_text_color(lbl, lv_color_make(200, 200, 200), 0);
|
||||||
lv_obj_set_style_text_font(lbl, @lv_font_montserrat_14, 0);
|
lv_obj_set_style_text_font(lbl, @lv_font_montserrat_14, 0);
|
||||||
lv_label_set_long_mode(lbl, LV_LABEL_LONG_CLIP);
|
lv_label_set_long_mode(lbl, LV_LABEL_LONG_CLIP);
|
||||||
makeRow := lbl;
|
makeRow := lbl;
|
||||||
@@ -124,13 +124,12 @@ begin
|
|||||||
|
|
||||||
overlay := lv_obj_create(scr);
|
overlay := lv_obj_create(scr);
|
||||||
lv_obj_remove_style_all(overlay);
|
lv_obj_remove_style_all(overlay);
|
||||||
lv_obj_set_size(overlay, PANEL_W, PANEL_H);
|
|
||||||
lv_obj_set_pos(overlay, PANEL_MARGIN, PANEL_MARGIN);
|
lv_obj_set_pos(overlay, PANEL_MARGIN, PANEL_MARGIN);
|
||||||
lv_obj_set_style_bg_color(overlay, lv_color_make(0, 0, 0), 0);
|
lv_obj_set_style_bg_color(overlay, lv_color_make(0, 0, 0), 0);
|
||||||
lv_obj_set_style_bg_opa(overlay, 180, 0);
|
lv_obj_set_style_bg_opa(overlay, 180, 0);
|
||||||
lv_obj_set_style_radius(overlay, 6, 0);
|
lv_obj_set_style_radius(overlay, 6, 0);
|
||||||
lv_obj_set_style_border_width(overlay, 1, 0);
|
lv_obj_set_style_border_width(overlay, 1, 0);
|
||||||
lv_obj_set_style_border_color(overlay, lv_color_make(0, 200, 80), 0);
|
lv_obj_set_style_border_color(overlay, lv_color_make(200, 200, 200), 0);
|
||||||
lv_obj_set_style_border_opa(overlay, 120, 0);
|
lv_obj_set_style_border_opa(overlay, 120, 0);
|
||||||
lv_obj_set_style_pad_left(overlay, PANEL_PAD, 0);
|
lv_obj_set_style_pad_left(overlay, PANEL_PAD, 0);
|
||||||
lv_obj_set_style_pad_right(overlay, PANEL_PAD, 0);
|
lv_obj_set_style_pad_right(overlay, PANEL_PAD, 0);
|
||||||
@@ -150,6 +149,7 @@ begin
|
|||||||
lbl_ticks := makeRow(overlay);
|
lbl_ticks := makeRow(overlay);
|
||||||
lbl_memory := makeRow(overlay);
|
lbl_memory := makeRow(overlay);
|
||||||
lbl_resolution := makeRow(overlay);
|
lbl_resolution := makeRow(overlay);
|
||||||
|
lv_obj_set_style_pad_bottom(lbl_resolution, 10, 0);
|
||||||
|
|
||||||
{ ---- FPS graph container ---- }
|
{ ---- FPS graph container ---- }
|
||||||
graph_cont := lv_obj_create(overlay);
|
graph_cont := lv_obj_create(overlay);
|
||||||
@@ -159,7 +159,7 @@ begin
|
|||||||
lv_obj_set_style_bg_opa(graph_cont, 200, 0);
|
lv_obj_set_style_bg_opa(graph_cont, 200, 0);
|
||||||
lv_obj_set_style_radius(graph_cont, 4, 0);
|
lv_obj_set_style_radius(graph_cont, 4, 0);
|
||||||
lv_obj_set_style_border_width(graph_cont, 1, 0);
|
lv_obj_set_style_border_width(graph_cont, 1, 0);
|
||||||
lv_obj_set_style_border_color(graph_cont, lv_color_make(0, 140, 60), 0);
|
lv_obj_set_style_border_color(graph_cont, lv_color_make(200, 200, 200), 0);
|
||||||
lv_obj_set_style_border_opa(graph_cont, 100, 0);
|
lv_obj_set_style_border_opa(graph_cont, 100, 0);
|
||||||
lv_obj_set_style_pad_all(graph_cont, 0, 0);
|
lv_obj_set_style_pad_all(graph_cont, 0, 0);
|
||||||
lv_obj_remove_flag(graph_cont, LV_OBJ_FLAG_SCROLLABLE);
|
lv_obj_remove_flag(graph_cont, LV_OBJ_FLAG_SCROLLABLE);
|
||||||
@@ -168,11 +168,14 @@ begin
|
|||||||
{ ---- FPS line graph ---- }
|
{ ---- FPS line graph ---- }
|
||||||
graph_line := lv_line_create(graph_cont);
|
graph_line := lv_line_create(graph_cont);
|
||||||
lv_obj_remove_style_all(graph_line);
|
lv_obj_remove_style_all(graph_line);
|
||||||
lv_obj_set_style_line_color(graph_line, lv_color_make(0, 255, 100), 0);
|
lv_obj_set_style_line_color(graph_line, lv_color_make(200, 200, 200), 0);
|
||||||
lv_obj_set_style_line_width(graph_line, 2, 0);
|
lv_obj_set_style_line_width(graph_line, 2, 0);
|
||||||
lv_obj_set_style_line_rounded(graph_line, true, 0);
|
lv_obj_set_style_line_rounded(graph_line, true, 0);
|
||||||
lv_obj_set_style_line_opa(graph_line, 220, 0);
|
lv_obj_set_style_line_opa(graph_line, 220, 0);
|
||||||
|
|
||||||
|
{ Auto-size overlay to fit children}
|
||||||
|
lv_obj_set_size(overlay, LV_SIZE_CONTENT, LV_SIZE_CONTENT);
|
||||||
|
|
||||||
{ Always on top }
|
{ Always on top }
|
||||||
lv_obj_move_foreground(overlay);
|
lv_obj_move_foreground(overlay);
|
||||||
end;
|
end;
|
||||||
|
|||||||
@@ -492,19 +492,19 @@ begin
|
|||||||
lv_obj_set_size(titlebar, w, WIN_TITLEBAR_H);
|
lv_obj_set_size(titlebar, w, WIN_TITLEBAR_H);
|
||||||
lv_obj_set_style_bg_color(titlebar, lv_color_make(45, 48, 58), 0);
|
lv_obj_set_style_bg_color(titlebar, lv_color_make(45, 48, 58), 0);
|
||||||
lv_obj_set_style_bg_opa(titlebar, LV_OPA_COVER, 0);
|
lv_obj_set_style_bg_opa(titlebar, LV_OPA_COVER, 0);
|
||||||
lv_obj_set_style_pad_left(titlebar, 10, 0);
|
lv_obj_set_style_pad_left(titlebar, 0, 0);
|
||||||
lv_obj_set_style_pad_right(titlebar, 10, 0);
|
lv_obj_set_style_pad_right(titlebar, 0, 0);
|
||||||
lv_obj_set_style_pad_top(titlebar, 0, 0);
|
lv_obj_set_style_pad_top(titlebar, 0, 0);
|
||||||
lv_obj_set_style_pad_bottom(titlebar, 0, 0);
|
lv_obj_set_style_pad_bottom(titlebar, 0, 0);
|
||||||
lv_obj_remove_flag(titlebar, LV_OBJ_FLAG_SCROLLABLE);
|
lv_obj_remove_flag(titlebar, LV_OBJ_FLAG_SCROLLABLE);
|
||||||
lv_obj_set_scrollbar_mode(titlebar, LV_SCROLLBAR_MODE_OFF);
|
lv_obj_set_scrollbar_mode(titlebar, LV_SCROLLBAR_MODE_OFF);
|
||||||
lv_obj_add_flag(titlebar, LV_OBJ_FLAG_CLICKABLE);
|
lv_obj_add_flag(titlebar, LV_OBJ_FLAG_CLICKABLE);
|
||||||
|
|
||||||
{ Flex layout: close(left) | collapse(left) | title(fill) }
|
{ Flex layout: title(grow) | minimize | close }
|
||||||
lv_obj_set_style_layout(titlebar, LV_LAYOUT_FLEX, 0);
|
lv_obj_set_style_layout(titlebar, LV_LAYOUT_FLEX, 0);
|
||||||
lv_obj_set_flex_flow(titlebar, LV_FLEX_FLOW_ROW);
|
lv_obj_set_flex_flow(titlebar, LV_FLEX_FLOW_ROW);
|
||||||
lv_obj_set_flex_align(titlebar, LV_FLEX_ALIGN_START, LV_FLEX_ALIGN_CENTER, LV_FLEX_ALIGN_CENTER);
|
lv_obj_set_flex_align(titlebar, LV_FLEX_ALIGN_START, LV_FLEX_ALIGN_CENTER, LV_FLEX_ALIGN_CENTER);
|
||||||
lv_obj_set_style_pad_column(titlebar, 8, 0);
|
lv_obj_set_style_pad_column(titlebar, 0, 0);
|
||||||
|
|
||||||
{ Titlebar events for drag }
|
{ Titlebar events for drag }
|
||||||
lv_obj_add_event_cb(titlebar, @titlebar_press_cb, LV_EVENT_PRESSED, nil);
|
lv_obj_add_event_cb(titlebar, @titlebar_press_cb, LV_EVENT_PRESSED, nil);
|
||||||
@@ -512,52 +512,52 @@ begin
|
|||||||
lv_obj_add_event_cb(titlebar, @titlebar_release_cb, LV_EVENT_RELEASED, nil);
|
lv_obj_add_event_cb(titlebar, @titlebar_release_cb, LV_EVENT_RELEASED, nil);
|
||||||
lv_obj_add_event_cb(titlebar, @titlebar_release_cb, LV_EVENT_PRESS_LOST, nil);
|
lv_obj_add_event_cb(titlebar, @titlebar_release_cb, LV_EVENT_PRESS_LOST, nil);
|
||||||
|
|
||||||
{ ---- Close button (red circle) ---- }
|
{ ---- Title label (fills remaining space, centered text) ---- }
|
||||||
close_btn := lv_button_create(titlebar);
|
|
||||||
lv_obj_remove_style_all(close_btn);
|
|
||||||
lv_obj_set_size(close_btn, 18, 18);
|
|
||||||
lv_obj_set_style_bg_color(close_btn, lv_color_make(220, 60, 60), 0);
|
|
||||||
lv_obj_set_style_bg_opa(close_btn, LV_OPA_COVER, 0);
|
|
||||||
lv_obj_set_style_radius(close_btn, 9, 0);
|
|
||||||
lv_obj_set_style_border_width(close_btn, 0, 0);
|
|
||||||
lv_obj_set_style_shadow_width(close_btn, 0, 0);
|
|
||||||
lv_obj_set_style_pad_all(close_btn, 0, 0);
|
|
||||||
lv_obj_set_style_layout(close_btn, LV_LAYOUT_FLEX, 0);
|
|
||||||
lv_obj_set_flex_flow(close_btn, LV_FLEX_FLOW_ROW);
|
|
||||||
lv_obj_set_flex_align(close_btn, LV_FLEX_ALIGN_CENTER, LV_FLEX_ALIGN_CENTER, LV_FLEX_ALIGN_CENTER);
|
|
||||||
lv_obj_add_event_cb(close_btn, @close_click_cb, LV_EVENT_CLICKED, pointer(id));
|
|
||||||
|
|
||||||
close_lbl := lv_label_create(close_btn);
|
|
||||||
lv_label_set_text(close_lbl, 'X');
|
|
||||||
lv_obj_set_style_text_color(close_lbl, lv_color_make(255, 255, 255), 0);
|
|
||||||
lv_obj_set_style_text_font(close_lbl, @lv_font_montserrat_14, 0);
|
|
||||||
|
|
||||||
{ ---- Collapse button (yellow circle) ---- }
|
|
||||||
coll_btn := lv_button_create(titlebar);
|
|
||||||
lv_obj_remove_style_all(coll_btn);
|
|
||||||
lv_obj_set_size(coll_btn, 18, 18);
|
|
||||||
lv_obj_set_style_bg_color(coll_btn, lv_color_make(230, 190, 50), 0);
|
|
||||||
lv_obj_set_style_bg_opa(coll_btn, LV_OPA_COVER, 0);
|
|
||||||
lv_obj_set_style_radius(coll_btn, 9, 0);
|
|
||||||
lv_obj_set_style_border_width(coll_btn, 0, 0);
|
|
||||||
lv_obj_set_style_shadow_width(coll_btn, 0, 0);
|
|
||||||
lv_obj_set_style_pad_all(coll_btn, 0, 0);
|
|
||||||
lv_obj_set_style_layout(coll_btn, LV_LAYOUT_FLEX, 0);
|
|
||||||
lv_obj_set_flex_flow(coll_btn, LV_FLEX_FLOW_ROW);
|
|
||||||
lv_obj_set_flex_align(coll_btn, LV_FLEX_ALIGN_CENTER, LV_FLEX_ALIGN_CENTER, LV_FLEX_ALIGN_CENTER);
|
|
||||||
lv_obj_add_event_cb(coll_btn, @collapse_click_cb, LV_EVENT_CLICKED, pointer(id));
|
|
||||||
|
|
||||||
coll_lbl := lv_label_create(coll_btn);
|
|
||||||
lv_label_set_text(coll_lbl, '-');
|
|
||||||
lv_obj_set_style_text_color(coll_lbl, lv_color_make(60, 50, 10), 0);
|
|
||||||
lv_obj_set_style_text_font(coll_lbl, @lv_font_montserrat_14, 0);
|
|
||||||
|
|
||||||
{ ---- Title label ---- }
|
|
||||||
title_lbl := lv_label_create(titlebar);
|
title_lbl := lv_label_create(titlebar);
|
||||||
lv_label_set_text(title_lbl, title);
|
lv_label_set_text(title_lbl, title);
|
||||||
lv_obj_set_style_text_color(title_lbl, lv_color_make(210, 215, 230), 0);
|
lv_obj_set_style_text_color(title_lbl, lv_color_make(210, 215, 230), 0);
|
||||||
lv_obj_set_style_text_font(title_lbl, @lv_font_montserrat_14, 0);
|
lv_obj_set_style_text_font(title_lbl, @lv_font_montserrat_14, 0);
|
||||||
|
lv_obj_set_style_text_align(title_lbl, LV_TEXT_ALIGN_CENTER, 0);
|
||||||
|
lv_obj_set_style_pad_left(title_lbl, 10, 0);
|
||||||
lv_label_set_long_mode(title_lbl, LV_LABEL_LONG_CLIP);
|
lv_label_set_long_mode(title_lbl, LV_LABEL_LONG_CLIP);
|
||||||
|
lv_obj_set_width(title_lbl, 0);
|
||||||
|
lv_obj_set_flex_grow(title_lbl, 1);
|
||||||
|
|
||||||
|
{ ---- Minimize button (full height) ---- }
|
||||||
|
coll_btn := lv_button_create(titlebar);
|
||||||
|
lv_obj_remove_style_all(coll_btn);
|
||||||
|
lv_obj_set_size(coll_btn, WIN_TITLEBAR_H, WIN_TITLEBAR_H);
|
||||||
|
lv_obj_set_style_bg_color(coll_btn, lv_color_make(55, 58, 70), 0);
|
||||||
|
lv_obj_set_style_bg_opa(coll_btn, 0, 0);
|
||||||
|
lv_obj_set_style_radius(coll_btn, 0, 0);
|
||||||
|
lv_obj_set_style_border_width(coll_btn, 0, 0);
|
||||||
|
lv_obj_set_style_shadow_width(coll_btn, 0, 0);
|
||||||
|
lv_obj_set_style_pad_all(coll_btn, 0, 0);
|
||||||
|
lv_obj_add_event_cb(coll_btn, @collapse_click_cb, LV_EVENT_CLICKED, pointer(id));
|
||||||
|
|
||||||
|
coll_lbl := lv_label_create(coll_btn);
|
||||||
|
lv_label_set_text(coll_lbl, #$EF#$81#$A8);
|
||||||
|
lv_obj_set_style_text_color(coll_lbl, lv_color_make(160, 165, 180), 0);
|
||||||
|
lv_obj_set_style_text_font(coll_lbl, @lv_font_fa_solid_16, 0);
|
||||||
|
lv_obj_center(coll_lbl);
|
||||||
|
|
||||||
|
{ ---- Close button (right edge, full height) ---- }
|
||||||
|
close_btn := lv_button_create(titlebar);
|
||||||
|
lv_obj_remove_style_all(close_btn);
|
||||||
|
lv_obj_set_size(close_btn, WIN_TITLEBAR_H, WIN_TITLEBAR_H);
|
||||||
|
lv_obj_set_style_bg_color(close_btn, lv_color_make(180, 50, 50), 0);
|
||||||
|
lv_obj_set_style_bg_opa(close_btn, 0, 0);
|
||||||
|
lv_obj_set_style_radius(close_btn, 0, 0);
|
||||||
|
lv_obj_set_style_border_width(close_btn, 0, 0);
|
||||||
|
lv_obj_set_style_shadow_width(close_btn, 0, 0);
|
||||||
|
lv_obj_set_style_pad_all(close_btn, 0, 0);
|
||||||
|
lv_obj_add_event_cb(close_btn, @close_click_cb, LV_EVENT_CLICKED, pointer(id));
|
||||||
|
|
||||||
|
close_lbl := lv_label_create(close_btn);
|
||||||
|
lv_label_set_text(close_lbl, #$EF#$80#$8D);
|
||||||
|
lv_obj_set_style_text_color(close_lbl, lv_color_make(160, 165, 180), 0);
|
||||||
|
lv_obj_set_style_text_font(close_lbl, @lv_font_fa_solid_16, 0);
|
||||||
|
lv_obj_center(close_lbl);
|
||||||
|
|
||||||
{ ---- Content area ---- }
|
{ ---- Content area ---- }
|
||||||
content := lv_obj_create(frame);
|
content := lv_obj_create(frame);
|
||||||
@@ -572,9 +572,15 @@ begin
|
|||||||
lv_obj_set_style_layout(content, LV_LAYOUT_FLEX, 0);
|
lv_obj_set_style_layout(content, LV_LAYOUT_FLEX, 0);
|
||||||
lv_obj_set_flex_flow(content, LV_FLEX_FLOW_COLUMN);
|
lv_obj_set_flex_flow(content, LV_FLEX_FLOW_COLUMN);
|
||||||
lv_obj_set_style_pad_row(content, 6, 0);
|
lv_obj_set_style_pad_row(content, 6, 0);
|
||||||
lv_obj_remove_flag(content, LV_OBJ_FLAG_SCROLLABLE);
|
lv_obj_add_flag(content, LV_OBJ_FLAG_SCROLLABLE);
|
||||||
lv_obj_set_scrollbar_mode(content, LV_SCROLLBAR_MODE_OFF);
|
lv_obj_set_scrollbar_mode(content, LV_SCROLLBAR_MODE_AUTO);
|
||||||
lv_obj_set_style_clip_corner(content, true, 0);
|
|
||||||
|
{ Style the scrollbar so it's visible against the dark background }
|
||||||
|
lv_obj_set_style_bg_color(content, lv_color_make(100, 115, 160), LV_PART_SCROLLBAR);
|
||||||
|
lv_obj_set_style_bg_opa(content, LV_OPA_COVER, LV_PART_SCROLLBAR);
|
||||||
|
lv_obj_set_style_radius(content, 4, LV_PART_SCROLLBAR);
|
||||||
|
lv_obj_set_style_width(content, 6, LV_PART_SCROLLBAR);
|
||||||
|
lv_obj_set_style_pad_all(content, 2, LV_PART_SCROLLBAR);
|
||||||
|
|
||||||
{ ---- Resize grip (floating over frame bottom-right) ---- }
|
{ ---- Resize grip (floating over frame bottom-right) ---- }
|
||||||
{ The grip is a child of frame but ignores flex layout }
|
{ The grip is a child of frame but ignores flex layout }
|
||||||
|
|||||||
+5
-1
@@ -55,7 +55,8 @@ uses
|
|||||||
rand,
|
rand,
|
||||||
terminal,
|
terminal,
|
||||||
hashmap, vfs,
|
hashmap, vfs,
|
||||||
video, vesa, doublebuffer, color, lvgl, desktop, uidebug;
|
video, vesa, doublebuffer, color, lvgl, desktop, uidebug,
|
||||||
|
vterminal;
|
||||||
|
|
||||||
procedure kmain(mbinfo: Pmultiboot_info_t; mbmagic: uint32); stdcall;
|
procedure kmain(mbinfo: Pmultiboot_info_t; mbmagic: uint32); stdcall;
|
||||||
|
|
||||||
@@ -250,6 +251,9 @@ begin
|
|||||||
desktop.init;
|
desktop.init;
|
||||||
console.outputln('KERNEL', 'DESKTOP: INIT COMPLETE.');
|
console.outputln('KERNEL', 'DESKTOP: INIT COMPLETE.');
|
||||||
|
|
||||||
|
{ Initialize visual terminal (registers with desktop search) }
|
||||||
|
vterminal.init;
|
||||||
|
|
||||||
{ Main render loop }
|
{ Main render loop }
|
||||||
console.outputln('KERNEL', 'Entering main render loop.');
|
console.outputln('KERNEL', 'Entering main render loop.');
|
||||||
tracer.push_trace('kmain.MAINLOOP');
|
tracer.push_trace('kmain.MAINLOOP');
|
||||||
|
|||||||
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user