[Client] Settings: clamp dialog width to 1280 per review

This commit is contained in:
Lukas Brübach 2026-10-16 16:24:40 +02:00 • committed by GitHub
parent b9d37b9b1e
commit 723ef76dfb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -49,6 +49,9 @@ DlgSettings::DlgSettings(QWidget *parent) : QDialog(parent)
QSize target = !hostSize.isEmpty() ? QSize(qRound(hostSize.width() * 0.9), qRound(hostSize.height() * 0.9)) QSize target = !hostSize.isEmpty() ? QSize(qRound(hostSize.width() * 0.9), qRound(hostSize.height() * 0.9))
: QSize(qRound(available.width() * 0.9), qRound(available.height() * 0.9)); : QSize(qRound(available.width() * 0.9), qRound(available.height() * 0.9));
// Evenly-spaced columns leave unnatural dead space on very wide windows; clamp the width per review.
static constexpr int MAX_DIALOG_WIDTH = 1280;
target.setWidth(qMin(target.width(), MAX_DIALOG_WIDTH));
target = target.expandedTo(minimum).boundedTo(available.size()); target = target.expandedTo(minimum).boundedTo(available.size());
resize(target); resize(target);
setSizeGripEnabled(true); setSizeGripEnabled(true);