Skip to content

Commit 5c97bf7

Browse files
committed
[C libgui] Ensure scroll views run an initial sizer
1 parent 6e0c6f0 commit 5c97bf7

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

programs/subprojects/libgui/gui_scroll_view.c

+2
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,8 @@ void gui_scroll_view_init(gui_scroll_view_t* view, gui_window_t* window, gui_win
196196
(gui_window_resized_cb_t)_scrollbar_sizer
197197
);
198198
view->scrollbar->scroll_position_updated_cb = (gui_scrollbar_updated_cb_t)_scrollbar_position_updated;
199+
200+
_scroll_view_window_resized(view, window->size);
199201
}
200202

201203
void gui_scroll_view_add_subview(gui_view_t* superview, gui_scroll_view_t* subview) {

programs/subprojects/libgui/gui_view.c

+2
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ void gui_view_set_title(gui_view_t* v, char* title) {
6363

6464
if (title != NULL) {
6565
v->_title = strdup(title);
66+
//v->title_bar_height = max(10, v->frame.size.height / 14);
67+
v->title_bar_height = 14;
6668
// View title
6769
v->_title_inset.size = size_make(
6870
v->frame.size.width,

0 commit comments

Comments
 (0)