┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/dolphinmainwindow.cpp8
-rw-r--r--src/dolphinmainwindow.h3
2 files changed, 9 insertions, 2 deletions
diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp
index 80c6aa320..e9c0c3813 100644
--- a/src/dolphinmainwindow.cpp
+++ b/src/dolphinmainwindow.cpp
@@ -178,8 +178,6 @@ DolphinMainWindow::DolphinMainWindow() :
if (firstRun) {
menuBar()->setVisible(false);
- // Assure a proper default size if Dolphin runs the first time
- resize(760, 550);
}
const bool showMenu = !menuBar()->isHidden();
@@ -2412,6 +2410,12 @@ bool DolphinMainWindow::eventFilter(QObject* obj, QEvent* event)
return false;
}
+// Set a sane initial window size
+QSize DolphinMainWindow::sizeHint() const
+{
+ return KXmlGuiWindow::sizeHint().expandedTo(QSize(760, 550));
+}
+
void DolphinMainWindow::saveNewToolbarConfig()
{
KXmlGuiWindow::saveNewToolbarConfig(); // Applies the new config. This has to be called first
diff --git a/src/dolphinmainwindow.h b/src/dolphinmainwindow.h
index 40101852b..3c83b2178 100644
--- a/src/dolphinmainwindow.h
+++ b/src/dolphinmainwindow.h
@@ -225,6 +225,9 @@ protected:
/** Handles QWhatsThisClickedEvent and passes all others on. */
bool eventFilter(QObject*, QEvent*) override;
+ /** Sets a sane initial window size **/
+ QSize sizeHint() const override;
+
protected Q_SLOTS:
/**
* Calls the base method KXmlGuiWindow::saveNewToolbarConfig().