optimized font settings in bookmark details

This commit is contained in:
Ilyas Hallak 2025-07-04 23:41:26 +02:00
parent 40d340daa3
commit 2c5b51ca3a
4 changed files with 26 additions and 16 deletions

View File

@ -53,4 +53,3 @@ The app includes a Share Extension that allows adding bookmarks directly from Sa
3. Commit your changes (`git commit -m 'Add amazing feature'`) 3. Commit your changes (`git commit -m 'Add amazing feature'`)
4. Push to the branch (`git push origin feature/amazing-feature`) 4. Push to the branch (`git push origin feature/amazing-feature`)
5. Open a Pull Request 5. Open a Pull Request

View File

@ -37,17 +37,32 @@ struct BookmarkDetailView: View {
} }
} }
.sheet(isPresented: $showingFontSettings) { .sheet(isPresented: $showingFontSettings) {
NavigationView { NavigationView {
FontSettingsView() VStack {
.navigationTitle("Schrift-Einstellungen") FontSettingsView()
.navigationBarTitleDisplayMode(.inline) .frame(maxWidth: .infinity)
.toolbar { .padding(.horizontal, 16)
ToolbarItem(placement: .navigationBarTrailing) { .padding(.top, 8)
Button("Fertig") {
showingFontSettings = false Spacer()
} }
.navigationTitle("Schrift-Einstellungen")
.navigationBarTitleDisplayMode(.inline)
.toolbar {
ToolbarItem(placement: .navigationBarTrailing) {
Button("Fertig") {
showingFontSettings = false
} }
} }
}
}
}
.onChange(of: showingFontSettings) { _, isShowing in
if !isShowing {
// Reload settings when sheet is dismissed
Task {
await viewModel.loadBookmarkDetail(id: bookmarkId)
}
} }
} }
.task { .task {

View File

@ -97,7 +97,7 @@ struct BookmarksView: View {
} }
// FAB Button - nur bei "Ungelesen" anzeigen // FAB Button - nur bei "Ungelesen" anzeigen
if state == .unread { if state == .unread || state == .all {
VStack { VStack {
Spacer() Spacer()
HStack { HStack {

View File

@ -11,7 +11,7 @@ struct FontSettingsView: View {
@State private var viewModel = FontSettingsViewModel() @State private var viewModel = FontSettingsViewModel()
var body: some View { var body: some View {
VStack(alignment: .leading, spacing: 0) { VStack(alignment: .leading, spacing: 24) {
// Header // Header
HStack(spacing: 8) { HStack(spacing: 8) {
Image(systemName: "textformat") Image(systemName: "textformat")
@ -23,8 +23,6 @@ struct FontSettingsView: View {
.fontWeight(.bold) .fontWeight(.bold)
} }
Spacer()
// Font Family Picker // Font Family Picker
HStack(alignment: .firstTextBaseline, spacing: 16) { HStack(alignment: .firstTextBaseline, spacing: 16) {
Text("Schriftart") Text("Schriftart")
@ -42,8 +40,6 @@ struct FontSettingsView: View {
} }
} }
Spacer()
VStack(spacing: 16) { VStack(spacing: 16) {
// Font Size Picker // Font Size Picker