mirror of
https://github.com/BoredDevNL/BoredOS.git
synced 2026-05-15 10:48:38 +00:00
QEMU resolution fix
This commit is contained in:
parent
18c91bf587
commit
071620b71e
8 changed files with 35 additions and 20 deletions
3
Makefile
3
Makefile
|
|
@ -118,4 +118,5 @@ clean:
|
|||
run: $(ISO_IMAGE)
|
||||
qemu-system-x86_64 -m 2G -serial stdio -cdrom $(ISO_IMAGE) -boot d \
|
||||
-audiodev coreaudio,id=audio0 -machine pcspk-audiodev=audio0 \
|
||||
-netdev user,id=net0,hostfwd=udp::12345-:12345 -device e1000,netdev=net0
|
||||
-netdev user,id=net0,hostfwd=udp::12345-:12345 -device e1000,netdev=net0 \
|
||||
-vga std -global VGA.xres=1920 -global VGA.yres=1080
|
||||
|
|
|
|||
BIN
brewos.iso
BIN
brewos.iso
Binary file not shown.
BIN
build/brewos.elf
BIN
build/brewos.elf
Binary file not shown.
BIN
build/explorer.o
BIN
build/explorer.o
Binary file not shown.
BIN
build/wm.o
BIN
build/wm.o
Binary file not shown.
Binary file not shown.
|
|
@ -592,6 +592,7 @@ static int explorer_build_context_menu(ExplorerContextItem *items_out) {
|
|||
|
||||
if (!is_dir) {
|
||||
items_out[count++] = (ExplorerContextItem){"Open", 100, true, COLOR_BLACK};
|
||||
items_out[count++] = (ExplorerContextItem){"Open w/ textedit", 110, true, COLOR_BLACK};
|
||||
if (explorer_is_markdown_file(items[file_context_menu_item].name)) {
|
||||
items_out[count++] = (ExplorerContextItem){"Open w/ Markdown", 109, true, COLOR_BLACK};
|
||||
}
|
||||
|
|
@ -944,21 +945,6 @@ static void explorer_paint(Window *win) {
|
|||
draw_button(win->x + win->w - 160, offset_y + 4, 30, 30, "^", false);
|
||||
draw_button(win->x + win->w - 125, offset_y + 4, 30, 30, "v", false);
|
||||
|
||||
// Draw dropdown menu if visible
|
||||
if (dropdown_menu_visible) {
|
||||
int menu_x = dropdown_btn_x;
|
||||
int menu_y = offset_y + 34;
|
||||
|
||||
// Draw menu background
|
||||
draw_rect(menu_x, menu_y, DROPDOWN_MENU_WIDTH, dropdown_menu_item_height * DROPDOWN_MENU_ITEMS, COLOR_LTGRAY);
|
||||
draw_bevel_rect(menu_x, menu_y, DROPDOWN_MENU_WIDTH, dropdown_menu_item_height * DROPDOWN_MENU_ITEMS, true);
|
||||
|
||||
// Draw menu items
|
||||
draw_string(menu_x + 8, menu_y + 5, "New File", COLOR_BLACK);
|
||||
draw_string(menu_x + 8, menu_y + dropdown_menu_item_height + 5, "New Folder", COLOR_BLACK);
|
||||
draw_string(menu_x + 8, menu_y + dropdown_menu_item_height * 2 + 5, "Delete", COLOR_RED);
|
||||
}
|
||||
|
||||
// Draw file list
|
||||
int content_start_y = offset_y + 40;
|
||||
|
||||
|
|
@ -994,6 +980,21 @@ static void explorer_paint(Window *win) {
|
|||
|
||||
graphics_clear_clipping();
|
||||
|
||||
// Draw dropdown menu if visible
|
||||
if (dropdown_menu_visible) {
|
||||
int menu_x = dropdown_btn_x;
|
||||
int menu_y = offset_y + 34;
|
||||
|
||||
// Draw menu background
|
||||
draw_rect(menu_x, menu_y, DROPDOWN_MENU_WIDTH, dropdown_menu_item_height * DROPDOWN_MENU_ITEMS, COLOR_LTGRAY);
|
||||
draw_bevel_rect(menu_x, menu_y, DROPDOWN_MENU_WIDTH, dropdown_menu_item_height * DROPDOWN_MENU_ITEMS, true);
|
||||
|
||||
// Draw menu items
|
||||
draw_string(menu_x + 8, menu_y + 5, "New File", COLOR_BLACK);
|
||||
draw_string(menu_x + 8, menu_y + dropdown_menu_item_height + 5, "New Folder", COLOR_BLACK);
|
||||
draw_string(menu_x + 8, menu_y + dropdown_menu_item_height * 2 + 5, "Delete", COLOR_RED);
|
||||
}
|
||||
|
||||
// Draw dialogs
|
||||
if (dialog_state == DIALOG_CREATE_FILE) {
|
||||
int dlg_x = win->x + win->w / 2 - 150;
|
||||
|
|
@ -1615,6 +1616,20 @@ static void explorer_handle_file_context_menu_click(Window *win, int x, int y) {
|
|||
explorer_clipboard_copy(full_path);
|
||||
} else if (clicked_action == 106) { // Delete
|
||||
dialog_open_delete_confirm(file_context_menu_item);
|
||||
} else if (clicked_action == 110) { // Open with Text Editor
|
||||
win_editor.visible = true; win_editor.focused = true;
|
||||
int max_z = 0;
|
||||
if (win_explorer.z_index > max_z) max_z = win_explorer.z_index;
|
||||
if (win_cmd.z_index > max_z) max_z = win_cmd.z_index;
|
||||
if (win_notepad.z_index > max_z) max_z = win_notepad.z_index;
|
||||
if (win_calculator.z_index > max_z) max_z = win_calculator.z_index;
|
||||
if (win_editor.z_index > max_z) max_z = win_editor.z_index;
|
||||
if (win_markdown.z_index > max_z) max_z = win_markdown.z_index;
|
||||
if (win_control_panel.z_index > max_z) max_z = win_control_panel.z_index;
|
||||
if (win_about.z_index > max_z) max_z = win_about.z_index;
|
||||
if (win_minesweeper.z_index > max_z) max_z = win_minesweeper.z_index;
|
||||
win_editor.z_index = max_z + 1;
|
||||
editor_open_file(full_path);
|
||||
} else if (clicked_action == ACTION_RESTORE) {
|
||||
explorer_restore_file(file_context_menu_item);
|
||||
} else if (clicked_action == ACTION_CREATE_SHORTCUT) {
|
||||
|
|
|
|||
|
|
@ -81,8 +81,8 @@ static int desktop_icon_count = 0;
|
|||
// Desktop Settings
|
||||
bool desktop_snap_to_grid = true;
|
||||
bool desktop_auto_align = true;
|
||||
int desktop_max_rows_per_col = 9;
|
||||
int desktop_max_cols = 15;
|
||||
int desktop_max_rows_per_col = 13;
|
||||
int desktop_max_cols = 23;
|
||||
|
||||
// Helper to check if string ends with suffix
|
||||
static bool str_ends_with(const char *str, const char *suffix) {
|
||||
|
|
@ -203,8 +203,7 @@ static void refresh_desktop_icons(void) {
|
|||
if (grid_y >= desktop_max_rows_per_col) {
|
||||
grid_y = 0;
|
||||
grid_x++;
|
||||
// Skip if we reached the recycle bin column/row?
|
||||
// No, just fill. If we reach max files, we stop adding.
|
||||
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in a new issue