summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorHeiko Tietze <tietze.heiko@gmail.com>2024-08-27 11:31:18 +0200
committerAdolfo Jayme Barrientos <fitojb@ubuntu.com>2024-08-27 20:59:09 +0200
commit9d4cdb391d41a36f622d626314691a53528590df (patch)
tree4700366b7df7ac0297658fc989973b7461ac46d6 /svx
parent69c501b7d7d3df1c6dbc835a8d71b4e1077ec40d (diff)
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.tietze@documentfoundation.org> (cherry picked from commit 4702e9ecfc66dc0f624ec73670092fd3062ae327) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172485 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
Diffstat (limited to 'svx')
-rw-r--r--svx/source/dialog/srchdlg.cxx7
-rw-r--r--svx/source/form/labelitemwindow.cxx8
2 files changed, 11 insertions, 4 deletions
diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx
index dcb7e7d87a7b..f614a8a9aeb7 100644
--- a/svx/source/dialog/srchdlg.cxx
+++ b/svx/source/dialog/srchdlg.cxx
@@ -321,7 +321,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
@@ -568,7 +567,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