From b7a0b3930f18250085e65fc550943a71dd9f0ee4 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Mon, 12 Jun 2017 06:10:22 -0400 Subject: [PATCH] Reduce minimum-width to 800px Tested in a VirtualBox setup with screen set to 800x600, all of the Generic Linux RT components are visible, and the buttons are too (which fall off the screen otherwise). FIXES #731 --- src/calamares/CalamaresWindow.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/calamares/CalamaresWindow.cpp b/src/calamares/CalamaresWindow.cpp index 57f9286ae..2dc47c472 100644 --- a/src/calamares/CalamaresWindow.cpp +++ b/src/calamares/CalamaresWindow.cpp @@ -46,10 +46,13 @@ CalamaresWindow::CalamaresWindow( QWidget* parent ) string( Calamares::Branding::ProductName ) ) ); ) - setMinimumSize( 1010, 520 ); + constexpr int min_w = 800; + constexpr int min_h = 520; + + setMinimumSize( min_w, min_h ); QSize availableSize = qApp->desktop()->availableGeometry( this ).size(); - int w = qBound( 1010, CalamaresUtils::defaultFontHeight() * 60, availableSize.width() ); - int h = qBound( 520, CalamaresUtils::defaultFontHeight() * 36, availableSize.height() ); + int w = qBound( min_w, CalamaresUtils::defaultFontHeight() * 60, availableSize.width() ); + int h = qBound( min_h, CalamaresUtils::defaultFontHeight() * 36, availableSize.height() ); cDebug() << "Proposed window size:" << w << h; resize( w, h );