mirror of
https://github.com/HenkKalkwater/harbour-sailfin.git
synced 2025-09-05 18:22:46 +00:00
sailfin: Improve layout on landscape and tablet screens
I've dropped the whole `<constant> * Theme.pixelRatio`-approach[^1] for determining when the UI should split into two columns, because the values seemed quite arbitrary and I was entering random numbers. I'm now doing it on multiples of `Theme.itemSizeHuge`, which is easier to reason about. This also fixes occasions where items in a grid would leave a bit of space to the right in the CollectionPage. Backdrop images in VideoPage and MusicAlbumPage now have a maximum height of half of the screen, to avoid filling the entire screen in landscape mode. Perhaps it doesn't always look good, but it makes the layout more usable. Images on the SeasonPage and MusicAlbumPage (in landscape) are now aligned to the right, to avoid blocking the Page back indicator.
This commit is contained in:
parent
5328e63e2c
commit
edcd3a93af
15 changed files with 999 additions and 635 deletions
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Sailfin: a Jellyfin client written using Qt
|
||||
Copyright (C) 2020 Chris Josten
|
||||
Copyright (C) 2020-2024 Chris Josten
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
|
@ -26,12 +26,13 @@ Column {
|
|||
property real playProgress: 0.0
|
||||
property bool favourited: false
|
||||
property alias imageBlurhash: playImage.blurhash
|
||||
property real maxHeight: parent.width / imageAspectRatio
|
||||
signal playPressed(bool resume)
|
||||
spacing: Theme.paddingLarge
|
||||
|
||||
BackgroundItem {
|
||||
width: parent.width
|
||||
height: width / imageAspectRatio
|
||||
height: Math.min(maxHeight, width / imageAspectRatio)
|
||||
RemoteImage {
|
||||
id: playImage
|
||||
anchors.fill: parent
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Sailfin: a Jellyfin client written using Qt
|
||||
Copyright (C) 2021 Chris Josten
|
||||
Copyright (C) 2021-2024 Chris Josten
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
|
@ -18,7 +18,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|||
*/
|
||||
|
||||
import QtQuick 2.6
|
||||
import QtMultimedia 5.6
|
||||
import Sailfish.Silica 1.0
|
||||
|
||||
import nl.netsoj.chris.Jellyfin 1.0 as J
|
||||
|
@ -231,9 +230,9 @@ PanelBackground {
|
|||
rightMargin: Theme.paddingMedium
|
||||
verticalCenter: parent.verticalCenter
|
||||
}
|
||||
icon.source: manager.playbackState === MediaPlayer.PlayingState
|
||||
icon.source: manager.playbackState === J.PlayerState.Playing
|
||||
? "image://theme/icon-m-pause" : "image://theme/icon-m-play"
|
||||
onClicked: manager.playbackState === MediaPlayer.PlayingState
|
||||
onClicked: manager.playbackState === J.PlayerState.Playing
|
||||
? manager.pause()
|
||||
: manager.play()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue