svx/source/dialog/srchdlg.cxx       |    7 +++++--
 svx/source/form/labelitemwindow.cxx |    8 ++++++--
 2 files changed, 11 insertions(+), 4 deletions(-)

New commits:
commit 4702e9ecfc66dc0f624ec73670092fd3062ae327
Author:     Heiko Tietze <tietze.he...@gmail.com>
AuthorDate: Tue Aug 27 11:31:18 2024 +0200
Commit:     Heiko Tietze <heiko.tie...@documentfoundation.org>
CommitDate: Tue Aug 27 14:46:31 2024 +0200

    Resolves tdf#162582 - Muted color for search info on dark themes
    
    Change-Id: Ia4dddc05e0f90c4d3bca1ef8ab860b588743af3b
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172456
    Tested-by: Jenkins
    Reviewed-by: Heiko Tietze <heiko.tie...@documentfoundation.org>

diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx
index 679cc66a2a41..ef32b558b50b 100644
--- a/svx/source/dialog/srchdlg.cxx
+++ b/svx/source/dialog/srchdlg.cxx
@@ -317,7 +317,6 @@ SvxSearchDialog::SvxSearchDialog(weld::Window* pParent, 
SfxChildWindow* pChildWi
     m_xSearchTmplLB->make_sorted();
     m_xSearchAttrText->hide();
 
-    m_xSearchLabel->set_font_color(Color(0x00, 0x47, 0x85));
     this->SetSearchLabel(u""_ustr); // hide the message but keep the box height
     m_xSearchIcon->set_size_request(24, 24); // vcl/res/infobar.png is 32x32 - 
too large here
 
@@ -564,7 +563,11 @@ void SvxSearchDialog::SetSearchLabel(const OUString& rStr)
     {
         m_xSearchLabel->show();
         m_xSearchIcon->show();
-        m_xSearchBox->set_background(Color(0xBD, 0xE5, 0xF8)); // same as 
InfobarType::INFO
+        const StyleSettings& rStyleSettings = 
Application::GetSettings().GetStyleSettings();
+        if (rStyleSettings.GetDialogColor().IsDark())
+            m_xSearchBox->set_background(Color(0x00, 0x56, 0x80));
+        else
+            m_xSearchBox->set_background(Color(0xBD, 0xE5, 0xF8)); // same as 
InfobarType::INFO
     }
     else
     {
diff --git a/svx/source/form/labelitemwindow.cxx 
b/svx/source/form/labelitemwindow.cxx
index ca68e0c426fd..b364bd523ed8 100644
--- a/svx/source/form/labelitemwindow.cxx
+++ b/svx/source/form/labelitemwindow.cxx
@@ -8,6 +8,7 @@
  */
 
 #include <svx/labelitemwindow.hxx>
+#include <vcl/svapp.hxx>
 
 LabelItemWindow::LabelItemWindow(vcl::Window* pParent, const OUString& rLabel)
     : InterimItemWindow(pParent, u"svx/ui/labelbox.ui"_ustr, u"LabelBox"_ustr)
@@ -47,8 +48,11 @@ void LabelItemWindow::set_label(const OUString& rLabel, 
const LabelItemWindowTyp
     else if (eType == LabelItemWindowType::Info)
     {
         m_xImage->show();
-        m_xLabel->set_font_color(Color(0x00, 0x47, 0x85));
-        m_xBox->set_background(Color(0xBD, 0xE5, 0xF8)); // same as 
InfobarType::INFO
+        const StyleSettings& rStyleSettings = 
Application::GetSettings().GetStyleSettings();
+        if (rStyleSettings.GetDialogColor().IsDark())
+            m_xBox->set_background(Color(0x00, 0x56, 0x80));
+        else
+            m_xBox->set_background(Color(0xBD, 0xE5, 0xF8)); // same as 
InfobarType::INFO
     }
     m_xLabel->set_visible(
         true); // always show and not just if !rLabel.isEmpty() to not make 
the chevron appear

Reply via email to