diff --git a/src/qml/BaseTheme.qml b/src/qml/BaseTheme.qml --- a/src/qml/BaseTheme.qml +++ b/src/qml/BaseTheme.qml @@ -112,7 +112,7 @@ text: "Albums" } - property int viewSelectorSmallSizeThreshold: 3 * layoutHorizontalMargin + viewSelectorDelegateHeight + bigTextSize.width + property int viewSelectorSmallSizeThreshold: 800 Label { id: fontSize diff --git a/src/qml/ContentView.qml b/src/qml/ContentView.qml --- a/src/qml/ContentView.qml +++ b/src/qml/ContentView.qml @@ -181,9 +181,6 @@ model: pageModel Layout.fillHeight: true - Layout.maximumWidth: mainWindow.width * 0.14 - - maximumSize: mainWindow.width * 0.14 Behavior on Layout.maximumWidth { NumberAnimation { diff --git a/src/qml/ViewSelector.qml b/src/qml/ViewSelector.qml --- a/src/qml/ViewSelector.qml +++ b/src/qml/ViewSelector.qml @@ -27,7 +27,6 @@ readonly property alias currentIndex: viewModeView.currentIndex property double textOpacity - property double maximumSize property alias model: pageDelegateModel.model signal switchView(var viewType) @@ -39,7 +38,7 @@ viewModeView.ignoreCurrentItemChanges = false } - implicitWidth: elisaTheme.dp(500) + implicitWidth: elisaTheme.dp(225) Rectangle { anchors.fill: parent @@ -164,7 +163,7 @@ anchors.rightMargin: elisaTheme.layoutHorizontalMargin verticalAlignment: "AlignVCenter" - font.pointSize: elisaTheme.defaultFontPointSize * 1.4 + font.pointSize: elisaTheme.defaultFontPointSize * 1.1 text: model.display elide: Text.ElideRight @@ -237,16 +236,16 @@ states: [ State { name: 'iconsAndText' - when: maximumSize >= elisaTheme.viewSelectorSmallSizeThreshold + when: mainWindow.width >= elisaTheme.viewSelectorSmallSizeThreshold PropertyChanges { target: rootFocusScope textOpacity: 1 - implicitWidth: elisaTheme.dp(500) + implicitWidth: elisaTheme.dp(225) } }, State { name: 'iconsOnly' - when: maximumSize < elisaTheme.viewSelectorSmallSizeThreshold + when: mainWindow.width < elisaTheme.viewSelectorSmallSizeThreshold PropertyChanges { target: rootFocusScope textOpacity: 0