1
0
Fork 0
mirror of https://github.com/HenkKalkwater/harbour-sailfin.git synced 2025-09-06 02:32:44 +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:
Chris Josten 2024-01-17 15:28:57 +01:00
parent 5328e63e2c
commit edcd3a93af
15 changed files with 999 additions and 635 deletions

View file

@ -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
@ -58,7 +58,7 @@ BaseDetailPage {
id: episodeImage
anchors {
top: parent.top
left: parent.left
right: parent.right
bottom: parent.bottom
}
width: Constants.libraryDelegateWidth
@ -116,11 +116,11 @@ BaseDetailPage {
Label {
id: episodeTitle
anchors {
left: episodeImage.right
leftMargin: Theme.paddingLarge
right: episodeImage.left
rightMargin: Theme.paddingLarge
top: parent.top
right: parent.right
rightMargin: Theme.horizontalPageMargin
left: parent.left
leftMargin: Theme.horizontalPageMargin
}
text: model.name
truncationMode: TruncationMode.Fade
@ -130,10 +130,10 @@ BaseDetailPage {
Label {
id: episodeOverview
anchors {
left: episodeImage.right
leftMargin: Theme.paddingLarge
right: parent.right
rightMargin: Theme.horizontalPageMargin
right: episodeImage.left
rightMargin: Theme.paddingLarge
left: parent.left
leftMargin: Theme.horizontalPageMargin
top: episodeTitle.bottom
bottom: parent.bottom
}