Commit de7c100c authored by Nate Graham's avatar Nate Graham 🔩
Browse files

Also implement auto-hide behavior for small window sizes

parent a38112ab
...@@ -270,7 +270,7 @@ RowLayout { ...@@ -270,7 +270,7 @@ RowLayout {
states: [ states: [
State { State {
name: "browsingViewsNoPlaylist" name: "browsingViewsNoPlaylist"
when: contentViewContainer.showPlaylist === false when: contentViewContainer.showPlaylist === false || mainWindow.width < elisaTheme.viewSelectorSmallSizeThreshold
PropertyChanges { PropertyChanges {
target: playList target: playList
Layout.minimumWidth: 0 Layout.minimumWidth: 0
...@@ -284,7 +284,7 @@ RowLayout { ...@@ -284,7 +284,7 @@ RowLayout {
}, },
State { State {
name: 'browsingViews' name: 'browsingViews'
when: contentViewContainer.showPlaylist === true when: contentViewContainer.showPlaylist === true || mainWindow.width >= elisaTheme.viewSelectorSmallSizeThreshold
PropertyChanges { PropertyChanges {
target: playList target: playList
Layout.minimumWidth: contentViewContainer.width * 0.28 Layout.minimumWidth: contentViewContainer.width * 0.28
......
...@@ -27,7 +27,7 @@ ApplicationWindow { ...@@ -27,7 +27,7 @@ ApplicationWindow {
visible: true visible: true
minimumWidth: contentView.showPlaylist ? 1100 : 700 minimumWidth: 700
minimumHeight: 600 minimumHeight: 600
LayoutMirroring.enabled: Qt.application.layoutDirection == Qt.RightToLeft LayoutMirroring.enabled: Qt.application.layoutDirection == Qt.RightToLeft
......
...@@ -412,7 +412,7 @@ FocusScope { ...@@ -412,7 +412,7 @@ FocusScope {
icon.height: elisaTheme.smallControlButtonSize icon.height: elisaTheme.smallControlButtonSize
} }
// Not a FlatButtonWithToolTip because sometimes we want text // Not a FlatButtonWithToolTip because we want text
Button { Button {
id: showHidePlaylistAction id: showHidePlaylistAction
action: Action { action: Action {
...@@ -420,8 +420,10 @@ FocusScope { ...@@ -420,8 +420,10 @@ FocusScope {
onTriggered: contentView.showPlaylist = !contentView.showPlaylist onTriggered: contentView.showPlaylist = !contentView.showPlaylist
} }
visible: mainWindow.width >= elisaTheme.viewSelectorSmallSizeThreshold
flat: true flat: true
text: mainWindow.width >= elisaTheme.viewSelectorSmallSizeThreshold ? i18n("Show Playlist") : undefined text: i18n("Show Playlist")
icon.name: "view-media-playlist" icon.name: "view-media-playlist"
checkable: true checkable: true
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment