fix(editor): v0.3.6.1 — left-anchor editor title, balance colour-chooser spacing
Two emergency-patch UX fixes on the New/Edit screen: 1. Title left-aligned against the back arrow. NoteEditorScreen used CenterAlignedTopAppBar, but with six actions on the right (camera, attach, tag, favourite, save, more) the visually-centred title landed right next to the action cluster. Swap for Material 3's standard TopAppBar so 'New' / 'Edit' sits flush right of the back arrow on the left. 2. Colour chooser is now equally spaced between the title bar and the top of the note. The picker Row had padding(vertical = 4.dp) (4dp above + 4dp below), but the OutlinedTextField below has an intrinsic top inset (~16dp) inside its border, so the perceived gap from the picker to the first line of the note dwarfed the gap from the title bar's bottom to the picker's top. Remove the vertical = 4.dp and bracket the Row with two explicit Spacer(Modifier.height(12.dp)) siblings so the picker sits 12dp from the title bar AND 12dp from the field's top border. versionCode 27 → 28 versionName 0.3.6.0 → 0.3.6.1 APP_VERSION 0.3.6.0 → 0.3.6.1
This commit is contained in:
1 parent
722548176c
commit
ef5a45201e
5 files changed
+31
-17
No files matched your search
@@ -17,9 +17,11 @@ import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.foundation.layout.ExperimentalLayoutApi
|
||||
import androidx.compose.foundation.layout.FlowRow
|
||||
import androidx.compose.foundation.layout.Row
|
||||
import androidx.compose.foundation.layout.Spacer
|
||||
import androidx.compose.foundation.layout.WindowInsets
|
||||
import androidx.compose.foundation.layout.fillMaxSize
|
||||
import androidx.compose.foundation.layout.fillMaxWidth
|
||||
import androidx.compose.foundation.layout.height
|
||||
import androidx.compose.foundation.layout.ime
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.foundation.layout.size
|
||||
@@ -44,7 +46,6 @@ import androidx.compose.material.icons.filled.Tag
|
||||
import androidx.compose.material.icons.outlined.StarOutline
|
||||
import androidx.compose.material3.AlertDialog
|
||||
import androidx.compose.material3.AssistChip
|
||||
import androidx.compose.material3.CenterAlignedTopAppBar
|
||||
import androidx.compose.material3.DropdownMenu
|
||||
import androidx.compose.material3.DropdownMenuItem
|
||||
import androidx.compose.material3.ExperimentalMaterial3Api
|
||||
@@ -59,6 +60,7 @@ import androidx.compose.material3.SnackbarHostState
|
||||
import androidx.compose.material3.SuggestionChip
|
||||
import androidx.compose.material3.Text
|
||||
import androidx.compose.material3.TextButton
|
||||
import androidx.compose.material3.TopAppBar
|
||||
import androidx.compose.material3.rememberModalBottomSheetState
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.LaunchedEffect
|
||||
@@ -282,7 +284,9 @@ fun NoteEditorScreen(
|
||||
contentWindowInsets = WindowInsets.systemBars.union(WindowInsets.ime),
|
||||
snackbarHost = { SnackbarHost(hostState = snackbarHost) },
|
||||
topBar = {
|
||||
CenterAlignedTopAppBar(
|
||||
// v0.3.6.1 Emergency Patch: left-anchored title sits against the back arrow
|
||||
// (CenterAlignedTopAppBar was crowded by the six right-side actions).
|
||||
TopAppBar(
|
||||
title = { Text(if (state.isEditing) "Edit" else "New") },
|
||||
navigationIcon = {
|
||||
IconButton(onClick = { tryClose() }) {
|
||||
@@ -367,10 +371,16 @@ fun NoteEditorScreen(
|
||||
.padding(padding),
|
||||
) {
|
||||
// v0.3.0.1: colour picker centred horizontally.
|
||||
// v0.3.6.1 Emergency Patch: equal 12dp Spacers above and below so
|
||||
// the picker sits symmetrically between the title bar and the
|
||||
// top edge of the note content (previously the row's
|
||||
// `vertical = 4.dp` padding was dwarfed by the OutlinedTextField's
|
||||
// intrinsic top inset, making the lower gap appear far larger).
|
||||
androidx.compose.foundation.layout.Spacer(Modifier.height(12.dp))
|
||||
Row(
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.padding(horizontal = 16.dp, vertical = 4.dp),
|
||||
.padding(horizontal = 16.dp),
|
||||
horizontalArrangement = Arrangement.spacedBy(
|
||||
space = 12.dp,
|
||||
alignment = Alignment.CenterHorizontally,
|
||||
@@ -384,6 +394,7 @@ fun NoteEditorScreen(
|
||||
)
|
||||
}
|
||||
}
|
||||
androidx.compose.foundation.layout.Spacer(Modifier.height(12.dp))
|
||||
|
||||
OutlinedTextField(
|
||||
value = state.content,
|
||||
|
||||
@@ -333,7 +333,7 @@ class SettingsViewModel(
|
||||
/** The version string baked into backup payloads and shown on
|
||||
* the About card. Mirrors `app/build.gradle.kts` `versionName`
|
||||
* — if you bump one, bump both. */
|
||||
const val APP_VERSION = "0.3.6.0"
|
||||
const val APP_VERSION = "0.3.6.1"
|
||||
|
||||
val Factory: ViewModelProvider.Factory = viewModelFactory {
|
||||
initializer {
|
||||
|
||||
Reference in new issue
Block a user