mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-07 09:56:59 +00:00
Fixed default-size for combo-box window (finally).
This commit is contained in:
parent
2966863d24
commit
4c5ea8f429
@ -543,11 +543,14 @@ static void combobox_open_window(JWidget widget)
|
|||||||
combobox->window->set_ontop(true);
|
combobox->window->set_ontop(true);
|
||||||
jwidget_noborders(combobox->window);
|
jwidget_noborders(combobox->window);
|
||||||
|
|
||||||
|
Widget* viewport = jview_get_viewport(view);
|
||||||
size = jlist_length(combobox->items);
|
size = jlist_length(combobox->items);
|
||||||
jwidget_set_min_size
|
jwidget_set_min_size
|
||||||
(view,
|
(viewport,
|
||||||
combobox->button->rc->x2 - combobox->entry->rc->x1,
|
combobox->button->rc->x2 - combobox->entry->rc->x1 - view->border_width.l - view->border_width.r,
|
||||||
2+(2+jwidget_get_text_height(combobox->listbox))*MID(1, size, 16)+2);
|
+viewport->border_width.t
|
||||||
|
+(2*jguiscale()+jwidget_get_text_height(combobox->listbox))*MID(1, size, 16)+
|
||||||
|
+viewport->border_width.b);
|
||||||
|
|
||||||
jwidget_add_child(combobox->window, view);
|
jwidget_add_child(combobox->window, view);
|
||||||
jview_attach(view, combobox->listbox);
|
jview_attach(view, combobox->listbox);
|
||||||
|
Loading…
Reference in New Issue
Block a user