From e4126212439189627c3326f9d049f2b1e3256ed4 Mon Sep 17 00:00:00 2001 From: Sarah Wolff Date: Tue, 14 Jul 2026 11:22:53 -0400 Subject: [PATCH] fix(ui): improve profile menu contrast --- Piperly/App/ContentView.swift | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/Piperly/App/ContentView.swift b/Piperly/App/ContentView.swift index b3789af..2ee5ae4 100644 --- a/Piperly/App/ContentView.swift +++ b/Piperly/App/ContentView.swift @@ -52,16 +52,29 @@ struct ContentView: View { Spacer() - Picker("Reader Profile", selection: activeProfileSelection) { + Menu { ForEach(bookStore.profiles) { profile in - Label(profile.name, systemImage: profile.avatarSymbol) - .tag(profile.id) + Button { + bookStore.selectProfile(profile.id) + } label: { + Label( + profile.name, + systemImage: profile.id == bookStore.activeProfile.id ? "checkmark" : profile.avatarSymbol + ) + } + } + } label: { + HStack(spacing: 6) { + Label(bookStore.activeProfile.name, systemImage: bookStore.activeProfile.avatarSymbol) + Image(systemName: "chevron.up.chevron.down") + .font(.caption) } } - .pickerStyle(.menu) + .foregroundStyle(Piperly.Colors.accent) .buttonStyle(.bordered) .tint(Piperly.Colors.accent) .accessibilityLabel("Reader Profile") + .accessibilityValue(bookStore.activeProfile.name) HStack(spacing: 12) { Button { @@ -108,11 +121,4 @@ struct ContentView: View { } } } - - private var activeProfileSelection: Binding { - Binding( - get: { bookStore.activeProfile.id }, - set: { bookStore.selectProfile($0) } - ) - } }