mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-08-06 13:58:40 +00:00
prioritize title-bar-client-areas over built-in window borders; expand top bar rect a bit to ensure edge of window coverage
This commit is contained in:
+2
-2
@@ -3308,7 +3308,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds)
|
|||||||
//
|
//
|
||||||
Rng2F32 window_rect = os_client_rect_from_window(ws->os);
|
Rng2F32 window_rect = os_client_rect_from_window(ws->os);
|
||||||
Vec2F32 window_rect_dim = dim_2f32(window_rect);
|
Vec2F32 window_rect_dim = dim_2f32(window_rect);
|
||||||
Rng2F32 top_bar_rect = r2f32p(window_rect.x0, window_rect.y0, window_rect.x0+window_rect_dim.x, window_rect.y0+ui_top_pref_height().value);
|
Rng2F32 top_bar_rect = r2f32p(window_rect.x0, window_rect.y0, window_rect.x0+window_rect_dim.x+1, window_rect.y0+ui_top_pref_height().value);
|
||||||
Rng2F32 bottom_bar_rect = r2f32p(window_rect.x0, window_rect_dim.y - ui_top_pref_height().value, window_rect.x0+window_rect_dim.x, window_rect.y0+window_rect_dim.y);
|
Rng2F32 bottom_bar_rect = r2f32p(window_rect.x0, window_rect_dim.y - ui_top_pref_height().value, window_rect.x0+window_rect_dim.x, window_rect.y0+window_rect_dim.y);
|
||||||
Rng2F32 content_rect = r2f32p(window_rect.x0, top_bar_rect.y1, window_rect.x0+window_rect_dim.x, bottom_bar_rect.y0);
|
Rng2F32 content_rect = r2f32p(window_rect.x0, top_bar_rect.y1, window_rect.x0+window_rect_dim.x, bottom_bar_rect.y0);
|
||||||
F32 window_edge_px = os_dpi_from_window(ws->os)*0.035f;
|
F32 window_edge_px = os_dpi_from_window(ws->os)*0.035f;
|
||||||
@@ -5302,7 +5302,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds)
|
|||||||
}
|
}
|
||||||
os_window_push_custom_title_bar_client_area(ws->os, min_sig.box->rect);
|
os_window_push_custom_title_bar_client_area(ws->os, min_sig.box->rect);
|
||||||
os_window_push_custom_title_bar_client_area(ws->os, max_sig.box->rect);
|
os_window_push_custom_title_bar_client_area(ws->os, max_sig.box->rect);
|
||||||
os_window_push_custom_title_bar_client_area(ws->os, cls_sig.box->rect);
|
os_window_push_custom_title_bar_client_area(ws->os, pad_2f32(cls_sig.box->rect, 2.f));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -771,12 +771,6 @@ w32_wnd_proc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||||||
result = HTCAPTION;
|
result = HTCAPTION;
|
||||||
}
|
}
|
||||||
|
|
||||||
// rjf: title bar client area
|
|
||||||
if(is_over_title_bar_client_area)
|
|
||||||
{
|
|
||||||
result = HTCLIENT;
|
|
||||||
}
|
|
||||||
|
|
||||||
// rjf: normal edges
|
// rjf: normal edges
|
||||||
if(is_over_left) { result = HTLEFT; }
|
if(is_over_left) { result = HTLEFT; }
|
||||||
if(is_over_right) { result = HTRIGHT; }
|
if(is_over_right) { result = HTRIGHT; }
|
||||||
@@ -788,6 +782,12 @@ w32_wnd_proc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||||||
if(is_over_left && is_over_bottom) { result = HTBOTTOMLEFT; }
|
if(is_over_left && is_over_bottom) { result = HTBOTTOMLEFT; }
|
||||||
if(is_over_right && is_over_top) { result = HTTOPRIGHT; }
|
if(is_over_right && is_over_top) { result = HTTOPRIGHT; }
|
||||||
if(is_over_right && is_over_bottom) { result = HTBOTTOMRIGHT; }
|
if(is_over_right && is_over_bottom) { result = HTBOTTOMRIGHT; }
|
||||||
|
|
||||||
|
// rjf: title bar client area
|
||||||
|
if(is_over_title_bar_client_area)
|
||||||
|
{
|
||||||
|
result = HTCLIENT;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}break;
|
}break;
|
||||||
|
|||||||
Reference in New Issue
Block a user