mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-11-10 20:13:24 -08:00
[Icons] Refine VDE and VDD emphasis and semantics
The visual database filter section and the syntax help are information aids, so paint them with the informational family at the default emphasis: the filter section glyph and the search field's help glyph. The help glyph leaves quiet emphasis because it is a clickable action, not a field label. The visual deck editor's display-type toggle is the one control that changes the whole view, so it takes primary emphasis. The search glyphs stay quiet; only the help action changes.
This commit is contained in:
parent
9162dcdede
commit
cbe938051d
3 changed files with 7 additions and 5 deletions
|
|
@ -45,13 +45,15 @@ VisualDatabaseDisplayFilterToolbarWidget::VisualDatabaseDisplayFilterToolbarWidg
|
|||
sortGroupBox = new QGroupBox(this);
|
||||
filterGroupBox = new QGroupBox(this);
|
||||
|
||||
auto scalePixmap = [](const QString &prefix) { return loadThemedIcon(prefix).pixmap({20, 20}); };
|
||||
auto scalePixmap = [](const QString &prefix, const IconTint &tint = {}) {
|
||||
return loadThemedIcon(prefix, tint).pixmap({20, 20});
|
||||
};
|
||||
|
||||
sortByLabel = new QLabel(this);
|
||||
sortByLabel->setPixmap(scalePixmap("icons/sort_arrow_down"));
|
||||
|
||||
filterByLabel = new QLabel(this);
|
||||
filterByLabel->setPixmap(scalePixmap("icons/filter"));
|
||||
filterByLabel->setPixmap(scalePixmap("icons/filter", AppColor::Informational));
|
||||
|
||||
sortColumnCombo = new QComboBox(this);
|
||||
sortColumnCombo->setSizeAdjustPolicy(QComboBox::SizeAdjustPolicy::AdjustToContents);
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ VisualDatabaseDisplayWidget::VisualDatabaseDisplayWidget(QWidget *parent,
|
|||
searchEdit->setClearButtonEnabled(true);
|
||||
searchEdit->addAction(loadThemedIcon(QStringLiteral("icons/search"), IconTint::quiet()),
|
||||
QLineEdit::LeadingPosition);
|
||||
auto help = searchEdit->addAction(loadThemedIcon(QStringLiteral("icons/info"), IconTint::quiet()),
|
||||
auto help = searchEdit->addAction(loadThemedIcon(QStringLiteral("icons/info"), AppColor::Informational),
|
||||
QLineEdit::TrailingPosition);
|
||||
connect(help, &QAction::triggered, this, [this] { createSearchSyntaxHelpWindow(searchEdit); });
|
||||
|
||||
|
|
|
|||
|
|
@ -119,11 +119,11 @@ void VisualDeckDisplayOptionsWidget::updateDisplayTypeButton()
|
|||
switch (currentDisplayType) {
|
||||
case DisplayType::Flat:
|
||||
displayTypeButton->setButtonText(tr("Toggle Layout: Flat"));
|
||||
displayTypeButton->setButtonIcon(loadThemedIcon(QStringLiteral("icons/scroll")));
|
||||
displayTypeButton->setButtonIcon(loadThemedIcon(QStringLiteral("icons/scroll"), IconTint::primary()));
|
||||
break;
|
||||
case DisplayType::Overlap:
|
||||
displayTypeButton->setButtonText(tr("Toggle Layout: Overlap"));
|
||||
displayTypeButton->setButtonIcon(loadThemedIcon(QStringLiteral("icons/scales")));
|
||||
displayTypeButton->setButtonIcon(loadThemedIcon(QStringLiteral("icons/scales"), IconTint::primary()));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue