fix(ui): l'area dello spartito si adatta all'altezza della finestra
StaffFullView usa per intero l'altezza imposta dal contenitore (il tetto di 340dp resta solo come fallback senza vincoli); in Pratica la vista Spartito prende lo spazio verticale residuo con weight(1f, fill=false). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
0a835699e0
commit
88196f0f51
2 files changed
+6
-2
No files matched your search
@@ -69,7 +69,10 @@ fun StaffFullView(
|
|||||||
scrollState.animateScrollTo(targetY)
|
scrollState.animateScrollTo(targetY)
|
||||||
}
|
}
|
||||||
|
|
||||||
val viewportHeightDp = if (totalHeightDp < maxVisibleHeight) totalHeightDp else maxVisibleHeight
|
// Con un vincolo di altezza dal contenitore (es. weight in Pratica) il
|
||||||
|
// viewport si adatta alla finestra; altrimenti vale il tetto di default
|
||||||
|
val heightBound = if (this.maxHeight != Dp.Infinity) this.maxHeight else maxVisibleHeight
|
||||||
|
val viewportHeightDp = if (totalHeightDp < heightBound) totalHeightDp else heightBound
|
||||||
Box(
|
Box(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.fillMaxWidth()
|
.fillMaxWidth()
|
||||||
|
|||||||
@@ -310,7 +310,8 @@ fun PracticeScreen(
|
|||||||
StaffFullView(
|
StaffFullView(
|
||||||
notes = state.sequence.notes,
|
notes = state.sequence.notes,
|
||||||
currentIndex = state.currentIndex,
|
currentIndex = state.currentIndex,
|
||||||
modifier = staffBgMod,
|
// Lo spartito si prende lo spazio residuo: cresce con la finestra
|
||||||
|
modifier = Modifier.weight(1f, fill = false).then(staffBgMod),
|
||||||
lightTheme = lightStaff,
|
lightTheme = lightStaff,
|
||||||
beats = state.sequence.beats,
|
beats = state.sequence.beats,
|
||||||
beatType = state.sequence.beatType,
|
beatType = state.sequence.beatType,
|
||||||
|
|||||||
Reference in new issue
Block a user