mirror of
https://invent.kde.org/system/dolphin
synced 2024-09-12 12:54:29 +00:00
Set initial size corectly
The resize() that we do to set the initial size is working around a bug in frameworks that is going to be fixed soon. See https://invent.kde.org/frameworks/kxmlgui/-/merge_requests/53.
This commit is contained in:
parent
a6ec74a82c
commit
c836cf010c
|
@ -178,8 +178,6 @@ DolphinMainWindow::DolphinMainWindow() :
|
||||||
|
|
||||||
if (firstRun) {
|
if (firstRun) {
|
||||||
menuBar()->setVisible(false);
|
menuBar()->setVisible(false);
|
||||||
// Assure a proper default size if Dolphin runs the first time
|
|
||||||
resize(760, 550);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const bool showMenu = !menuBar()->isHidden();
|
const bool showMenu = !menuBar()->isHidden();
|
||||||
|
@ -2412,6 +2410,12 @@ bool DolphinMainWindow::eventFilter(QObject* obj, QEvent* event)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Set a sane initial window size
|
||||||
|
QSize DolphinMainWindow::sizeHint() const
|
||||||
|
{
|
||||||
|
return KXmlGuiWindow::sizeHint().expandedTo(QSize(760, 550));
|
||||||
|
}
|
||||||
|
|
||||||
void DolphinMainWindow::saveNewToolbarConfig()
|
void DolphinMainWindow::saveNewToolbarConfig()
|
||||||
{
|
{
|
||||||
KXmlGuiWindow::saveNewToolbarConfig(); // Applies the new config. This has to be called first
|
KXmlGuiWindow::saveNewToolbarConfig(); // Applies the new config. This has to be called first
|
||||||
|
|
|
@ -225,6 +225,9 @@ protected:
|
||||||
/** Handles QWhatsThisClickedEvent and passes all others on. */
|
/** Handles QWhatsThisClickedEvent and passes all others on. */
|
||||||
bool eventFilter(QObject*, QEvent*) override;
|
bool eventFilter(QObject*, QEvent*) override;
|
||||||
|
|
||||||
|
/** Sets a sane initial window size **/
|
||||||
|
QSize sizeHint() const override;
|
||||||
|
|
||||||
protected Q_SLOTS:
|
protected Q_SLOTS:
|
||||||
/**
|
/**
|
||||||
* Calls the base method KXmlGuiWindow::saveNewToolbarConfig().
|
* Calls the base method KXmlGuiWindow::saveNewToolbarConfig().
|
||||||
|
|
Loading…
Reference in a new issue