mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-12-02 20:21:59 -05:00
feat(ui): Add dedicated Frame Generation tab and better engine selection ( left side menu ) (#3549)
* feat(ui): add dedicated frame generation drawer tab * fix(ui): keep frame limit label in display settings * fix(ui): focus display controls on a stable setting * feat(ui): simplify frame generation engine and multiplier selection * chore(ui): clean up frame generation selector imports * fix(ui): restore controller support in frame generation menu * refactor(ui): keep frame generation controls always visible * refactor(ui): show frame generation controls inline * chore(ui): remove obsolete frame generation focus import * fix(ui): register frame generation engine focus * fix(ui): remove obsolete frame generation menu host * fix(ui): update frame generation menu call sites * fix(ui): stack frame generation controls and restore focus * fix(ui): gate legacy frame generation card menu * fix(ui): gate legacy frame generation sheet menu * Fix FrameGenMenu call signature * Show frame generation controls only when opened * ci: trigger checks * feat(ui): add always-visible frame generation off option * feat(ui): keep frame generation controls visible * feat(ui): add custom frame generation vector icon * feat(ui): use custom icon for frame generation tab * fix(ui): restore adaptive LSFG target picker * fix(ui): remove excess top spacing in frame generation menu * Fix FrameGenMenu disabled-state handling * Format FrameGenMenu multiplier row * Add tighter Frame Generation control spacing * Tighten Frame Generation drawer spacing * Replace Frame Generation icon with new vector * Keep legacy Frame Generation buttons available * Use legacy Frame Generation buttons outside drawer * chore: trigger CI
This commit is contained in:
1 parent
6d78142a67
commit
90c7dece92
8 files changed
+198
-52
No files matched your search
@@ -1,52 +1,171 @@
|
||||
package com.droiddeck.launcher.ui
|
||||
|
||||
import androidx.compose.foundation.layout.Arrangement
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.foundation.layout.PaddingValues
|
||||
import androidx.compose.foundation.layout.Row
|
||||
import androidx.compose.foundation.layout.fillMaxWidth
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.material3.ButtonDefaults
|
||||
import androidx.compose.material3.MaterialTheme
|
||||
import androidx.compose.material3.OutlinedButton
|
||||
import androidx.compose.material3.Text
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.focus.FocusRequester
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.platform.LocalContext
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.unit.dp
|
||||
import com.droiddeck.launcher.R
|
||||
import com.droiddeck.launcher.gpu.FrameGen
|
||||
import com.droiddeck.launcher.gpu.Lossless
|
||||
|
||||
@Composable
|
||||
internal fun FrameGenMenu(
|
||||
host: MenuHost, mode: FrameGen.Mode, lossless: Lossless.State,
|
||||
mode: FrameGen.Mode,
|
||||
lossless: Lossless.State,
|
||||
onPick: (FrameGen.Mode) -> Unit,
|
||||
onImportLossless: () -> Unit,
|
||||
gameProfileId: String? = null,
|
||||
hasGameOverride: Boolean = false,
|
||||
onResetGame: () -> Unit = {},
|
||||
focusModifier: Modifier = Modifier,
|
||||
legacyButtons: Boolean = false,
|
||||
) {
|
||||
val context = LocalContext.current
|
||||
AnchoredMenu(host.open == "fg", onDismiss = { if (host.open == "fg") host.open = null }, title = stringResource(R.string.frame_gen_title)) { firstItemFocus ->
|
||||
val need = when {
|
||||
lossless.ready -> null
|
||||
lossless.owned -> stringResource(R.string.lsfg_needs_install)
|
||||
else -> stringResource(R.string.lsfg_needs_steam)
|
||||
}
|
||||
@Composable
|
||||
fun item(m: FrameGen.Mode, enabled: Boolean = true, detail: String? = null, focus: FocusRequester? = null) =
|
||||
MenuItem(FrameGen.label(context, m), checked = mode == m, enabled = enabled, detail = detail, focusRequester = focus) {
|
||||
onPick(m); host.open = null
|
||||
val need = when {
|
||||
lossless.ready -> null
|
||||
lossless.owned -> stringResource(R.string.lsfg_needs_install)
|
||||
else -> stringResource(R.string.lsfg_needs_steam)
|
||||
}
|
||||
val selectedEngine = mode.engine.takeIf { it != FrameGen.ENGINE_OFF }
|
||||
val offLabel = FrameGen.label(LocalContext.current, FrameGen.Mode.OFF)
|
||||
val colors = MaterialTheme.colorScheme
|
||||
val engines = listOf(FrameGen.ENGINE_LSFG to "LSFG", FrameGen.ENGINE_DDFG to "DDFG")
|
||||
|
||||
Column(Modifier.fillMaxWidth().padding(start = 10.dp, end = 10.dp, top = 0.dp, bottom = 8.dp)) {
|
||||
if (!legacyButtons) OutlinedButton(
|
||||
onClick = { onPick(FrameGen.Mode.OFF.copy(multiplier = mode.multiplier)) },
|
||||
modifier = Modifier.fillMaxWidth().controllerConfirm(
|
||||
onClick = { onPick(FrameGen.Mode.OFF.copy(multiplier = mode.multiplier)) },
|
||||
),
|
||||
contentPadding = PaddingValues(horizontal = 12.dp, vertical = 8.dp),
|
||||
colors = ButtonDefaults.outlinedButtonColors(
|
||||
containerColor = if (selectedEngine == null) colors.primary.copy(alpha = 0.16f) else colors.surface,
|
||||
contentColor = if (selectedEngine == null) colors.primary else colors.onSurface,
|
||||
),
|
||||
) { Text(offLabel) }
|
||||
|
||||
Row(Modifier.fillMaxWidth().then(if (legacyButtons) Modifier else Modifier.padding(top = 8.dp)), horizontalArrangement = Arrangement.spacedBy(8.dp)) {
|
||||
val focusIndex = engines.indexOfFirst { (engine, _) ->
|
||||
selectedEngine == engine || engine != FrameGen.ENGINE_LSFG || lossless.ready
|
||||
}
|
||||
item(FrameGen.Mode.OFF, focus = firstItemFocus)
|
||||
engines.forEachIndexed { index, (engine, label) ->
|
||||
val selected = selectedEngine == engine
|
||||
val enabled = selected || engine != FrameGen.ENGINE_LSFG || lossless.ready
|
||||
val pick = {
|
||||
onPick(if (selected) FrameGen.Mode.OFF.copy(multiplier = mode.multiplier) else FrameGen.Mode(engine, mode.multiplier.coerceIn(2, 4)))
|
||||
}
|
||||
OutlinedButton(
|
||||
onClick = pick,
|
||||
enabled = enabled,
|
||||
modifier = (if (index == focusIndex) focusModifier else Modifier)
|
||||
.weight(1f).controllerConfirm(enabled = enabled, onClick = pick),
|
||||
contentPadding = PaddingValues(horizontal = 12.dp, vertical = 8.dp),
|
||||
colors = ButtonDefaults.outlinedButtonColors(
|
||||
containerColor = if (selected) colors.primary.copy(alpha = 0.16f) else colors.surface,
|
||||
contentColor = if (selected) colors.primary else colors.onSurface,
|
||||
),
|
||||
) { Text(label) }
|
||||
}
|
||||
}
|
||||
|
||||
if (selectedEngine != null) {
|
||||
val multiplierEnabled = mode.engine != FrameGen.ENGINE_LSFG || lossless.ready
|
||||
Row(
|
||||
Modifier.fillMaxWidth().padding(top = 8.dp),
|
||||
horizontalArrangement = Arrangement.spacedBy(8.dp),
|
||||
) {
|
||||
(2..4).forEach { multiplier ->
|
||||
val selected = mode.multiplier == multiplier && mode.target == 0
|
||||
val pickMultiplier = {
|
||||
onPick(mode.copy(multiplier = multiplier, target = 0))
|
||||
}
|
||||
OutlinedButton(
|
||||
onClick = pickMultiplier,
|
||||
enabled = multiplierEnabled,
|
||||
modifier = Modifier.weight(1f).controllerConfirm(
|
||||
enabled = multiplierEnabled,
|
||||
onClick = pickMultiplier,
|
||||
),
|
||||
contentPadding = PaddingValues(horizontal = 12.dp, vertical = 8.dp),
|
||||
colors = ButtonDefaults.outlinedButtonColors(
|
||||
containerColor = if (selected) colors.secondary.copy(alpha = 0.18f) else colors.surface,
|
||||
contentColor = if (selected) colors.secondary else colors.onSurface,
|
||||
),
|
||||
) { Text("${multiplier}×") }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (selectedEngine == FrameGen.ENGINE_LSFG) {
|
||||
Row(
|
||||
Modifier.fillMaxWidth().padding(top = 8.dp),
|
||||
horizontalArrangement = Arrangement.spacedBy(8.dp),
|
||||
) {
|
||||
FrameGen.ADAPTIVE_TARGETS.forEach { target ->
|
||||
val adaptiveMode = FrameGen.Mode(FrameGen.ENGINE_LSFG, target = target)
|
||||
val selected = mode.target == target
|
||||
val pickTarget = { onPick(adaptiveMode) }
|
||||
OutlinedButton(
|
||||
onClick = pickTarget,
|
||||
enabled = lossless.ready,
|
||||
modifier = Modifier.weight(1f).controllerConfirm(
|
||||
enabled = lossless.ready,
|
||||
onClick = pickTarget,
|
||||
),
|
||||
contentPadding = PaddingValues(horizontal = 8.dp, vertical = 8.dp),
|
||||
colors = ButtonDefaults.outlinedButtonColors(
|
||||
containerColor = if (selected) colors.secondary.copy(alpha = 0.18f) else colors.surface,
|
||||
contentColor = if (selected) colors.secondary else colors.onSurface,
|
||||
),
|
||||
) {
|
||||
Text(FrameGen.label(LocalContext.current, adaptiveMode))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (selectedEngine == FrameGen.ENGINE_LSFG && !lossless.ready) {
|
||||
Text(need.orEmpty(), color = colors.onSurfaceVariant,
|
||||
style = MaterialTheme.typography.bodySmall,
|
||||
modifier = Modifier.padding(top = 6.dp))
|
||||
}
|
||||
|
||||
if (gameProfileId != null) {
|
||||
MenuItem(stringResource(R.string.comp_game_use_general), checked = !hasGameOverride) {
|
||||
onResetGame()
|
||||
host.open = null
|
||||
val resetGame = onResetGame
|
||||
OutlinedButton(
|
||||
onClick = resetGame,
|
||||
modifier = Modifier.fillMaxWidth().padding(top = 8.dp)
|
||||
.controllerConfirm(onClick = resetGame),
|
||||
contentPadding = PaddingValues(horizontal = 12.dp, vertical = 8.dp),
|
||||
) {
|
||||
Text(stringResource(R.string.comp_game_use_general) + if (hasGameOverride) "" else " ✓")
|
||||
}
|
||||
}
|
||||
for (m in 2..4) item(FrameGen.Mode(FrameGen.ENGINE_DDFG, m))
|
||||
val lsfg = (2..4).map { FrameGen.Mode(FrameGen.ENGINE_LSFG, it) } +
|
||||
FrameGen.ADAPTIVE_TARGETS.map { FrameGen.Mode(FrameGen.ENGINE_LSFG, target = it) }
|
||||
lsfg.forEachIndexed { i, m -> item(m, enabled = lossless.ready, detail = need.takeIf { i == 0 }) }
|
||||
|
||||
if (lossless.owned) {
|
||||
val using = when (lossless.source) {
|
||||
Lossless.Source.STEAM -> stringResource(R.string.lsfg_using_steam)
|
||||
Lossless.Source.IMPORT -> stringResource(R.string.lsfg_using_import)
|
||||
Lossless.Source.NONE -> null
|
||||
}
|
||||
MenuItem(stringResource(R.string.lsfg_import), checked = false, detail = using) { host.open = null; onImportLossless() }
|
||||
OutlinedButton(
|
||||
onClick = onImportLossless,
|
||||
modifier = Modifier.fillMaxWidth().padding(top = 8.dp)
|
||||
.controllerConfirm(onClick = onImportLossless),
|
||||
contentPadding = PaddingValues(horizontal = 12.dp, vertical = 8.dp),
|
||||
) {
|
||||
Text(stringResource(R.string.lsfg_import) + (using?.let { " · $it" } ?: ""))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -830,7 +830,7 @@ internal fun ReadinessCard(
|
||||
|
||||
@Composable
|
||||
private fun FrameGenMenu(s: FrontEndState, a: FrontEndActions, host: MenuHost) {
|
||||
FrameGenMenu(host, s.frameGen, s.lossless, a.onFrameGenPick, a.onImportLossless)
|
||||
FrameGenMenu(s.frameGen, s.lossless, a.onFrameGenPick, a.onImportLossless, legacyButtons = true)
|
||||
}
|
||||
|
||||
@Composable
|
||||
@@ -878,8 +878,7 @@ internal fun LaunchSettings(s: FrontEndState, a: FrontEndActions, host: MenuHost
|
||||
) {
|
||||
host.open = if (host.open == "fg") null else "fg"
|
||||
}
|
||||
FrameGenMenu(
|
||||
host = host,
|
||||
if (host.open == "fg") FrameGenMenu(
|
||||
mode = if (frameGenProfileKey != null) gameFrameGenMode else s.frameGen,
|
||||
lossless = s.lossless,
|
||||
onPick = { mode ->
|
||||
@@ -893,6 +892,7 @@ internal fun LaunchSettings(s: FrontEndState, a: FrontEndActions, host: MenuHost
|
||||
}
|
||||
},
|
||||
onImportLossless = a.onImportLossless,
|
||||
legacyButtons = true,
|
||||
gameProfileId = frameGenProfileKey,
|
||||
hasGameOverride = gameFrameGenOverride,
|
||||
onResetGame = {
|
||||
|
||||
@@ -10,6 +10,7 @@ import com.droiddeck.launcher.session.SessionPrefs
|
||||
internal enum class SessionDrawerPage(val firstControl: String) {
|
||||
CONTROLLER("section-controller-input"),
|
||||
HUD("section-performance-pacing"),
|
||||
FRAMEGEN("fg"),
|
||||
DISPLAY("section-display"),
|
||||
EFFECTS("section-effects-look"),
|
||||
GAMES("section-game-profile"),
|
||||
|
||||
@@ -96,6 +96,7 @@ import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.ExperimentalComposeUiApi
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.graphics.vector.ImageVector
|
||||
import androidx.compose.ui.graphics.asImageBitmap
|
||||
import androidx.compose.ui.unit.Dp
|
||||
import androidx.compose.runtime.rememberUpdatedState
|
||||
@@ -153,6 +154,7 @@ import androidx.compose.ui.semantics.semantics
|
||||
import androidx.compose.ui.text.font.FontWeight
|
||||
import androidx.compose.ui.text.style.TextOverflow
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.res.vectorResource
|
||||
import androidx.compose.ui.platform.LocalContext
|
||||
import com.droiddeck.launcher.R
|
||||
import com.droiddeck.launcher.core.FexPreset
|
||||
@@ -178,6 +180,7 @@ internal val SessionDrawerPage.title: Int get() = when (this) {
|
||||
SessionDrawerPage.CONTROLLER -> R.string.drawer_page_controller
|
||||
SessionDrawerPage.DISPLAY -> R.string.drawer_page_display
|
||||
SessionDrawerPage.HUD -> R.string.drawer_page_performance
|
||||
SessionDrawerPage.FRAMEGEN -> R.string.frame_gen_title
|
||||
SessionDrawerPage.VR -> R.string.drawer_page_vr
|
||||
SessionDrawerPage.EFFECTS -> R.string.drawer_page_effects
|
||||
SessionDrawerPage.GAMES -> R.string.drawer_page_game
|
||||
@@ -191,6 +194,7 @@ internal val SessionDrawerPage.icon get() = when (this) {
|
||||
SessionDrawerPage.CONTROLLER -> Icons.Outlined.SportsEsports
|
||||
SessionDrawerPage.DISPLAY -> Icons.Outlined.DesktopWindows
|
||||
SessionDrawerPage.HUD -> Icons.Outlined.Speed
|
||||
SessionDrawerPage.FRAMEGEN -> Icons.Outlined.Layers
|
||||
SessionDrawerPage.VR -> VrHeadsetIcon
|
||||
SessionDrawerPage.EFFECTS -> Icons.Outlined.AutoFixHigh
|
||||
SessionDrawerPage.GAMES -> Icons.Outlined.Layers
|
||||
@@ -649,6 +653,7 @@ internal fun SessionDrawer(open: Boolean, requestedPage: SessionDrawerPage, cont
|
||||
when (page) {
|
||||
SessionDrawerPage.CONTROLLER -> DrawerControllerPage(host, a, a.controllerConnected || controllerActive, track)
|
||||
SessionDrawerPage.HUD -> DrawerPerformancePage(host, a, track)
|
||||
SessionDrawerPage.FRAMEGEN -> DrawerFrameGenPage(host, a, track)
|
||||
SessionDrawerPage.DISPLAY -> DrawerDisplayPage(host, a, track)
|
||||
SessionDrawerPage.EFFECTS -> ScreenEffectsGroup(host, a, track)
|
||||
SessionDrawerPage.GAMES -> DrawerGamePage(host, a, track)
|
||||
@@ -862,27 +867,8 @@ private fun DrawerControllerPage(host: MenuHost, a: DrawerActions, padConnected:
|
||||
@Composable
|
||||
private fun DrawerPerformancePage(host: MenuHost, a: DrawerActions, track: (String) -> Modifier) {
|
||||
val offLabel = stringResource(R.string.frame_gen_off)
|
||||
val fgLabel = FrameGen.label(LocalContext.current, a.frameGen)
|
||||
val limit = if (a.direct && a.fpsLimit > 0) "${stringResource(R.string.drawer_frame_limit)} ${a.fpsLimit}" else null
|
||||
SettingsGroup(stringResource(R.string.drawer_section_pacing), key = "performance-pacing", detail = summary(fgLabel, limit)) {
|
||||
val fgOpen = host.open == "fg"
|
||||
SettingsRow(
|
||||
stringResource(R.string.frame_gen_title),
|
||||
if (a.frameGenTargetGameId != null)
|
||||
"${stringResource(R.string.frame_gen_scope_game)} · ${a.frameGenTargetGameName ?: "ID ${a.frameGenTargetGameId}"}"
|
||||
else stringResource(R.string.frame_gen_scope_global),
|
||||
highlighted = fgOpen,
|
||||
) {
|
||||
Box {
|
||||
ValueChip(fgLabel, fgOpen, modifier = track("fg")) { host.open = if (fgOpen) null else "fg" }
|
||||
FrameGenMenu(
|
||||
host, a.frameGen, a.lossless, a.onFrameGenPick, a.onImportLossless,
|
||||
gameProfileId = a.frameGenTargetGameId,
|
||||
hasGameOverride = a.hasGameOverride,
|
||||
onResetGame = a.onFrameGenReset,
|
||||
)
|
||||
}
|
||||
}
|
||||
SettingsGroup(stringResource(R.string.drawer_section_pacing), key = "performance-pacing", detail = summary(limit)) {
|
||||
if (a.direct) SliderRow(
|
||||
stringResource(R.string.drawer_frame_limit), stringResource(R.string.drawer_frame_limit_note),
|
||||
a.fpsLimit.takeIf { it > 0 } ?: SessionPrefs.FPS_LIMIT_OFF,
|
||||
@@ -908,6 +894,28 @@ private fun DrawerPerformancePage(host: MenuHost, a: DrawerActions, track: (Stri
|
||||
DroidDeckHudSettings(host, a, track)
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Composable
|
||||
private fun DrawerFrameGenPage(host: MenuHost, a: DrawerActions, track: (String) -> Modifier) {
|
||||
val fgLabel = FrameGen.label(LocalContext.current, a.frameGen)
|
||||
val scope = if (a.frameGenTargetGameId != null)
|
||||
"${stringResource(R.string.frame_gen_scope_game)} · ${a.frameGenTargetGameName ?: "ID ${a.frameGenTargetGameId}"}"
|
||||
else stringResource(R.string.frame_gen_scope_global)
|
||||
|
||||
SettingsGroup(stringResource(R.string.frame_gen_title), compact = true, key = "frame-generation", detail = summary(fgLabel, scope)) {
|
||||
SettingsRow(stringResource(R.string.frame_gen_title), scope, stacked = true, tightControlSpacing = true) {
|
||||
FrameGenMenu(
|
||||
a.frameGen, a.lossless, a.onFrameGenPick, a.onImportLossless,
|
||||
gameProfileId = a.frameGenTargetGameId,
|
||||
hasGameOverride = a.hasGameOverride,
|
||||
onResetGame = a.onFrameGenReset,
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Composable
|
||||
private fun DrawerDisplayPage(host: MenuHost, a: DrawerActions, track: (String) -> Modifier) {
|
||||
val orientations = SessionPrefs.orientationOptions.map { (value, label) -> value to stringResource(label) }
|
||||
@@ -1216,7 +1224,16 @@ private fun DrawerPageTabs(page: SessionDrawerPage, pages: List<SessionDrawerPag
|
||||
.selectable(selected = selected, role = androidx.compose.ui.semantics.Role.Tab, interactionSource = source, indication = LocalIndication.current, onClick = select)
|
||||
.controllerConfirm(onClick = select),
|
||||
) {
|
||||
Icon(item.icon, contentDescription = null, tint = tint, modifier = Modifier.size(if (compact) 22.dp else 30.dp))
|
||||
if (item == SessionDrawerPage.FRAMEGEN) {
|
||||
Icon(
|
||||
imageVector = ImageVector.vectorResource(R.drawable.ic_frame_generation),
|
||||
contentDescription = null,
|
||||
tint = tint,
|
||||
modifier = Modifier.size(if (compact) 22.dp else 30.dp),
|
||||
)
|
||||
} else {
|
||||
Icon(item.icon, contentDescription = null, tint = tint, modifier = Modifier.size(if (compact) 22.dp else 30.dp))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -466,7 +466,7 @@ fun SettingsGroup(title: String, compact: Boolean = false, detail: String? = nul
|
||||
}
|
||||
|
||||
@Composable
|
||||
fun SettingsRow(label: String, hint: String?, highlighted: Boolean = false, hintLines: Int? = null, stacked: Boolean = false, control: @Composable () -> Unit) {
|
||||
fun SettingsRow(label: String, hint: String?, highlighted: Boolean = false, hintLines: Int? = null, stacked: Boolean = false, tightControlSpacing: Boolean = false, control: @Composable () -> Unit) {
|
||||
val compact = LocalCompactSettings.current
|
||||
val colors = MaterialTheme.colorScheme
|
||||
val pal = LocalPalette.current
|
||||
@@ -488,13 +488,13 @@ fun SettingsRow(label: String, hint: String?, highlighted: Boolean = false, hint
|
||||
} else if (stacked || LocalNarrowPane.current) Column(
|
||||
modifier = Modifier.fillMaxWidth().background(bg).padding(
|
||||
horizontal = if (compact) 10.dp else 14.dp,
|
||||
vertical = if (compact) 6.dp else 12.dp),
|
||||
vertical = if (tightControlSpacing) 2.dp else if (compact) 6.dp else 12.dp),
|
||||
) {
|
||||
Text(label, fontSize = if (compact) 13.sp else 15.sp,
|
||||
lineHeight = if (compact) 16.sp else androidx.compose.ui.unit.TextUnit.Unspecified,
|
||||
fontWeight = FontWeight.SemiBold, color = colors.onBackground)
|
||||
if (hint != null || hintLines != null) hintText(if (compact) 11.sp else 13.sp)
|
||||
Box(Modifier.padding(top = if (compact) 6.dp else 8.dp)) { control() }
|
||||
Box(Modifier.padding(top = if (tightControlSpacing) 2.dp else if (compact) 6.dp else 8.dp)) { control() }
|
||||
} else Row(
|
||||
verticalAlignment = Alignment.CenterVertically,
|
||||
modifier = Modifier.fillMaxWidth().background(bg).padding(horizontal = 14.dp, vertical = 11.dp),
|
||||
|
||||
@@ -13,7 +13,7 @@ internal fun FrameGenGroup(s: FrontEndState, a: FrontEndActions) {
|
||||
SettingsRow(stringResource(R.string.frame_gen_title), stringResource(R.string.frame_gen_hint), highlighted = host.open == "fg") {
|
||||
Box {
|
||||
ValueChip(s.frameGenLabel, host.open == "fg") { host.open = if (host.open == "fg") null else "fg" }
|
||||
FrameGenMenu(host, s.frameGen, s.lossless, a.onFrameGenPick, a.onImportLossless)
|
||||
if (host.open == "fg") FrameGenMenu(s.frameGen, s.lossless, a.onFrameGenPick, a.onImportLossless)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="512"
|
||||
android:viewportHeight="512">
|
||||
<path android:fillColor="#FFFFFFFF" android:fillType="evenOdd" android:pathData="M 142 335 L 148 343 L 148 345 L 155 352 L 165 365 L 166 368 L 169 370 L 171 374 L 176 379 L 177 382 L 179 383 L 181 387 L 187 393 L 187 395 L 193 401 L 196 400 L 200 392 L 206 386 L 259 419 L 262 418 L 266 411 L 264 406 L 250 398 L 249 396 L 242 391 L 237 389 L 236 387 L 231 385 L 227 381 L 215 374 L 215 371 L 222 361 L 222 356 L 220 353 Z M 472 198 L 463 195 L 446 195 L 436 198 L 431 198 L 426 200 L 418 201 L 415 203 L 382 209 L 375 212 L 361 214 L 353 217 L 349 224 L 349 226 L 346 229 L 339 245 L 336 248 L 281 354 L 274 365 L 275 370 L 279 376 L 279 379 L 311 450 L 311 453 L 317 465 L 325 473 L 327 474 L 339 474 L 348 470 L 353 465 L 360 454 L 369 436 L 369 434 L 372 430 L 374 424 L 385 404 L 388 396 L 399 376 L 463 246 L 466 243 L 470 232 L 480 214 L 479 205 Z M 444 224 L 445 226 L 337 439 L 334 435 L 332 428 L 316 393 L 315 388 L 312 384 L 312 381 L 305 367 L 305 364 L 307 362 L 348 282 L 369 244 L 369 242 L 372 239 L 381 238 L 386 236 L 390 236 L 395 234 L 409 232 L 423 228 L 432 227 L 440 224 Z M 211 187 L 201 192 L 201 194 L 203 196 L 203 198 L 228 249 L 225 251 L 166 265 L 165 266 L 169 280 L 234 264 L 242 278 L 242 280 L 265 327 L 278 321 L 278 319 L 250 261 L 252 259 L 313 244 L 310 229 L 244 246 L 235 230 L 235 228 L 226 211 L 226 209 L 224 207 L 215 186 Z M 233 127 L 233 129 L 235 131 L 240 133 L 243 136 L 248 138 L 287 162 L 287 165 L 279 178 L 281 181 L 288 183 L 290 182 L 304 186 L 310 186 L 313 188 L 316 187 L 320 189 L 343 192 L 350 195 L 352 194 L 357 196 L 362 196 L 354 186 L 351 184 L 350 181 L 347 179 L 339 168 L 335 165 L 335 163 L 324 152 L 323 149 L 320 147 L 311 135 L 307 134 L 302 136 L 302 138 L 297 144 L 297 146 L 295 148 L 292 148 L 282 141 L 276 139 L 266 132 L 264 132 L 253 125 L 247 123 L 242 119 L 237 120 Z M 221 73 L 212 70 L 195 70 L 175 75 L 170 75 L 154 80 L 140 82 L 135 84 L 130 84 L 123 87 L 103 91 L 95 103 L 88 119 L 86 121 L 79 136 L 75 141 L 73 147 L 66 158 L 59 174 L 56 177 L 23 240 L 24 245 L 34 266 L 34 269 L 44 289 L 44 292 L 60 326 L 63 335 L 67 342 L 72 347 L 76 349 L 91 348 L 95 346 L 106 334 L 118 310 L 118 308 L 120 306 L 229 88 L 228 80 Z M 193 99 L 194 100 L 190 107 L 190 109 L 183 121 L 183 123 L 181 125 L 176 137 L 174 139 L 132 224 L 130 226 L 123 242 L 112 261 L 89 307 L 88 311 L 85 314 L 58 250 L 53 241 L 62 223 L 74 202 L 118 117 L 121 114 L 129 113 L 134 111 L 139 111 L 162 105 L 167 105 L 188 99 Z" />
|
||||
</vector>
|
||||
@@ -7,8 +7,9 @@ class SessionDrawerPageTest {
|
||||
@Test fun navigationRunsControllerPerformanceDisplayEffectsGameVrSession() {
|
||||
val pages = sessionDrawerPages(hasAgent = false)
|
||||
assertEquals(
|
||||
listOf(SessionDrawerPage.CONTROLLER, SessionDrawerPage.HUD, SessionDrawerPage.DISPLAY, SessionDrawerPage.EFFECTS,
|
||||
SessionDrawerPage.GAMES, SessionDrawerPage.VR, SessionDrawerPage.SESSION, SessionDrawerPage.MORE),
|
||||
listOf(SessionDrawerPage.CONTROLLER, SessionDrawerPage.HUD, SessionDrawerPage.FRAMEGEN,
|
||||
SessionDrawerPage.DISPLAY, SessionDrawerPage.EFFECTS, SessionDrawerPage.GAMES,
|
||||
SessionDrawerPage.VR, SessionDrawerPage.SESSION, SessionDrawerPage.MORE),
|
||||
pages.strip(),
|
||||
)
|
||||
assertEquals(SessionDrawerPage.MORE, pages.step(SessionDrawerPage.CONTROLLER, -1))
|
||||
|
||||
Reference in new issue
Block a user