mirror of
https://github.com/Myzel394/Alibi.git
synced 2025-06-18 23:05:26 +02:00
fix: Improve design for little screens
Signed-off-by: Myzel394 <50424412+Myzel394@users.noreply.github.com>
This commit is contained in:
parent
4e93ff4bb2
commit
a250ec1788
@ -39,11 +39,12 @@ fun BigButton(
|
||||
val orientation = LocalConfiguration.current.orientation
|
||||
|
||||
BoxWithConstraints {
|
||||
val isLarge = maxWidth > 500.dp && orientation == Configuration.ORIENTATION_PORTRAIT
|
||||
val isLarge =
|
||||
maxWidth > 500.dp && maxHeight > 1200.dp && orientation == Configuration.ORIENTATION_PORTRAIT
|
||||
|
||||
Column(
|
||||
modifier = Modifier
|
||||
.size(if (isLarge) 250.dp else 200.dp)
|
||||
.size(if (isLarge) 250.dp else 180.dp)
|
||||
.clip(CircleShape)
|
||||
.semantics {
|
||||
contentDescription = label
|
||||
|
@ -1,6 +1,7 @@
|
||||
package app.myzel394.alibi.ui.components.RecorderScreen.atoms
|
||||
|
||||
import androidx.compose.foundation.layout.Box
|
||||
import androidx.compose.foundation.layout.BoxWithConstraints
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Modifier
|
||||
@ -13,6 +14,7 @@ import app.myzel394.alibi.helpers.BatchesFolder
|
||||
import app.myzel394.alibi.helpers.VideoBatchesFolder
|
||||
import app.myzel394.alibi.ui.components.atoms.MessageBox
|
||||
import app.myzel394.alibi.ui.components.atoms.MessageType
|
||||
import app.myzel394.alibi.ui.components.atoms.VisualDensity
|
||||
|
||||
@Composable
|
||||
fun LowStorageInfo(
|
||||
@ -37,11 +39,16 @@ fun LowStorageInfo(
|
||||
Box(
|
||||
modifier = Modifier.padding(horizontal = 16.dp, vertical = 8.dp)
|
||||
) {
|
||||
MessageBox(
|
||||
type = MessageType.WARNING,
|
||||
message = if (appSettings.saveFolder == null)
|
||||
stringResource(R.string.ui_recorder_lowOnStorage_hintANDswitchSaveFolder)
|
||||
else stringResource(R.string.ui_recorder_lowOnStorage_hint)
|
||||
)
|
||||
BoxWithConstraints {
|
||||
val isLarge = maxHeight > 600.dp;
|
||||
|
||||
MessageBox(
|
||||
type = MessageType.WARNING,
|
||||
message = if (appSettings.saveFolder == null)
|
||||
stringResource(R.string.ui_recorder_lowOnStorage_hintANDswitchSaveFolder)
|
||||
else stringResource(R.string.ui_recorder_lowOnStorage_hint),
|
||||
density = if (isLarge) VisualDensity.COMFORTABLE else VisualDensity.COMPACT
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -103,7 +103,7 @@ fun StartRecording(
|
||||
Column(
|
||||
modifier = Modifier
|
||||
.fillMaxSize()
|
||||
.padding(bottom = if (orientation == Configuration.ORIENTATION_PORTRAIT) 32.dp else 16.dp),
|
||||
.padding(bottom = if (orientation == Configuration.ORIENTATION_PORTRAIT) 0.dp else 16.dp),
|
||||
verticalArrangement = Arrangement.SpaceBetween,
|
||||
horizontalAlignment = Alignment.CenterHorizontally,
|
||||
) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user