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 :(
This commit is contained in:
flow
2022-04-14 10:52:23 -03:00
parent 277de41200
commit 5f15f51610
4 changed files with 25 additions and 5 deletions

View File

@ -28,6 +28,13 @@ ModPage::ModPage(ModDownloadDialog* dialog, BaseInstance* instance, ModAPI* api)
filter_widget.setInstance(static_cast<MinecraftInstance*>(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()