mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-12-05 22:42:06 +00:00
1 file changed
+4
-4
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user