mirror of
https://github.com/epasveer/seer.git
synced 2026-08-31 01:20:45 +08:00
First try at handling size for detach.
This commit is contained in:
@@ -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"); {
|
||||
|
||||
Reference in New Issue
Block a user