mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-11-12 04:50:01 -08:00
Use the shared layout helper in the token tabs
Replace the hand-built zero-margin layouts with QtUtils::makeLayout, which is the helper the printing selector already uses.
This commit is contained in:
parent
177536b07a
commit
5f0e955644
1 changed files with 3 additions and 4 deletions
|
|
@ -38,6 +38,7 @@
|
||||||
#include <libcockatrice/settings/interface_settings.h>
|
#include <libcockatrice/settings/interface_settings.h>
|
||||||
#include <libcockatrice/settings/layouts_settings.h>
|
#include <libcockatrice/settings/layouts_settings.h>
|
||||||
#include <libcockatrice/utility/card_ref.h>
|
#include <libcockatrice/utility/card_ref.h>
|
||||||
|
#include <libcockatrice/utility/qt_utils.h>
|
||||||
#include <libcockatrice/utility/string_limits.h>
|
#include <libcockatrice/utility/string_limits.h>
|
||||||
#include <qnamespace.h>
|
#include <qnamespace.h>
|
||||||
|
|
||||||
|
|
@ -156,16 +157,14 @@ DlgCreateToken::DlgCreateToken(const QStringList &_predefinedTokens, QWidget *pa
|
||||||
|
|
||||||
auto *tokenChoosePage = new QWidget;
|
auto *tokenChoosePage = new QWidget;
|
||||||
tokenChoosePage->setObjectName("tokenChoosePage");
|
tokenChoosePage->setObjectName("tokenChoosePage");
|
||||||
auto *tokenChooseLayout = new QVBoxLayout(tokenChoosePage);
|
auto *tokenChooseLayout = QtUtils::makeLayout<QVBoxLayout>(tokenChoosePage);
|
||||||
tokenChooseLayout->setContentsMargins(0, 0, 0, 0);
|
|
||||||
tokenChooseLayout->addWidget(chooseTokenFromAllRadioButton);
|
tokenChooseLayout->addWidget(chooseTokenFromAllRadioButton);
|
||||||
tokenChooseLayout->addWidget(chooseTokenFromDeckRadioButton);
|
tokenChooseLayout->addWidget(chooseTokenFromDeckRadioButton);
|
||||||
tokenChooseLayout->addWidget(chooseTokenView);
|
tokenChooseLayout->addWidget(chooseTokenView);
|
||||||
|
|
||||||
auto *printingsPage = new QWidget;
|
auto *printingsPage = new QWidget;
|
||||||
printingsPage->setObjectName("tokenPrintingsPage");
|
printingsPage->setObjectName("tokenPrintingsPage");
|
||||||
auto *printingsLayout = new QVBoxLayout(printingsPage);
|
auto *printingsLayout = QtUtils::makeLayout<QVBoxLayout>(printingsPage);
|
||||||
printingsLayout->setContentsMargins(0, 0, 0, 0);
|
|
||||||
printingSelector = new PrintingSelector(printingsPage, &printingSelectorHost);
|
printingSelector = new PrintingSelector(printingsPage, &printingSelectorHost);
|
||||||
printingSelector->setObjectName("tokenPrintingSelector");
|
printingSelector->setObjectName("tokenPrintingSelector");
|
||||||
printingsLayout->addWidget(printingSelector);
|
printingsLayout->addWidget(printingSelector);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue