[Libreoffice-commits] core.git: svtools/source
Mike Kaganski (via logerrit)
logerrit at kemper.freedesktop.org
Thu Apr 1 13:15:38 UTC 2021
svtools/source/control/tabbar.cxx | 22 ++++++++++------------
1 file changed, 10 insertions(+), 12 deletions(-)
New commits:
commit 754c6ca0df38de97f008feb2a8b027c836bc212b
Author: Mike Kaganski <mike.kaganski at collabora.com>
AuthorDate: Thu Apr 1 12:39:06 2021 +0300
Commit: Mike Kaganski <mike.kaganski at collabora.com>
CommitDate: Thu Apr 1 15:14:58 2021 +0200
tdf#141396: make sure that line color differs from the rest of the tab
Change-Id: I9740fbfd776e8b4daa4e86d2ac978028535783b3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113448
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>
diff --git a/svtools/source/control/tabbar.cxx b/svtools/source/control/tabbar.cxx
index 640d767477d6..445dd838202f 100644
--- a/svtools/source/control/tabbar.cxx
+++ b/svtools/source/control/tabbar.cxx
@@ -125,18 +125,16 @@ public:
void drawColorLine()
{
- if (mbCustomColored && mbSelected)
- {
- mrRenderContext.SetFillColor(maCustomColor);
- mrRenderContext.SetLineColor(maCustomColor);
- mrRenderContext.DrawRect(maLineRect);
- }
- else if (mbSelected)
- {
- mrRenderContext.SetFillColor(mrStyleSettings.GetDarkShadowColor());
- mrRenderContext.SetLineColor(mrStyleSettings.GetDarkShadowColor());
- mrRenderContext.DrawRect(maLineRect);
- }
+ if (!mbSelected)
+ return;
+
+ // tdf#141396: the color must be different from the rest of the selected tab
+ Color aLineColor = (mbCustomColored && maCustomColor != maSelectedColor)
+ ? maCustomColor
+ : mrStyleSettings.GetDarkShadowColor();
+ mrRenderContext.SetFillColor(aLineColor);
+ mrRenderContext.SetLineColor(aLineColor);
+ mrRenderContext.DrawRect(maLineRect);
}
void drawTab()
More information about the Libreoffice-commits
mailing list