[Libreoffice-bugs] [Bug 137705] Setting style color to black makes hard to read style name
bugzilla-daemon at bugs.documentfoundation.org
bugzilla-daemon at bugs.documentfoundation.org
Mon Oct 26 14:57:03 UTC 2020
https://bugs.documentfoundation.org/show_bug.cgi?id=137705
--- Comment #9 from Heiko Tietze <heiko.tietze at documentfoundation.org> ---
While this works I tend to disagree with the request. Setting font color to
black is not the supposed workflow (and Automatic / COL_AUTO would make them
appear in system default, which is white on dark themes).
This code fails when the tree/list is updated (eg. Hide) and misses the
background for the tree canvas; only the rows with content are drawn.
diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx
index e9bfc17fa876..6458cd31275d 100644
--- a/sfx2/source/dialog/templdlg.cxx
+++ b/sfx2/source/dialog/templdlg.cxx
@@ -33,6 +33,7 @@
#include <svl/intitem.hxx>
#include <svl/stritem.hxx>
#include <svl/style.hxx>
+#include <svtools/colorcfg.hxx>
#include <comphelper/processfactory.hxx>
#include <comphelper/sequenceashashmap.hxx>
#include <unotools/intlwrapper.hxx>
@@ -285,7 +286,8 @@ IMPL_LINK(SfxCommonTemplateDialog_Impl, CustomRenderHdl,
weld::TreeView::render_
if (bSelected)
rRenderContext.SetTextColor(rStyleSettings.GetHighlightTextColor());
else
- rRenderContext.SetTextColor(rStyleSettings.GetDialogTextColor());
+ rRenderContext.SetTextColor(
+ svtools::ColorConfig().GetColorValue(svtools::FONTCOLOR).nColor);
bool bSuccess = false;
@@ -773,6 +775,8 @@ void SfxCommonTemplateDialog_Impl::Initialize()
mxFmtLb->set_visible(!bHierarchical);
mxTreeBox->set_visible(bHierarchical);
+ //update colors
+ PreviewHdl(*mxPreviewCheckbox);
Update_Impl();
}
@@ -1940,9 +1944,14 @@ IMPL_LINK_NOARG(SfxCommonTemplateDialog_Impl,
PreviewHdl, weld::Button&, void)
mxFmtLb->clear();
mxFmtLb->set_column_custom_renderer(0, bCustomPreview);
+ mxFmtLb->set_background(
+ bCustomPreview ?
svtools::ColorConfig().GetColorValue(svtools::DOCCOLOR).nColor
+ :
Application::GetSettings().GetStyleSettings().GetWindowColor());
mxTreeBox->clear();
mxTreeBox->set_column_custom_renderer(0, bCustomPreview);
-
+ mxTreeBox->set_background(
+ bCustomPreview ?
svtools::ColorConfig().GetColorValue(svtools::DOCCOLOR).nColor
+ :
Application::GetSettings().GetStyleSettings().GetWindowColor());
FamilySelect(nActFamily, true);
}
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20201026/818c8f06/attachment.htm>
More information about the Libreoffice-bugs
mailing list