summaryrefslogtreecommitdiffstats
path: root/src/tab-label.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/tab-label.c')
-rw-r--r--src/tab-label.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/tab-label.c b/src/tab-label.c
index 77e6b62..33a6cd8 100644
--- a/src/tab-label.c
+++ b/src/tab-label.c
@@ -492,13 +492,16 @@ mq_tab_label_set_position(MqTabLabel *tab_label, guint position)
void
mq_tab_label_begin_scrolling(MqTabLabel *tab_label)
{
- PangoFontDescription *font_desc;
+ static PangoFontDescription *font_desc = NULL;
+
+ if (!font_desc) {
+ font_desc = pango_font_description_new();
+ pango_font_description_set_family_static(font_desc,
+ "monospace");
+ }
tab_label->scrolling = TRUE;
tab_label->scrolled_title = g_strdup_printf("%s ", tab_label->title);
-
- font_desc = pango_font_description_new();
- pango_font_description_set_family_static(font_desc, "monospace");
gtk_widget_override_font(tab_label->label, font_desc);
}