Merge branch 'qml-nav-height'

main
Adriaan de Groot 5 years ago
commit ee51e7abe1

@ -38,6 +38,7 @@
#include <QFile> #include <QFile>
#include <QFileInfo> #include <QFileInfo>
#include <QLabel> #include <QLabel>
#include <QQuickItem>
#include <QQuickWidget> #include <QQuickWidget>
#include <QTreeView> #include <QTreeView>
@ -221,7 +222,13 @@ CalamaresWindow::getQmlNavigation( QWidget* parent )
w->setResizeMode( QQuickWidget::SizeRootObjectToView ); w->setResizeMode( QQuickWidget::SizeRootObjectToView );
w->setSource( QUrl( w->setSource( QUrl(
CalamaresUtils::searchQmlFile( CalamaresUtils::QmlSearch::Both, QStringLiteral( "calamares-navigation" ) ) ) ); CalamaresUtils::searchQmlFile( CalamaresUtils::QmlSearch::Both, QStringLiteral( "calamares-navigation" ) ) ) );
w->setMinimumHeight( 30 ); // matchine the default widgets version
// If the QML itself sets a height, use that, otherwise go to 48 pixels
// which seems to match what the widget navigation would use for height
// (with *my* specific screen, style, etc. so YMMV).
qreal minimumHeight = qBound( qreal( 16 ), w->rootObject() ? w->rootObject()->height() : 48, qreal( 64 ) );
w->setMinimumHeight( int( minimumHeight ) );
return w; return w;
} }

@ -8,10 +8,10 @@ import QtQuick.Layouts 1.3
Rectangle { Rectangle {
id: navigationBar; id: navigationBar;
color: Branding.styleString( Branding.SidebarBackground ); color: Branding.styleString( Branding.SidebarBackground );
height: 48;
RowLayout { RowLayout {
id: buttonBar id: buttonBar
height: 64;
anchors.fill: parent; anchors.fill: parent;
Item Item

Loading…
Cancel
Save