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