From 005f063472963d7c5ce9503b51ca96e0eb8dadd843765b696944fb95b200508b Mon Sep 17 00:00:00 2001 From: Alexei Sorokin Date: Sun, 21 May 2017 14:52:06 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/X11:Cinnamon:Factory/nemo?expand=0&rev=105 --- nemo-3.4.1-default-font.patch | 94 +++++++++++++++++++++++++++++++++++ nemo.changes | 6 +++ nemo.spec | 7 ++- 3 files changed, 105 insertions(+), 2 deletions(-) create mode 100644 nemo-3.4.1-default-font.patch diff --git a/nemo-3.4.1-default-font.patch b/nemo-3.4.1-default-font.patch new file mode 100644 index 0000000..882a2d1 --- /dev/null +++ b/nemo-3.4.1-default-font.patch @@ -0,0 +1,94 @@ +--- a/libnemo-private/nemo-icon-canvas-item.c ++++ b/libnemo-private/nemo-icon-canvas-item.c +@@ -1557,14 +1557,18 @@ create_label_layout (NemoIconCanvasItem + pango_layout_set_wrap (layout, PANGO_WRAP_WORD_CHAR); + + /* Create a font description */ +- if (container->details->font) { ++ if (container->details->font && g_strcmp0 (container->details->font, "") != 0) { + desc = pango_font_description_from_string (container->details->font); + } else { + desc = pango_font_description_copy (pango_context_get_font_description (context)); + } +- pango_font_description_set_size (desc, +- pango_font_description_get_size (desc) + +- container->details->font_size_table [container->details->zoom_level]); ++ ++ if (pango_font_description_get_size (desc) > 0) { ++ pango_font_description_set_size (desc, ++ pango_font_description_get_size (desc) + ++ container->details->font_size_table [container->details->zoom_level]); ++ } ++ + pango_layout_set_font_description (layout, desc); + pango_font_description_free (desc); + g_free (zeroified_text); +--- a/libnemo-private/nemo-icon-container.c ++++ b/libnemo-private/nemo-icon-container.c +@@ -7043,16 +7043,18 @@ nemo_icon_container_start_renaming_selec + } + + /* Set the right font */ +- if (details->font) { ++ if (details->font && g_strcmp0 (details->font, "") != 0) { + desc = pango_font_description_from_string (details->font); + } else { + context = gtk_widget_get_pango_context (GTK_WIDGET (container)); + desc = pango_font_description_copy (pango_context_get_font_description (context)); + } + +- pango_font_description_set_size (desc, +- pango_font_description_get_size (desc) + +- container->details->font_size_table [container->details->zoom_level]); ++ if (pango_font_description_get_size (desc) > 0) { ++ pango_font_description_set_size (desc, ++ pango_font_description_get_size (desc) + ++ container->details->font_size_table [container->details->zoom_level]); ++ } + + eel_editable_label_set_font_description (EEL_EDITABLE_LABEL (details->rename_widget), + desc); +--- a/src/nemo-icon-view-grid-container.c ++++ b/src/nemo-icon-view-grid-container.c +@@ -1356,6 +1356,7 @@ get_vertical_adjustment (NemoIconContain + gint icon_size) + { + PangoLayout *layout; ++ PangoContext *context; + PangoFontDescription *desc; + gint ellipses_limit; + gint height; +@@ -1364,10 +1365,18 @@ get_vertical_adjustment (NemoIconContain + + layout = gtk_widget_create_pango_layout (GTK_WIDGET (container), "Test"); + +- desc = pango_font_description_from_string (container->details->font); +- pango_font_description_set_size (desc, +- pango_font_description_get_size (desc) + +- container->details->font_size_table [container->details->zoom_level]); ++ if (container->details->font && g_strcmp0 (container->details->font, "") != 0) { ++ desc = pango_font_description_from_string (container->details->font); ++ } else { ++ context = gtk_widget_get_pango_context (GTK_WIDGET (container)); ++ desc = pango_font_description_copy (pango_context_get_font_description (context)); ++ } ++ ++ if (pango_font_description_get_size (desc) > 0) { ++ pango_font_description_set_size (desc, ++ pango_font_description_get_size (desc) + ++ container->details->font_size_table [container->details->zoom_level]); ++ } + + pango_layout_set_font_description (layout, desc); + +--- a/src/nemo-style-application.css ++++ b/src/nemo-style-application.css +@@ -15,6 +15,8 @@ + + .nemo-desktop.nemo-canvas-item { + color: #eeeeee; ++ font-family: Noto Sans; ++ font-size: 10px; + text-shadow: 1px 1px alpha(black, 0.8); + } + diff --git a/nemo.changes b/nemo.changes index 716908c..41afa80 100644 --- a/nemo.changes +++ b/nemo.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Sun May 21 14:43:01 UTC 2017 - sor.alexei@meowr.ru + +- Add nemo-3.4.1-default-font.patch: Fix usage of the default font + (commit f9c6439, boo#1040024). + ------------------------------------------------------------------- Sun May 7 11:23:03 UTC 2017 - sor.alexei@meowr.ru diff --git a/nemo.spec b/nemo.spec index 843d693..db6a343 100644 --- a/nemo.spec +++ b/nemo.spec @@ -28,9 +28,11 @@ Group: System/GUI/Other Url: https://github.com/linuxmint/nemo Source: https://github.com/linuxmint/%{name}/archive/%{version}/%{name}-%{version}.tar.gz # PATCH-FIX-UPSTREAM nemo-implicit-pointer-decl.patch marguerite@opensuse.org -- OBS gcc checks. -Patch1: %{name}-implicit-pointer-decl.patch +Patch0: %{name}-implicit-pointer-decl.patch # PATCH-FIX-UPSTREAM nemo-void-return-no-return.patch margueirte@opensuse.org -- Fix OBS gcc checks. -Patch2: %{name}-void-return-no-return.patch +Patch1: %{name}-void-return-no-return.patch +# PATCH-FIX-UPSTREAM nemo-3.4.1-default-font.patch boo#1040024 -- Fix usage of the default font (commit f9c6439). +Patch2: %{name}-3.4.1-default-font.patch BuildRequires: autoconf BuildRequires: autoconf-archive BuildRequires: automake @@ -111,6 +113,7 @@ This package provides the GObject Introspection bindings for Nemo. %prep %setup -q +%patch0 -p1 %patch1 -p1 %patch2 -p1