mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-03-21 17:55:21 -05:00
[TabDeckEditor] Save cardDatabase dock size in settings (#6524)
This commit is contained in:
parent
57e6c91689
commit
93f0715d02
|
|
@ -154,6 +154,9 @@ void TabDeckEditor::loadLayout()
|
|||
}
|
||||
}
|
||||
|
||||
cardDatabaseDockWidget->setMinimumSize(layouts.getDeckEditorCardDatabaseSize());
|
||||
cardDatabaseDockWidget->setMaximumSize(layouts.getDeckEditorCardDatabaseSize());
|
||||
|
||||
cardInfoDockWidget->setMinimumSize(layouts.getDeckEditorCardSize());
|
||||
cardInfoDockWidget->setMaximumSize(layouts.getDeckEditorCardSize());
|
||||
|
||||
|
|
@ -221,6 +224,7 @@ bool TabDeckEditor::eventFilter(QObject *o, QEvent *e)
|
|||
LayoutsSettings &layouts = SettingsCache::instance().layouts();
|
||||
layouts.setDeckEditorLayoutState(saveState());
|
||||
layouts.setDeckEditorGeometry(saveGeometry());
|
||||
layouts.setDeckEditorCardDatabaseSize(cardDatabaseDockWidget->size());
|
||||
layouts.setDeckEditorCardSize(cardInfoDockWidget->size());
|
||||
layouts.setDeckEditorFilterSize(filterDockWidget->size());
|
||||
layouts.setDeckEditorDeckSize(deckDockWidget->size());
|
||||
|
|
|
|||
|
|
@ -25,6 +25,17 @@ void LayoutsSettings::setDeckEditorGeometry(const QByteArray &value)
|
|||
setValue(value, "layouts/deckEditor_geometry");
|
||||
}
|
||||
|
||||
QSize LayoutsSettings::getDeckEditorCardDatabaseSize()
|
||||
{
|
||||
QVariant previous = getValue("layouts/deckEditor_CardDatabaseSize");
|
||||
return previous == QVariant() ? QSize(500, 500) : previous.toSize();
|
||||
}
|
||||
|
||||
void LayoutsSettings::setDeckEditorCardDatabaseSize(const QSize &value)
|
||||
{
|
||||
setValue(value, "layouts/deckEditor_CardDatabaseSize");
|
||||
}
|
||||
|
||||
QSize LayoutsSettings::getDeckEditorCardSize()
|
||||
{
|
||||
QVariant previous = getValue("layouts/deckEditor_CardSize");
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ class LayoutsSettings : public SettingsManager
|
|||
public:
|
||||
void setDeckEditorLayoutState(const QByteArray &value);
|
||||
void setDeckEditorGeometry(const QByteArray &value);
|
||||
void setDeckEditorCardDatabaseSize(const QSize &value);
|
||||
void setDeckEditorCardSize(const QSize &value);
|
||||
void setDeckEditorDeckSize(const QSize &value);
|
||||
void setDeckEditorPrintingSelectorSize(const QSize &value);
|
||||
|
|
@ -41,6 +42,7 @@ public:
|
|||
|
||||
const QByteArray getDeckEditorLayoutState();
|
||||
const QByteArray getDeckEditorGeometry();
|
||||
QSize getDeckEditorCardDatabaseSize();
|
||||
QSize getDeckEditorCardSize();
|
||||
QSize getDeckEditorDeckSize();
|
||||
QSize getDeckEditorPrintingSelectorSize();
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user