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
This commit is contained in:
Adriaan de Groot 2017-06-12 06:10:22 -04:00 committed by Philip
parent 019fd67992
commit b140080eff

View File

@ -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 );