ui: improve layout and scrolling for camera parameter bars
This commit is contained in:
1 parent
a61995aa4a
commit
d6734bb58f
4 files changed
+11
-5
No files matched your search
@@ -95,9 +95,10 @@ fun ParameterItem(
|
||||
) {
|
||||
Column(
|
||||
horizontalAlignment = Alignment.CenterHorizontally,
|
||||
verticalArrangement = Arrangement.Center,
|
||||
modifier = modifier
|
||||
.width(60.dp)
|
||||
.height(48.dp)
|
||||
.heightIn(min = 48.dp)
|
||||
.autoRotate()
|
||||
.then(
|
||||
if (isEnabled) {
|
||||
|
||||
@@ -3,6 +3,8 @@ package com.hinnka.mycamera.ui.camera
|
||||
import android.hardware.camera2.CameraMetadata
|
||||
import androidx.compose.foundation.clickable
|
||||
import androidx.compose.foundation.layout.*
|
||||
import androidx.compose.foundation.rememberScrollState
|
||||
import androidx.compose.foundation.verticalScroll
|
||||
import androidx.compose.material3.Text
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Alignment
|
||||
@@ -24,9 +26,10 @@ fun CameraParameterBarVerticel(
|
||||
|
||||
Column(
|
||||
modifier = modifier
|
||||
.verticalScroll(rememberScrollState())
|
||||
.padding(horizontal = 8.dp, vertical = 16.dp),
|
||||
horizontalAlignment = Alignment.CenterHorizontally,
|
||||
verticalArrangement = Arrangement.SpaceAround
|
||||
verticalArrangement = Arrangement.spacedBy(12.dp)
|
||||
) {
|
||||
ParameterItem(
|
||||
label = "AE",
|
||||
|
||||
@@ -916,7 +916,8 @@ fun CameraScreen(
|
||||
activePanel =
|
||||
if (activePanel == ActivePanel.FILTERS) ActivePanel.NONE else ActivePanel.FILTERS
|
||||
},
|
||||
modifier = Modifier.align(Alignment.Center)
|
||||
modifier = Modifier
|
||||
.align(Alignment.Center)
|
||||
)
|
||||
}
|
||||
Box(
|
||||
@@ -930,7 +931,8 @@ fun CameraScreen(
|
||||
onParameterClick = { param ->
|
||||
selectedParameter = param
|
||||
},
|
||||
modifier = Modifier.align(Alignment.Center)
|
||||
modifier = Modifier
|
||||
.align(Alignment.Center)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -340,7 +340,7 @@ fun ZoomRulerVertical(
|
||||
}
|
||||
},
|
||||
horizontalAlignment = Alignment.CenterHorizontally,
|
||||
verticalArrangement = Arrangement.SpaceAround
|
||||
verticalArrangement = Arrangement.spacedBy(8.dp)
|
||||
) {
|
||||
val selectedStopIndex = stops.indices.minByOrNull { abs(stops[it] - zoomRatio) }
|
||||
stops.forEachIndexed { index, stop ->
|
||||
|
||||
Reference in new issue
Block a user