Adjust partition columnCount zoom +/- buttons and add margins
This commit is contained in:
parent
497fc8d998
commit
0f3313da4d
2 changed files with 4 additions and 6 deletions
|
|
@ -496,7 +496,7 @@ fun bestTUOWidth(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
maxWidth = max
|
maxWidth = max + 5.dp //marge
|
||||||
isReady = true
|
isReady = true
|
||||||
// println("=== [DEBUG TUO] Largeur retenue (maxWidth finale) : $maxWidth ===")
|
// println("=== [DEBUG TUO] Largeur retenue (maxWidth finale) : $maxWidth ===")
|
||||||
}
|
}
|
||||||
|
|
@ -669,7 +669,7 @@ fun LazyVerticalGridTUO(
|
||||||
|
|
||||||
val gridCount by sharedScreenModel.gridCount.collectAsState()
|
val gridCount by sharedScreenModel.gridCount.collectAsState()
|
||||||
|
|
||||||
var gridColumnCount: Int = remember(gridWidthDp, tuoWidthMeasure.isReady, tuoWidthMeasure.width, multiple) {
|
var baseGridColumnCount: Int = remember(gridWidthDp, tuoWidthMeasure.isReady, tuoWidthMeasure.width, multiple) {
|
||||||
if (!tuoWidthMeasure.isReady || gridWidthDp <= 0.dp || tuoWidthMeasure.width <= 0.dp) {
|
if (!tuoWidthMeasure.isReady || gridWidthDp <= 0.dp || tuoWidthMeasure.width <= 0.dp) {
|
||||||
return@remember multiple
|
return@remember multiple
|
||||||
}
|
}
|
||||||
|
|
@ -690,7 +690,7 @@ fun LazyVerticalGridTUO(
|
||||||
finalCols
|
finalCols
|
||||||
}
|
}
|
||||||
|
|
||||||
gridColumnCount += gridCount
|
val gridColumnCount = (baseGridColumnCount + gridCount).coerceAtLeast(multiple)
|
||||||
val flowRowSize: Float = 0.98f / gridColumnCount
|
val flowRowSize: Float = 0.98f / gridColumnCount
|
||||||
|
|
||||||
val currentStanza = viewModel.stanza
|
val currentStanza = viewModel.stanza
|
||||||
|
|
|
||||||
|
|
@ -525,9 +525,7 @@ class SharedScreenModel(private val fileRepository: FileRepository) : ScreenMode
|
||||||
_gridCount.value += nbGrid
|
_gridCount.value += nbGrid
|
||||||
}
|
}
|
||||||
fun descGridCount(nbGrid: Int) {
|
fun descGridCount(nbGrid: Int) {
|
||||||
if(_gridCount.value > 0) {
|
_gridCount.value -= nbGrid
|
||||||
_gridCount.value -= nbGrid
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
fun resetGridCount() {
|
fun resetGridCount() {
|
||||||
_gridCount.value = 0
|
_gridCount.value = 0
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue