diff options
author | Erik Verbruggen <erik.verbruggen@me.com> | 2021-08-27 12:10:05 +0300 |
---|---|---|
committer | Hannah von Reth <vonreth@kde.org> | 2021-08-27 17:27:51 +0300 |
commit | 60d29be3fce01d40d7c75c64ba45db057e5c7298 (patch) | |
tree | a097ac209683d90d7d7f0e8d41d0a88a9a42295b /src | |
parent | d8bb7a4c6ca8992d8719fbcb763749403acb30e7 (diff) |
Tweak the settings dialog size to correctly show the wizards
With the style we use, the wizard is sized to "fit" inside the settings
dialog, and it will also be restrainded to the size of the settings
dialog.
This change makes sure that on macOS, the settings dialog has enough
(vertical) space to show all the widgets in all pages. If there is not
enough space, widgets might overlapped by other widgets (or disappear
behind them).
Fixes: #8919
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/settingsdialog.cpp | 11 | ||||
-rw-r--r-- | src/gui/wizard/owncloudadvancedsetuppage.ui | 4 |
2 files changed, 11 insertions, 4 deletions
diff --git a/src/gui/settingsdialog.cpp b/src/gui/settingsdialog.cpp index 71005174f..01ebffc9b 100644 --- a/src/gui/settingsdialog.cpp +++ b/src/gui/settingsdialog.cpp @@ -57,12 +57,19 @@ void setActivationPolicy(ActivationPolicy policy); namespace { auto minimumSizeHint(const QWidget *w) { - const QSize min { 800, 600 }; + const QSize min { 800, 700 }; // When changing this, please check macOS: widgets there have larger insets, so they take up more space. const auto screen = w->windowHandle() ? w->windowHandle()->screen() : QApplication::screenAt(QCursor::pos()); if (screen) { const auto availableSize = screen->availableSize(); if (availableSize.isValid()) { - return min.boundedTo(availableSize * 0.75); + // Assume we can use at least 90% of the screen, if the screen is smaller than 800x700 pixels. + // + // Note: this means that the wizards have even less space: with the style we use, the + // wizard tries to fit inside the window. So, if this is a common case that users have + // such small screens, and the contents of the wizard screen are squashed together (or + // not shown due to lack of space), we should consider putting that content in a + // scroll-view. + return min.boundedTo(availableSize * 0.9); } } return min; diff --git a/src/gui/wizard/owncloudadvancedsetuppage.ui b/src/gui/wizard/owncloudadvancedsetuppage.ui index ff48eab6a..713cb54de 100644 --- a/src/gui/wizard/owncloudadvancedsetuppage.ui +++ b/src/gui/wizard/owncloudadvancedsetuppage.ui @@ -384,7 +384,7 @@ <property name="sizeHint" stdset="0"> <size> <width>20</width> - <height>40</height> + <height>10</height> </size> </property> </spacer> @@ -484,7 +484,7 @@ <property name="sizeHint" stdset="0"> <size> <width>20</width> - <height>40</height> + <height>10</height> </size> </property> </spacer> |