summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStéphane Guillou <stephane.guillou@member.fsf.org>2024-06-13 15:31:30 +1000
committerHeiko Tietze <heiko.tietze@documentfoundation.org>2024-07-01 09:07:28 +0200
commitc65127e5f6efcc5db93d2f80b9592f458200d596 (patch)
treeef1a3d77a40e3f114e1f89b2da699e8c87b60a71
parent21120ae0ed8025bca68dc05a359b175b3ff9b980 (diff)
tdf#158416: restore infobar text colours
...which were lost with de1b926fa294273caefb29a507e117b8487e882b. rMessageColor is put back into the switch, but uses the settings' warning and error colours introduced by d7fd378b533c42f51d1d363f5da30b1fa1281f67 where applicable. Colours were checked for sufficient contrast in https://gerrit.libreoffice.org/c/core/+/47825 Change-Id: Iba42020b665e35c34f09b3788bcc973b0f8531d1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168761 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
-rw-r--r--sfx2/source/dialog/infobar.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/sfx2/source/dialog/infobar.cxx b/sfx2/source/dialog/infobar.cxx
index 4e1fed849680..e69fe481bccb 100644
--- a/sfx2/source/dialog/infobar.cxx
+++ b/sfx2/source/dialog/infobar.cxx
@@ -42,8 +42,6 @@ namespace
void GetInfoBarColors(InfobarType ibType, BColor& rBackgroundColor, BColor& rForegroundColor,
BColor& rMessageColor)
{
- rMessageColor = basegfx::BColor(0.0, 0.0, 0.0);
-
const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings();
switch (ibType)
@@ -51,18 +49,22 @@ void GetInfoBarColors(InfobarType ibType, BColor& rBackgroundColor, BColor& rFor
case InfobarType::INFO: // blue; #004785/0,71,133; #BDE5F8/189,229,248
rBackgroundColor = basegfx::BColor(0.741, 0.898, 0.973);
rForegroundColor = basegfx::BColor(0.0, 0.278, 0.522);
+ rMessageColor = basegfx::BColor(0.0, 0.278, 0.522);
break;
case InfobarType::SUCCESS: // green; #32550C/50,85,12; #DFF2BF/223,242,191
rBackgroundColor = basegfx::BColor(0.874, 0.949, 0.749);
rForegroundColor = basegfx::BColor(0.196, 0.333, 0.047);
+ rMessageColor = basegfx::BColor(0.196, 0.333, 0.047);
break;
case InfobarType::WARNING: // orange; #704300/112,67,0; #FEEFB3/254,239,179
rBackgroundColor = rSettings.GetWarningColor().getBColor();
rForegroundColor = rSettings.GetWarningTextColor().getBColor();
+ rMessageColor = rSettings.GetWarningTextColor().getBColor();
break;
case InfobarType::DANGER: // red; #7A0006/122,0,6; #FFBABA/255,186,186
rBackgroundColor = rSettings.GetErrorColor().getBColor();
rForegroundColor = rSettings.GetErrorTextColor().getBColor();
+ rMessageColor = rSettings.GetErrorTextColor().getBColor();
break;
}