Accepting request 430457 from GNOME:Next
1 OBS-URL: https://build.opensuse.org/request/show/430457 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gedit?expand=0&rev=211
This commit is contained in:
parent
85557ed70b
commit
29c88a9f0d
87
gedit-fix-font-scaling.patch
Normal file
87
gedit-fix-font-scaling.patch
Normal file
@ -0,0 +1,87 @@
|
||||
From be621916ab616e070c4e49127c88d5b945d2f53d Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?J=C3=BCrg=20Billeter?= <j@bitron.ch>
|
||||
Date: Thu, 22 Sep 2016 18:18:08 +0200
|
||||
Subject: Fix open doc selector font size with text scaling
|
||||
|
||||
https://bugzilla.gnome.org/show_bug.cgi?id=771167
|
||||
---
|
||||
gedit/gedit-open-document-selector.c | 20 +++++++++++---------
|
||||
1 file changed, 11 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/gedit/gedit-open-document-selector.c b/gedit/gedit-open-document-selector.c
|
||||
index 77075cd..327ecbf 100644
|
||||
--- a/gedit/gedit-open-document-selector.c
|
||||
+++ b/gedit/gedit-open-document-selector.c
|
||||
@@ -52,9 +52,9 @@ struct _GeditOpenDocumentSelector
|
||||
GtkWidget *scrolled_window;
|
||||
|
||||
GdkRGBA name_label_color;
|
||||
- gdouble name_font_size;
|
||||
+ PangoFontDescription *name_font;
|
||||
GdkRGBA path_label_color;
|
||||
- gdouble path_font_size;
|
||||
+ PangoFontDescription *path_font;
|
||||
|
||||
GeditOpenDocumentSelectorStore *selector_store;
|
||||
GList *recent_items;
|
||||
@@ -718,6 +718,9 @@ gedit_open_document_selector_dispose (GObject *object)
|
||||
}
|
||||
}
|
||||
|
||||
+ g_clear_pointer (&selector->name_font, pango_font_description_free);
|
||||
+ g_clear_pointer (&selector->path_font, pango_font_description_free);
|
||||
+
|
||||
if (selector->recent_items)
|
||||
{
|
||||
gedit_open_document_selector_free_file_items_list (selector->recent_items);
|
||||
@@ -1075,9 +1078,10 @@ on_treeview_style_updated (GtkWidget *widget,
|
||||
gtk_style_context_get_state (context),
|
||||
&selector->name_label_color);
|
||||
|
||||
+ g_clear_pointer (&selector->name_font, pango_font_description_free);
|
||||
gtk_style_context_get (context,
|
||||
gtk_style_context_get_state (context),
|
||||
- "font-size", &selector->name_font_size,
|
||||
+ "font", &selector->name_font,
|
||||
NULL);
|
||||
|
||||
gtk_style_context_restore (context);
|
||||
@@ -1090,15 +1094,13 @@ on_treeview_style_updated (GtkWidget *widget,
|
||||
gtk_style_context_get_state (context),
|
||||
&selector->path_label_color);
|
||||
|
||||
+ g_clear_pointer (&selector->path_font, pango_font_description_free);
|
||||
gtk_style_context_get (context,
|
||||
gtk_style_context_get_state (context),
|
||||
- "font-size", &selector->path_font_size,
|
||||
+ "font", &selector->path_font,
|
||||
NULL);
|
||||
|
||||
gtk_style_context_restore (context);
|
||||
-
|
||||
- selector->name_font_size = selector->name_font_size * 72.0 / 96.0;
|
||||
- selector->path_font_size = selector->path_font_size * 72.0 / 96.0;
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -1109,7 +1111,7 @@ name_renderer_datafunc (GtkTreeViewColumn *column G_GNUC_UNUSED,
|
||||
GeditOpenDocumentSelector *selector)
|
||||
{
|
||||
g_object_set (selector->name_renderer, "foreground-rgba", &selector->name_label_color, NULL);
|
||||
- g_object_set (selector->name_renderer, "size-points", selector->name_font_size, NULL);
|
||||
+ g_object_set (selector->name_renderer, "font-desc", selector->name_font, NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -1120,7 +1122,7 @@ path_renderer_datafunc (GtkTreeViewColumn *column G_GNUC_UNUSED,
|
||||
GeditOpenDocumentSelector *selector)
|
||||
{
|
||||
g_object_set (selector->path_renderer, "foreground-rgba", &selector->path_label_color, NULL);
|
||||
- g_object_set (selector->path_renderer, "size-points", selector->path_font_size, NULL);
|
||||
+ g_object_set (selector->path_renderer, "font-desc", selector->path_font, NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
--
|
||||
cgit v0.12
|
||||
|
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Sun Sep 25 18:48:03 UTC 2016 - zaitor@opensuse.org
|
||||
|
||||
- Add gedit-fix-font-scaling.patch: Fix open doc selector font size
|
||||
with text scaling (bgo#771167).
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Sep 18 19:49:49 UTC 2016 - zaitor@opensuse.org
|
||||
|
||||
|
@ -28,6 +28,8 @@ Url: http://www.gnome.org
|
||||
Source: http://download.gnome.org/sources/gedit/3.22/%{name}-%{version}.tar.xz
|
||||
# PATCH-FIX-OPENSUSE gedit-desktop.patch -- Adds more MIME types.
|
||||
Patch0: gedit-desktop.patch
|
||||
# PATCH-FIX-UPSTREAM gedit-fix-font-scaling.patch bgo#771167 zaitor@opensuse.org -- Fix open doc selector font size with text scaling
|
||||
Patch1: gedit-fix-font-scaling.patch
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: gettext
|
||||
BuildRequires: gtk-doc
|
||||
@ -109,6 +111,7 @@ environment.
|
||||
translation-update-upstream
|
||||
%endif
|
||||
%patch0 -p0
|
||||
%patch1 -p1
|
||||
|
||||
%build
|
||||
%configure \
|
||||
|
Loading…
x
Reference in New Issue
Block a user