mirror of
https://github.com/Myzel394/Alibi.git
synced 2025-06-18 23:05:26 +02:00
fix: Fix modal bottom sheet
This commit is contained in:
parent
9bc6908bb9
commit
eeaeef07a8
@ -101,7 +101,7 @@ dependencies {
|
||||
implementation 'androidx.compose.ui:ui'
|
||||
implementation 'androidx.compose.ui:ui-graphics'
|
||||
implementation 'androidx.compose.ui:ui-tooling-preview'
|
||||
implementation 'androidx.compose.material3:material3'
|
||||
implementation 'androidx.compose.material3:material3:1.1.2'
|
||||
implementation "androidx.compose.material:material-icons-extended:1.5.4"
|
||||
implementation 'androidx.appcompat:appcompat:1.6.1'
|
||||
implementation 'androidx.documentfile:documentfile:1.0.1'
|
||||
|
@ -5,7 +5,7 @@ import androidx.compose.ui.unit.dp
|
||||
|
||||
val BIG_PRIMARY_BUTTON_SIZE = 64.dp
|
||||
|
||||
val SHEET_BOTTOM_OFFSET = 56.dp
|
||||
val SHEET_BOTTOM_OFFSET = 24.dp
|
||||
val MAX_AMPLITUDE = 20000
|
||||
val SUPPORTS_DARK_MODE_NATIVELY = Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q
|
||||
|
||||
|
@ -112,6 +112,7 @@ fun Navigation(
|
||||
SettingsScreen(
|
||||
navController = navController,
|
||||
audioRecorder = audioRecorder,
|
||||
videoRecorder = videoRecorder,
|
||||
)
|
||||
}
|
||||
composable(
|
||||
|
@ -48,13 +48,14 @@ fun QuickMaxDurationSelector(
|
||||
) {
|
||||
Column(
|
||||
horizontalAlignment = Alignment.CenterHorizontally,
|
||||
modifier = Modifier.fillMaxWidth()
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.padding(bottom = SHEET_BOTTOM_OFFSET)
|
||||
) {
|
||||
Box(
|
||||
modifier = Modifier
|
||||
.widthIn(max = 400.dp)
|
||||
.padding(horizontal = 16.dp)
|
||||
.padding(bottom = SHEET_BOTTOM_OFFSET),
|
||||
.padding(horizontal = 16.dp, vertical = 24.dp),
|
||||
) {
|
||||
Text(
|
||||
stringResource(R.string.ui_recorder_action_changeMaxDuration_title),
|
||||
@ -88,8 +89,6 @@ fun QuickMaxDurationSelector(
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Spacer(modifier = Modifier.height(32.dp))
|
||||
}
|
||||
}
|
||||
}
|
@ -111,7 +111,7 @@ fun VideoRecorderPreparationSheet(
|
||||
.fillMaxSize(),
|
||||
cameraSelector = videoSettings.cameraSelector,
|
||||
)
|
||||
} else
|
||||
} else {
|
||||
Column(
|
||||
modifier = Modifier
|
||||
.padding(horizontal = 16.dp)
|
||||
@ -218,6 +218,7 @@ fun VideoRecorderPreparationSheet(
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -60,6 +60,7 @@ import app.myzel394.alibi.ui.components.atoms.MessageBox
|
||||
import app.myzel394.alibi.ui.components.atoms.MessageType
|
||||
import app.myzel394.alibi.ui.effects.rememberSettings
|
||||
import app.myzel394.alibi.ui.models.AudioRecorderModel
|
||||
import app.myzel394.alibi.ui.models.VideoRecorderModel
|
||||
import kotlinx.coroutines.launch
|
||||
|
||||
@OptIn(ExperimentalMaterial3Api::class)
|
||||
@ -67,6 +68,7 @@ import kotlinx.coroutines.launch
|
||||
fun SettingsScreen(
|
||||
navController: NavController,
|
||||
audioRecorder: AudioRecorderModel,
|
||||
videoRecorder: VideoRecorderModel,
|
||||
) {
|
||||
val snackbarHostState = remember { SnackbarHostState() }
|
||||
val scrollBehavior = TopAppBarDefaults.exitUntilCollapsedScrollBehavior(
|
||||
@ -120,7 +122,7 @@ fun SettingsScreen(
|
||||
val settings = rememberSettings()
|
||||
|
||||
// Show alert
|
||||
if (audioRecorder.isInRecording)
|
||||
if (audioRecorder.isInRecording || videoRecorder.isInRecording) {
|
||||
Box(
|
||||
modifier = Modifier
|
||||
.padding(16.dp)
|
||||
@ -131,6 +133,7 @@ fun SettingsScreen(
|
||||
message = stringResource(R.string.ui_settings_hint_recordingActive_message),
|
||||
)
|
||||
}
|
||||
}
|
||||
if (!SUPPORTS_DARK_MODE_NATIVELY) {
|
||||
ThemeSelector()
|
||||
}
|
||||
@ -140,6 +143,10 @@ fun SettingsScreen(
|
||||
DeleteRecordingsImmediatelyTile(settings = settings)
|
||||
CustomNotificationTile(navController = navController, settings = settings)
|
||||
EnableAppLockTile(settings = settings)
|
||||
SaveFolderTile(
|
||||
settings = settings,
|
||||
snackbarHostState = snackbarHostState,
|
||||
)
|
||||
GlobalSwitch(
|
||||
label = stringResource(R.string.ui_settings_advancedSettings_label),
|
||||
checked = settings.showAdvancedSettings,
|
||||
@ -157,11 +164,6 @@ fun SettingsScreen(
|
||||
verticalArrangement = Arrangement.spacedBy(32.dp),
|
||||
) {
|
||||
Column {
|
||||
SaveFolderTile(
|
||||
settings = settings,
|
||||
snackbarHostState = snackbarHostState,
|
||||
)
|
||||
|
||||
DividerTitle(
|
||||
title = stringResource(R.string.ui_settings_sections_audio_title),
|
||||
description = stringResource(R.string.ui_settings_sections_audio_description),
|
||||
|
Loading…
x
Reference in New Issue
Block a user