From 5f15f51610f861521afdb295df0de6d9407ba951 Mon Sep 17 00:00:00 2001 From: flow Date: Thu, 14 Apr 2022 10:52:23 -0300 Subject: ui: underline search button text when changing filters This hopefully makes it easier to the user to know that their changes will only apply after hitting the search button. I tried setting the background color, but it seems more unreliable on cross-platform than underlining. Also, it could be worse for daltonic people, so I don't know what to do :( --- launcher/ui/pages/modplatform/ModPage.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'launcher/ui/pages/modplatform') diff --git a/launcher/ui/pages/modplatform/ModPage.cpp b/launcher/ui/pages/modplatform/ModPage.cpp index 57c2e45d..29f6b601 100644 --- a/launcher/ui/pages/modplatform/ModPage.cpp +++ b/launcher/ui/pages/modplatform/ModPage.cpp @@ -28,6 +28,13 @@ ModPage::ModPage(ModDownloadDialog* dialog, BaseInstance* instance, ModAPI* api) filter_widget.setInstance(static_cast(m_instance)); m_filter = filter_widget.getFilter(); + + connect(&filter_widget, &ModFilterWidget::filterChanged, this, [&]{ + ui->searchButton->setStyleSheet("text-decoration: underline"); + }); + connect(&filter_widget, &ModFilterWidget::filterUnchanged, this, [&]{ + ui->searchButton->setStyleSheet("text-decoration: none"); + }); } ModPage::~ModPage() -- cgit