First try at handling size for detach.

This commit is contained in:
Ernie Pasveer
2024-09-02 15:33:04 -05:00
parent 9636dd4ca1
commit eaafa6bd80
3 changed files with 28 additions and 0 deletions
+23
View File
@@ -110,6 +110,20 @@ void SeerConsoleWidget::handleChangeWindowTitle (QString title) {
}
}
void SeerConsoleWidget::handleTabDetached (int tabIndex) {
qDebug() << tabIndex;
QSettings settings;
settings.beginGroup("consolewindow"); {
resize(settings.value("size", QSize(800, 600)).toSize());
} settings.endGroup();
}
void SeerConsoleWidget::handleTabReattached (int tabIndex) {
qDebug() << tabIndex;
}
void SeerConsoleWidget::handleClearButton () {
textEdit->clear();
}
@@ -474,6 +488,15 @@ void SeerConsoleWidget::writeFontSettings() {
void SeerConsoleWidget::writeSizeSettings() {
// If there's a parent, don't save the size.
// This means the console is attached in the
// tab bar and its size has been shrunk. We
// only want to save resizes if the console
// has been detached, ie: no parent.
if (parent() != 0) {
return;
}
QSettings settings;
settings.beginGroup("consolewindow"); {