diff options
| author | Matthias Melcher <github@matthiasm.com> | 2023-07-20 13:48:43 +0200 |
|---|---|---|
| committer | Matthias Melcher <github@matthiasm.com> | 2023-07-20 13:49:19 +0200 |
| commit | 43fe6ee02720782ce9da715b57c8d0037e6ef641 (patch) | |
| tree | 10ba1b2a287ba93c4dc15b3a5340549c3a9f57b1 /fluid/Fl_Window_Type.cxx | |
| parent | 4ec02555ef84965cc83e62e4181f091103bfb269 (diff) | |
FLUID improves positioning and sizing new widgets
Better default sizes for text based widgets and menu managers
Better Menu refresh on custom text heights
Smarter positioning of menu bars and groups inside tabs
Fixes wrong include guard
Diffstat (limited to 'fluid/Fl_Window_Type.cxx')
| -rw-r--r-- | fluid/Fl_Window_Type.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fluid/Fl_Window_Type.cxx b/fluid/Fl_Window_Type.cxx index 236a736a8..f74e0eae1 100644 --- a/fluid/Fl_Window_Type.cxx +++ b/fluid/Fl_Window_Type.cxx @@ -207,7 +207,7 @@ int Overlay_Window::handle(int e) { */ Fl_Type *Fl_Window_Type::make(Strategy strategy) { Fl_Type *p = Fl_Type::current; - while (p && !p->is_code_block()) p = p->parent; + while (p && (!p->is_code_block() || p->is_a(ID_Widget_Class))) p = p->parent; if (!p) { fl_message("Please select a function"); return 0; @@ -307,8 +307,8 @@ void Fl_Window_Type::ideal_size(int &w, int &h) { int screen = Fl::screen_num(win->x(), win->y()); Fl::screen_work_area(sx, sy, sw, sh, screen); w = fd_min(w, sw*3/4); h = fd_min(h, sh*3/4); - Fd_Snap_Action::better_size(w, h); } + Fd_Snap_Action::better_size(w, h); } @@ -966,7 +966,7 @@ int Fl_Window_Type::handle(int event) { { Fl_Type *cc = Fl_Type::current; Fl_Type::current = Fl_Type::current_dnd; - add_new_widget_from_user(prototype, kAddAfterCurrent); + add_new_widget_from_user(prototype, kAddAsLastChild); Fl_Type::current = cc; } else { add_new_widget_from_user(prototype, kAddAsLastChild); |
