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)
width = gtk_widget_get_allocated_width (parent);
width -= margin_left + margin_right;
if (width < 1)
width = 1;
if (prefs.hex_gui_topicbar_multiline && !prefs.hex_gui_mode_buttons_inline)
/* Until we have a usable allocation, keep a single-line height.
* The size-allocate callback will measure the wrapped topic again. */
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_wrap (layout, PANGO_WRAP_WORD_CHAR);
@@ -3618,7 +3618,7 @@ mg_topicbar_update_height (GtkWidget *topic)
if (line_height <= 0)
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;
if (line_count <= 0)
line_count = 1;