From af27dc8d3bb237a7cc64a02f3ff3ce9885b2c0df Mon Sep 17 00:00:00 2001 From: Boy Date: Tue, 20 Aug 2024 12:52:37 +0200 Subject: [PATCH] Revert "refactor: add toggle to always show buttons" This reverts commit 375d54446f8320aaa7a2a625f4086cbff070c4a6. --- .../com/mineinabyss/guiy/components/lists/Scrollable.kt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main/kotlin/com/mineinabyss/guiy/components/lists/Scrollable.kt b/src/main/kotlin/com/mineinabyss/guiy/components/lists/Scrollable.kt index eef12c9..9070711 100644 --- a/src/main/kotlin/com/mineinabyss/guiy/components/lists/Scrollable.kt +++ b/src/main/kotlin/com/mineinabyss/guiy/components/lists/Scrollable.kt @@ -33,7 +33,6 @@ fun Scrollable( isHideTooltip = true } }, - alwaysShowButtons: Boolean = false, content: @Composable (page: List) -> Unit, ) { var size by remember { mutableStateOf(Size(0, 0)) } @@ -50,9 +49,9 @@ fun Scrollable( position = navbarPosition, navbar = { NavbarButtons(navbarPosition, navbarBackground) { - if (alwaysShowButtons || line > 0) previousButton() + if (line > 0) previousButton() else Spacer(1, 1) - if (alwaysShowButtons || end < items.size) nextButton() + if (end < items.size) nextButton() else Spacer(1, 1) } },