mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-12-06 21:15:43 +00:00
fix(input): keep the wide binder's drawing a fixed size and scroll the controls under it
This commit is contained in:
1 parent
668e02fa17
commit
e0315e5b66
1 file changed
+4
-2
@@ -95,6 +95,7 @@ internal fun InputButtonsPane(bindingsId: String, scope: String, baseId: String?
|
||||
}.testTag("input-buttons")) {
|
||||
val wide = maxWidth > 700.dp
|
||||
val boxWidth = maxWidth
|
||||
val boxHeight = maxHeight
|
||||
var others by remember { mutableStateOf(false) }
|
||||
val header: @Composable () -> Unit = {
|
||||
Row(verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(8.dp)) {
|
||||
@@ -145,8 +146,9 @@ internal fun InputButtonsPane(bindingsId: String, scope: String, baseId: String?
|
||||
}
|
||||
}
|
||||
if (wide) Row(horizontalArrangement = Arrangement.spacedBy(20.dp)) {
|
||||
Column(Modifier.weight(1.2f).fillMaxHeight(), verticalArrangement = Arrangement.spacedBy(10.dp)) {
|
||||
header(); drawing(Modifier.fillMaxWidth().weight(1f)); tools()
|
||||
// The drawing keeps a fixed share of the height; the controls under it scroll rather than squeezing it.
|
||||
Column(Modifier.weight(1.2f).fillMaxHeight().verticalScroll(rememberScrollState()), verticalArrangement = Arrangement.spacedBy(10.dp)) {
|
||||
header(); drawing(Modifier.fillMaxWidth().height((boxHeight * .55f).coerceAtLeast(180.dp))); tools()
|
||||
}
|
||||
panel(Modifier.weight(1f))
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user