Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/owncloud/client.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErik Verbruggen <erik.verbruggen@me.com>2021-08-27 12:10:05 +0300
committerHannah von Reth <vonreth@kde.org>2021-08-27 17:27:51 +0300
commit60d29be3fce01d40d7c75c64ba45db057e5c7298 (patch)
treea097ac209683d90d7d7f0e8d41d0a88a9a42295b /src/gui/settingsdialog.cpp
parentd8bb7a4c6ca8992d8719fbcb763749403acb30e7 (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/gui/settingsdialog.cpp')
-rw-r--r--src/gui/settingsdialog.cpp11
1 files changed, 9 insertions, 2 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;