[calamares] Support noexpand
- When in noexpand mode, just don't grow the window, and assume widgets elsewhere will get scrollbars automatically.
This commit is contained in:
parent
866797a6c9
commit
ef94b1f689
@ -17,7 +17,7 @@ welcomeExpandingLogo: true
|
|||||||
# Size and expansion policy for Calamares.
|
# Size and expansion policy for Calamares.
|
||||||
# - "normal" or unset, expand as needed, use *windowSize*
|
# - "normal" or unset, expand as needed, use *windowSize*
|
||||||
# - "fullscreen", start as large as possible, ignore *windowSize*
|
# - "fullscreen", start as large as possible, ignore *windowSize*
|
||||||
# - "noexpand", never expand, use *windowSize*
|
# - "noexpand", don't expand automatically, use *windowSize*
|
||||||
windowExpanding: normal
|
windowExpanding: normal
|
||||||
|
|
||||||
# Size of Calamares window, expressed as w,h. Both w and h
|
# Size of Calamares window, expressed as w,h. Both w and h
|
||||||
|
@ -147,6 +147,7 @@ CalamaresWindow::CalamaresWindow( QWidget* parent )
|
|||||||
CalamaresUtils::unmarginLayout( mainLayout );
|
CalamaresUtils::unmarginLayout( mainLayout );
|
||||||
|
|
||||||
m_viewManager = Calamares::ViewManager::instance( this );
|
m_viewManager = Calamares::ViewManager::instance( this );
|
||||||
|
if ( branding->windowExpands() )
|
||||||
connect( m_viewManager, &Calamares::ViewManager::enlarge, this, &CalamaresWindow::enlarge );
|
connect( m_viewManager, &Calamares::ViewManager::enlarge, this, &CalamaresWindow::enlarge );
|
||||||
|
|
||||||
mainLayout->addWidget( m_viewManager->centralWidget() );
|
mainLayout->addWidget( m_viewManager->centralWidget() );
|
||||||
|
@ -112,6 +112,7 @@ public:
|
|||||||
bool welcomeStyleCalamares() const { return m_welcomeStyleCalamares; }
|
bool welcomeStyleCalamares() const { return m_welcomeStyleCalamares; }
|
||||||
bool welcomeExpandingLogo() const { return m_welcomeExpandingLogo; }
|
bool welcomeExpandingLogo() const { return m_welcomeExpandingLogo; }
|
||||||
bool windowMaximize() const { return m_windowExpansion == WindowExpansion::Fullscreen; }
|
bool windowMaximize() const { return m_windowExpansion == WindowExpansion::Fullscreen; }
|
||||||
|
bool windowExpands() const { return m_windowExpansion != WindowExpansion::Fixed; }
|
||||||
QPair< WindowDimension, WindowDimension > windowSize() const
|
QPair< WindowDimension, WindowDimension > windowSize() const
|
||||||
{
|
{
|
||||||
return QPair< WindowDimension, WindowDimension >( m_windowWidth, m_windowHeight );
|
return QPair< WindowDimension, WindowDimension >( m_windowWidth, m_windowHeight );
|
||||||
|
Loading…
Reference in New Issue
Block a user