[libreoffice] 113/152: lp#1527053: make notebook tab text readable w/ libreoffice-gtk3

Rene Engelhard rene at moszumanska.debian.org
Thu Jul 27 19:17:05 UTC 2017


This is an automated email from the git hooks/post-receive script.

rene pushed a commit to tag libreoffice_3.5.0_rc3-0ubuntu2
in repository libreoffice.

commit 6808808925f82839fd7f2bbfead4ddfa3081619b
Author: Bjoern Michaelsen <bjoern.michaelsen at canonical.com>
Date:   Mon Oct 10 19:49:07 2016 +0200

    lp#1527053: make notebook tab text readable w/ libreoffice-gtk3
---
 changelog               |  6 ++++++
 patches/lp-1527053.diff | 52 +++++++++++++++++++++++++++++++++++++++++++++++++
 patches/series          |  1 +
 3 files changed, 59 insertions(+)

diff --git a/changelog b/changelog
index 9327f08..4c78362 100644
--- a/changelog
+++ b/changelog
@@ -1,3 +1,9 @@
+libreoffice (1:5.2.2-0ubuntu2) yakkety; urgency=medium
+
+  * make notebook tab text readable w/ libreoffice-gtk3 (LP: #1527053)
+
+ -- Bjoern Michaelsen <bjoern.michaelsen at canonical.com>  Mon, 10 Oct 2016 19:46:56 +0200
+
 libreoffice (1:5.2.2-0ubuntu1) yakkety; urgency=medium
 
   * new upstream release
diff --git a/patches/lp-1527053.diff b/patches/lp-1527053.diff
new file mode 100644
index 0000000..e12135f
--- /dev/null
+++ b/patches/lp-1527053.diff
@@ -0,0 +1,52 @@
+From: Bjoern Michaelsen <bjoern.michaelsen at canonical.com>
+Date: Mon, 10 Oct 2016 19:35:13 +0200
+Subject: [PATCH] lp#1527053: Do not try to derive tab text colors from Ubuntu
+ themes
+
+tab labels are manually painted by LibreOffice still. We are not painting the
+tab background as native gtk3 would, thus using the white from the themes text
+color is rather unreadable. This a vendor-only hotfix that should not be
+upstreamed. Hopefully, for LibreOffice 5.3 a more generic solution is found.
+
+---
+ vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx | 16 +++++++++++++---
+ 1 file changed, 13 insertions(+), 3 deletions(-)
+
+diff --git a/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx b/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx
+--- a/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx
++++ b/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx
+@@ -2029,18 +2029,28 @@ void GtkSalGraphics::updateSettings( AllSettings& rSettings )
+         gtk_style_context_set_state(pCStyle, GTK_STATE_FLAG_NORMAL);
+         gtk_style_context_get_color(pCStyle, gtk_style_context_get_state(pCStyle), &text_color);
+         aTextColor = getColor( text_color );
+-        aStyleSet.SetTabTextColor(aTextColor);
++        static gchar* pTheme(nullptr);
++        static bool isUbuntuTheme(false);
++        if(!pTheme)
++        {
++            g_object_get(pSettings, "gtk-theme-name", &pTheme, NULL);
++            isUbuntuTheme = g_str_equal(pTheme, "Ambiance") || g_str_equal(pTheme, "Radiance");
++        }
++        if(!isUbuntuTheme)
++            aStyleSet.SetTabTextColor(aTextColor);
+ 
+         // mouse over text colors
+         gtk_style_context_set_state(pCStyle, GTK_STATE_FLAG_PRELIGHT);
+         gtk_style_context_get_color(pCStyle, gtk_style_context_get_state(pCStyle), &text_color);
+         aTextColor = getColor( text_color );
+-        aStyleSet.SetTabRolloverTextColor(aTextColor);
++        if(!isUbuntuTheme)
++            aStyleSet.SetTabRolloverTextColor(aTextColor);
+ 
+         gtk_style_context_set_state(pCStyle, ACTIVE_TAB);
+         gtk_style_context_get_color(pCStyle, gtk_style_context_get_state(pCStyle), &text_color);
+         aTextColor = getColor( text_color );
+-        aStyleSet.SetTabHighlightTextColor(aTextColor);
++        if(!isUbuntuTheme)
++            aStyleSet.SetTabHighlightTextColor(aTextColor);
+     }
+ #else
+     {
+-- 
+2.7.4
+
diff --git a/patches/series b/patches/series
index e4a01ca..0e391da 100644
--- a/patches/series
+++ b/patches/series
@@ -30,3 +30,4 @@ lp-753627-readd-updated-Ubuntu-brand-palette-colors.diff
 integraltrans.diff
 mysqlc-boost-fallthrough.diff
 gtk3-toolbar-styleclass.diff
+lp-1527053.diff

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-openoffice/libreoffice.git



More information about the Pkg-openoffice-commits mailing list