mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-02 03:23:56 -07:00
[TabDeckEditor] Save cardDatabase dock size in settings (#6524)
This commit is contained in:
parent
57e6c91689
commit
93f0715d02
3 changed files with 17 additions and 0 deletions
|
|
@ -154,6 +154,9 @@ void TabDeckEditor::loadLayout()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cardDatabaseDockWidget->setMinimumSize(layouts.getDeckEditorCardDatabaseSize());
|
||||||
|
cardDatabaseDockWidget->setMaximumSize(layouts.getDeckEditorCardDatabaseSize());
|
||||||
|
|
||||||
cardInfoDockWidget->setMinimumSize(layouts.getDeckEditorCardSize());
|
cardInfoDockWidget->setMinimumSize(layouts.getDeckEditorCardSize());
|
||||||
cardInfoDockWidget->setMaximumSize(layouts.getDeckEditorCardSize());
|
cardInfoDockWidget->setMaximumSize(layouts.getDeckEditorCardSize());
|
||||||
|
|
||||||
|
|
@ -221,6 +224,7 @@ bool TabDeckEditor::eventFilter(QObject *o, QEvent *e)
|
||||||
LayoutsSettings &layouts = SettingsCache::instance().layouts();
|
LayoutsSettings &layouts = SettingsCache::instance().layouts();
|
||||||
layouts.setDeckEditorLayoutState(saveState());
|
layouts.setDeckEditorLayoutState(saveState());
|
||||||
layouts.setDeckEditorGeometry(saveGeometry());
|
layouts.setDeckEditorGeometry(saveGeometry());
|
||||||
|
layouts.setDeckEditorCardDatabaseSize(cardDatabaseDockWidget->size());
|
||||||
layouts.setDeckEditorCardSize(cardInfoDockWidget->size());
|
layouts.setDeckEditorCardSize(cardInfoDockWidget->size());
|
||||||
layouts.setDeckEditorFilterSize(filterDockWidget->size());
|
layouts.setDeckEditorFilterSize(filterDockWidget->size());
|
||||||
layouts.setDeckEditorDeckSize(deckDockWidget->size());
|
layouts.setDeckEditorDeckSize(deckDockWidget->size());
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,17 @@ void LayoutsSettings::setDeckEditorGeometry(const QByteArray &value)
|
||||||
setValue(value, "layouts/deckEditor_geometry");
|
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()
|
QSize LayoutsSettings::getDeckEditorCardSize()
|
||||||
{
|
{
|
||||||
QVariant previous = getValue("layouts/deckEditor_CardSize");
|
QVariant previous = getValue("layouts/deckEditor_CardSize");
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,7 @@ class LayoutsSettings : public SettingsManager
|
||||||
public:
|
public:
|
||||||
void setDeckEditorLayoutState(const QByteArray &value);
|
void setDeckEditorLayoutState(const QByteArray &value);
|
||||||
void setDeckEditorGeometry(const QByteArray &value);
|
void setDeckEditorGeometry(const QByteArray &value);
|
||||||
|
void setDeckEditorCardDatabaseSize(const QSize &value);
|
||||||
void setDeckEditorCardSize(const QSize &value);
|
void setDeckEditorCardSize(const QSize &value);
|
||||||
void setDeckEditorDeckSize(const QSize &value);
|
void setDeckEditorDeckSize(const QSize &value);
|
||||||
void setDeckEditorPrintingSelectorSize(const QSize &value);
|
void setDeckEditorPrintingSelectorSize(const QSize &value);
|
||||||
|
|
@ -41,6 +42,7 @@ public:
|
||||||
|
|
||||||
const QByteArray getDeckEditorLayoutState();
|
const QByteArray getDeckEditorLayoutState();
|
||||||
const QByteArray getDeckEditorGeometry();
|
const QByteArray getDeckEditorGeometry();
|
||||||
|
QSize getDeckEditorCardDatabaseSize();
|
||||||
QSize getDeckEditorCardSize();
|
QSize getDeckEditorCardSize();
|
||||||
QSize getDeckEditorDeckSize();
|
QSize getDeckEditorDeckSize();
|
||||||
QSize getDeckEditorPrintingSelectorSize();
|
QSize getDeckEditorPrintingSelectorSize();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue