diff options
| author | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2016-10-10 19:49:07 +0200 |
|---|---|---|
| committer | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2016-10-10 19:49:07 +0200 |
| commit | 6808808925f82839fd7f2bbfead4ddfa3081619b (patch) | |
| tree | ceea9b59fbd13122e4b60d15b46f5413334d3e82 | |
| parent | 9b1bb200ca59b1400ff734c7b2b21fd67ded31b9 (diff) | |
lp#1527053: make notebook tab text readable w/ libreoffice-gtk3libreoffice_5.2.2_0ubuntu2
| -rw-r--r-- | changelog | 6 | ||||
| -rw-r--r-- | patches/lp-1527053.diff | 52 | ||||
| -rw-r--r-- | patches/series | 1 |
3 files changed, 59 insertions, 0 deletions
@@ -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@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 000000000..e12135fd7 --- /dev/null +++ b/patches/lp-1527053.diff @@ -0,0 +1,52 @@ +From: Bjoern Michaelsen <bjoern.michaelsen@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 e4a01cae3..0e391da65 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 |
