This commit is contained in:
deepend committed 2026-12-05 08:42:39 -06:00
1 parent 6639940001
commit 28ead54827
1 file changed
+4 -4
+4 -4
View File
@@ -3600,9 +3600,9 @@ mg_topicbar_update_height (GtkWidget *topic)
if (width <= 1 && parent) if (width <= 1 && parent)
width = gtk_widget_get_allocated_width (parent); width = gtk_widget_get_allocated_width (parent);
width -= margin_left + margin_right; width -= margin_left + margin_right;
if (width < 1) /* Until we have a usable allocation, keep a single-line height.
width = 1; * The size-allocate callback will measure the wrapped topic again. */
if (prefs.hex_gui_topicbar_multiline && !prefs.hex_gui_mode_buttons_inline) if (width > 0 && prefs.hex_gui_topicbar_multiline && !prefs.hex_gui_mode_buttons_inline)
{ {
pango_layout_set_width (layout, width * PANGO_SCALE); pango_layout_set_width (layout, width * PANGO_SCALE);
pango_layout_set_wrap (layout, PANGO_WRAP_WORD_CHAR); pango_layout_set_wrap (layout, PANGO_WRAP_WORD_CHAR);
@@ -3618,7 +3618,7 @@ mg_topicbar_update_height (GtkWidget *topic)
if (line_height <= 0) if (line_height <= 0)
line_height = 16; line_height = 16;
line_count = prefs.hex_gui_topicbar_multiline && !prefs.hex_gui_mode_buttons_inline ? line_count = width > 0 && prefs.hex_gui_topicbar_multiline && !prefs.hex_gui_mode_buttons_inline ?
pango_layout_get_line_count (layout) : 1; pango_layout_get_line_count (layout) : 1;
if (line_count <= 0) if (line_count <= 0)
line_count = 1; line_count = 1;