mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-18 08:22:15 -07:00
Improve layout, add a gray border.
This commit is contained in:
parent
c96847a3e6
commit
1090b825ec
5 changed files with 13 additions and 4 deletions
|
|
@ -58,6 +58,8 @@ PrintingSelector::PrintingSelector(QWidget *parent,
|
|||
|
||||
sortAndOptionsContainer = new QWidget(this);
|
||||
sortAndOptionsLayout = new QHBoxLayout(sortAndOptionsContainer);
|
||||
sortAndOptionsLayout->setSpacing(3);
|
||||
sortAndOptionsLayout->setContentsMargins(0, 0, 0, 0);
|
||||
sortAndOptionsContainer->setLayout(sortAndOptionsLayout);
|
||||
|
||||
searchBar = new PrintingSelectorCardSearchWidget(this);
|
||||
|
|
|
|||
|
|
@ -20,7 +20,6 @@ PrintingSelectorCardSortingWidget::PrintingSelectorCardSortingWidget(PrintingSel
|
|||
{
|
||||
setMinimumWidth(300);
|
||||
sortToolBar = new QHBoxLayout(this);
|
||||
sortToolBar->setContentsMargins(9, 0, 9, 0);
|
||||
|
||||
sortOptionsSelector = new QComboBox(this);
|
||||
sortOptionsSelector->addItems(SORT_OPTIONS);
|
||||
|
|
|
|||
|
|
@ -2,8 +2,9 @@
|
|||
|
||||
#include <QApplication>
|
||||
#include <QFocusEvent>
|
||||
#include <QPainter>
|
||||
|
||||
SettingsPopupWidget::SettingsPopupWidget(QWidget *parent) : QWidget(parent, Qt::Popup)
|
||||
SettingsPopupWidget::SettingsPopupWidget(QWidget *parent) : QWidget(parent, Qt::Popup | Qt::FramelessWindowHint)
|
||||
{
|
||||
layout = new QVBoxLayout(this);
|
||||
}
|
||||
|
|
@ -26,3 +27,11 @@ void SettingsPopupWidget::closeEvent(QCloseEvent *event)
|
|||
emit aboutToClose();
|
||||
QWidget::closeEvent(event);
|
||||
}
|
||||
|
||||
void SettingsPopupWidget::paintEvent(QPaintEvent *event)
|
||||
{
|
||||
QPainter painter(this);
|
||||
painter.setPen(Qt::gray);
|
||||
painter.drawRect(rect().adjusted(0, 0, -1, -1));
|
||||
QWidget::paintEvent(event);
|
||||
}
|
||||
|
|
@ -19,6 +19,7 @@ signals:
|
|||
protected:
|
||||
void focusOutEvent(QFocusEvent *event) override;
|
||||
void closeEvent(QCloseEvent *event) override;
|
||||
void paintEvent(QPaintEvent *event) override;
|
||||
|
||||
QVBoxLayout *layout;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -258,8 +258,6 @@ SettingsCache::SettingsCache()
|
|||
bumpSetsWithCardsInDeckToTop = settings->value("cards/bumpsetswithcardsindecktotop", true).toBool();
|
||||
printingSelectorSortOrder = settings->value("cards/printingselectorsortorder", 1).toInt();
|
||||
printingSelectorCardSize = settings->value("cards/printingselectorcardsize", 100).toInt();
|
||||
printingSelectorSortOptionsVisible = settings->value("cards/printingselectorsortoptionsvisible", true).toBool();
|
||||
printingSelectorSearchBarVisible = settings->value("cards/printingselectorcardsearchbarvisible", true).toBool();
|
||||
printingSelectorNavigationButtonsVisible =
|
||||
settings->value("cards/printingselectornavigationbuttonsvisible", true).toBool();
|
||||
visualDeckStorageCardSize = settings->value("interface/visualdeckstoragecardsize", 100).toInt();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue