fix: fix spacing and button layout for save dialog
This commit is contained in:
@@ -291,8 +291,10 @@ FileDialogLayout file_layout(const FileDialogState* st) {
|
|||||||
lo.content_rect = {0, TOOLBAR_H + PATHBAR_H, g_app.win.width, g_app.win.height - TOOLBAR_H - PATHBAR_H - footer_h};
|
lo.content_rect = {0, TOOLBAR_H + PATHBAR_H, g_app.win.width, g_app.win.height - TOOLBAR_H - PATHBAR_H - footer_h};
|
||||||
lo.footer_rect = {0, g_app.win.height - footer_h, g_app.win.width, footer_h};
|
lo.footer_rect = {0, g_app.win.height - footer_h, g_app.win.width, footer_h};
|
||||||
lo.list_rect = lo.content_rect;
|
lo.list_rect = lo.content_rect;
|
||||||
int btn_y = lo.footer_rect.y + footer_h - BUTTON_H - 12;
|
int btn_y = (g_app.request.mode == gui::dialogs::FILE_DIALOG_SAVE)
|
||||||
lo.confirm_btn = {g_app.win.width - BUTTON_W - 16, btn_y, BUTTON_W, BUTTON_H};
|
? lo.footer_rect.y + 12
|
||||||
|
: lo.footer_rect.y + (footer_h - BUTTON_H) / 2;
|
||||||
|
lo.confirm_btn = {g_app.win.width - BUTTON_W - 8, btn_y, BUTTON_W, BUTTON_H};
|
||||||
lo.cancel_btn = {lo.confirm_btn.x - BUTTON_W - 8, btn_y, BUTTON_W, BUTTON_H};
|
lo.cancel_btn = {lo.confirm_btn.x - BUTTON_W - 8, btn_y, BUTTON_W, BUTTON_H};
|
||||||
lo.name_rect = {88, lo.footer_rect.y + 12, lo.cancel_btn.x - 100, 30};
|
lo.name_rect = {88, lo.footer_rect.y + 12, lo.cancel_btn.x - 100, 30};
|
||||||
if (lo.name_rect.w < 120) lo.name_rect.w = 120;
|
if (lo.name_rect.w < 120) lo.name_rect.w = 120;
|
||||||
|
|||||||
@@ -32,8 +32,8 @@ constexpr int FILE_INIT_H = 520;
|
|||||||
|
|
||||||
constexpr int TOOLBAR_H = 32;
|
constexpr int TOOLBAR_H = 32;
|
||||||
constexpr int PATHBAR_H = 32;
|
constexpr int PATHBAR_H = 32;
|
||||||
constexpr int FOOTER_H_OPEN = 64;
|
constexpr int FOOTER_H_OPEN = 54;
|
||||||
constexpr int FOOTER_H_SAVE = 74;
|
constexpr int FOOTER_H_SAVE = 54;
|
||||||
constexpr int HEADER_H = 20;
|
constexpr int HEADER_H = 20;
|
||||||
constexpr int ITEM_H = 24;
|
constexpr int ITEM_H = 24;
|
||||||
constexpr int SCROLLBAR_W = 12;
|
constexpr int SCROLLBAR_W = 12;
|
||||||
|
|||||||
Reference in New Issue
Block a user