Skip to content

Commit d251b94

Browse files
Improve now playing screen phone (#1543)
* optimize album art and font size * Center text vertically * Tweak cutoff values for album title and player button for Galaxy S8+ screens * Give quality icon a bit more breathing room * Feedback * Slightly increase the font-size * Gradient + tiny bump fontsize * Gradient from -25% till +25% * Fix queue overlap and add padding to art
1 parent c0e0d87 commit d251b94

File tree

1 file changed

+46
-14
lines changed

1 file changed

+46
-14
lines changed

src/layouts/default/PlayerOSD/PlayerFullscreen.vue

Lines changed: 46 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
z-index="9999"
88
persistent
99
>
10-
<v-card :color="backgroundColor">
10+
<v-card :style="{ background: backgroundColor }">
1111
<v-toolbar class="v-toolbar-default" color="transparent">
1212
<template #prepend>
1313
<Button icon @click="store.showFullscreenPlayer = false">
@@ -69,7 +69,7 @@
6969
store.activePlayer?.powered != false &&
7070
store.activePlayer?.current_media?.image_url
7171
"
72-
style="max-width: 100%; width: auto; border-radius: 4px"
72+
style="max-width: 100%; width: auto"
7373
:src="
7474
getMediaImageUrl(store.activePlayer.current_media.image_url)
7575
"
@@ -128,7 +128,7 @@
128128

129129
<!-- subtitle: album -->
130130
<v-card-subtitle
131-
v-else-if="store.activePlayer?.current_media?.album"
131+
v-else-if="store.activePlayer?.current_media?.album && showAlbumSubtitle"
132132
:style="`font-size: ${subTitleFontSize};cursor:pointer;`"
133133
@click="onAlbumClick"
134134
>
@@ -177,7 +177,7 @@
177177
store.activePlayer?.powered != false &&
178178
store.curQueueItem?.streamdetails
179179
"
180-
style="margin: auto; padding-top: 20px"
180+
style="margin: auto; padding-top: min(20px, 2vh)"
181181
>
182182
<QualityDetailsBtn />
183183
</div>
@@ -379,7 +379,7 @@
379379
<div class="main-media-details-image main-media-details-image-alt">
380380
<v-img
381381
v-if="store.activePlayer?.current_media?.image_url"
382-
style="max-width: 100%; width: auto; border-radius: 4px"
382+
style="max-width: 100%; width: auto"
383383
:src="
384384
getMediaImageUrl(store.activePlayer.current_media.image_url)
385385
"
@@ -575,6 +575,11 @@ import computeElapsedTime from "@/helpers/elapsed";
575575
576576
const { name } = useDisplay();
577577
578+
const MIN_HEIGHT_SHOW_FULL_DETAILS = 750;
579+
const showAlbumSubtitle = computed(
580+
() => vuetify.display.height.value > MIN_HEIGHT_SHOW_FULL_DETAILS,
581+
);
582+
578583
interface Props {
579584
colorPalette: ImageColorPalette;
580585
}
@@ -734,7 +739,7 @@ const titleFontSize = computed(() => {
734739
case "xs":
735740
return "1.2em";
736741
case "sm":
737-
return "1.6em";
742+
return "1.4em";
738743
case "md":
739744
return "2em";
740745
case "lg":
@@ -751,9 +756,9 @@ const titleFontSize = computed(() => {
751756
const subTitleFontSize = computed(() => {
752757
switch (name.value) {
753758
case "xs":
754-
return "1.0em";
759+
return "1.05em";
755760
case "sm":
756-
return "1.2em";
761+
return "1.15em";
757762
case "md":
758763
return "1.7em";
759764
case "lg":
@@ -768,7 +773,7 @@ const subTitleFontSize = computed(() => {
768773
});
769774
770775
const showExpandedPlayerSelectButton = computed(() => {
771-
return vuetify.display.height.value > 700;
776+
return vuetify.display.height.value > MIN_HEIGHT_SHOW_FULL_DETAILS;
772777
});
773778
774779
// methods
@@ -1453,16 +1458,21 @@ watchEffect(() => {
14531458
// Also, this text color has a better contrast than the automatically selected one
14541459
document.documentElement.style.setProperty("--text-color", textColor.hex());
14551460
sliderColor.value = textColor.hex();
1456-
backgroundColor.value = bgColor.hex();
1461+
const topColor = bgColor.lighten(0.25);
1462+
const bottomColor = bgColor.darken(0.25);
1463+
backgroundColor.value = `linear-gradient(to bottom, ${topColor.hex()}, ${bottomColor.hex()})`;
14571464
});
14581465
</script>
14591466

14601467
<style scoped>
1468+
14611469
.main {
1470+
--main-height: 57%;
1471+
--main-max-height: 65%;
14621472
display: flex;
14631473
min-height: 50% !important;
1464-
height: 50% !important;
1465-
max-height: 65% !important;
1474+
height: var(--main-height) !important;
1475+
max-height: var(--main-max-height) !important;
14661476
padding-bottom: 5px;
14671477
}
14681478
@@ -1497,8 +1507,10 @@ watchEffect(() => {
14971507
padding-left: 20px;
14981508
padding-right: 20px;
14991509
}
1500-
.main-media-details-image.v-img {
1510+
.main-media-details-image .v-img {
15011511
width: auto;
1512+
border-radius: 10px;
1513+
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
15021514
}
15031515
15041516
.main-media-details-image-alt {
@@ -1653,7 +1665,7 @@ button {
16531665
aspect-ratio: 1;
16541666
max-width: 400px;
16551667
margin: 0 auto;
1656-
border-radius: 4px;
1668+
border-radius: 10px;
16571669
background-color: rgba(var(--v-theme-on-surface), 0.08);
16581670
display: flex;
16591671
align-items: center;
@@ -1675,4 +1687,24 @@ button {
16751687
color: var(--badge-color);
16761688
margin-right: 0.5rem;
16771689
}
1690+
1691+
@media (max-width: 540px) {
1692+
.main:has(.main-media-details) {
1693+
--main-height: 70%;
1694+
--main-max-height: 75%;
1695+
}
1696+
1697+
.main-media-details-image {
1698+
height: 75%;
1699+
max-height: 85%;
1700+
padding-left: 16px;
1701+
padding-right: 16px;
1702+
}
1703+
1704+
.main-media-details-track-info {
1705+
padding: 8px;
1706+
height: 25%;
1707+
}
1708+
}
1709+
16781710
</style>

0 commit comments

Comments
 (0)