Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dim static elements in screensaver #3368

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import androidx.compose.material.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.alpha
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.asImageBitmap
import androidx.compose.ui.layout.ContentScale
Expand Down Expand Up @@ -45,7 +46,8 @@ fun DreamContentLibraryShowcase(
Row(
modifier = Modifier
.align(Alignment.BottomStart)
.overscan(),
.overscan()
.alpha(SCREENSAVER_OVERLAY_ALPHA),
) {
Text(
text = content.item.name.orEmpty(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import androidx.compose.foundation.layout.width
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.alpha
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.res.stringResource
Expand All @@ -26,5 +27,6 @@ fun DreamContentLogo() = Box(
modifier = Modifier
.align(Alignment.Center)
.width(400.dp)
.alpha(SCREENSAVER_OVERLAY_ALPHA)
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import androidx.compose.foundation.layout.height
import androidx.compose.material.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.alpha
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.res.painterResource
Expand All @@ -24,6 +25,8 @@ import org.jellyfin.androidtv.R
import org.jellyfin.androidtv.ui.composable.overscan
import org.jellyfin.androidtv.ui.composable.rememberCurrentTime

const val SCREENSAVER_OVERLAY_ALPHA = 0.7f

@Composable
fun DreamHeader(
showLogo: Boolean,
Expand All @@ -33,7 +36,8 @@ fun DreamHeader(
horizontalArrangement = Arrangement.SpaceBetween,
modifier = Modifier
.fillMaxWidth()
.overscan(),
.overscan()
.alpha(SCREENSAVER_OVERLAY_ALPHA),
) {
// Logo
AnimatedVisibility(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ fun DreamView(
AnimatedContent(
targetState = content,
transitionSpec = {
fadeIn(tween(durationMillis = 1_000)) togetherWith fadeOut(snap(delayMillis = 1_000))
fadeIn(tween(durationMillis = 1_000)) togetherWith fadeOut(tween(durationMillis = 500, delayMillis = 500))
},
label = "DreamContentTransition"
) { content ->
Expand Down