summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2021-04-01 12:39:06 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2021-04-01 15:14:58 +0200
commit754c6ca0df38de97f008feb2a8b027c836bc212b (patch)
tree16137ec4fbf8c25098703430ea6dab2f47703b6d /svtools
parent3b704dc06bd39593b14e0dc6b47ba4c9f7d853d0 (diff)
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@collabora.com>
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/control/tabbar.cxx22
1 files changed, 10 insertions, 12 deletions
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()