[gnome-builder] GbSourceView: invalidate text window when font changes
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] GbSourceView: invalidate text window when font changes
- Date: Fri, 19 Dec 2014 02:39:19 +0000 (UTC)
commit 891dfe1861d5e827eda33f79cc1b0ea32a2c59d4
Author: Christian Hergert <christian hergert me>
Date: Thu Dec 18 18:39:01 2014 -0800
GbSourceView: invalidate text window when font changes
src/editor/gb-source-view.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/src/editor/gb-source-view.c b/src/editor/gb-source-view.c
index 986ebdf..a050b99 100644
--- a/src/editor/gb-source-view.c
+++ b/src/editor/gb-source-view.c
@@ -1725,6 +1725,7 @@ gb_source_view_set_font_name (GbSourceView *view,
const gchar *font_name)
{
PangoFontDescription *font_desc;
+ GdkWindow *window;
g_return_if_fail (GB_IS_SOURCE_VIEW (view));
@@ -1746,7 +1747,10 @@ gb_source_view_set_font_name (GbSourceView *view,
else
gtk_css_provider_load_from_data (view->priv->css_provider, "", -1, NULL);
- gtk_widget_queue_resize (GTK_WIDGET (view));
+ window = gtk_text_view_get_window (GTK_TEXT_VIEW (view),
+ GTK_TEXT_WINDOW_WIDGET);
+ if (window)
+ gdk_window_invalidate_rect (window, NULL, TRUE);
}
GbSourceAutoIndenter *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]