mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
[VDD] Move main type and format filter to quick settings (#6511)
* [VDD] Reorder quick filters Took 1 hour 10 minutes Took 5 seconds Took 49 seconds * [VDD] Use Font Awesome Icons Took 49 minutes Took 5 seconds * [VDD] Shuffle some widgets around, label things. Took 31 minutes Took 5 seconds * Change buttons to be push rather than toggle. Took 17 minutes Took 9 seconds * Reduce margins, retranslate button texts. Took 15 minutes Took 9 seconds * Actually do it, don't commit the commented out testing version lol Took 3 minutes * Start sets in include, correct subtype include/exact match logic. Took 12 minutes * Block sync. Took 16 minutes Took 8 seconds --------- Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
This commit is contained in:
parent
47720ff286
commit
a4eef648bc
25 changed files with 392 additions and 224 deletions
|
|
@ -8,7 +8,6 @@
|
|||
SettingsButtonWidget::SettingsButtonWidget(QWidget *parent)
|
||||
: QWidget(parent), button(new QToolButton(this)), popup(new SettingsPopupWidget(nullptr))
|
||||
{
|
||||
|
||||
button->setIcon(QPixmap("theme:icons/cogwheel"));
|
||||
button->setCheckable(true);
|
||||
button->setFixedSize(32, 32);
|
||||
|
|
@ -36,6 +35,21 @@ void SettingsButtonWidget::setButtonIcon(QPixmap iconMap)
|
|||
button->setIcon(iconMap);
|
||||
}
|
||||
|
||||
void SettingsButtonWidget::setButtonText(const QString &buttonText)
|
||||
{
|
||||
// 🔓 unlock size constraints
|
||||
button->setMinimumSize(QSize());
|
||||
button->setMaximumSize(QSize(QWIDGETSIZE_MAX, QWIDGETSIZE_MAX));
|
||||
|
||||
button->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
|
||||
button->setText(buttonText);
|
||||
|
||||
button->setFixedHeight(32);
|
||||
button->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed);
|
||||
|
||||
button->setMinimumWidth(button->sizeHint().width());
|
||||
}
|
||||
|
||||
void SettingsButtonWidget::togglePopup()
|
||||
{
|
||||
if (popup->isVisible()) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue