From a808864a56a86d58be43f1645e3eb7ffbefa0a8c Mon Sep 17 00:00:00 2001 From: StevenACZ <51928039+StevenACZ@users.noreply.github.com> Date: Fri, 18 Sep 2026 21:23:54 -0500 Subject: [PATCH 1/2] fix(settings): taller window, visible off switches, readable disabled buttons, grid lines and footnotes --- Sources/EncajeApp/EncajeApp.swift | 2 +- Sources/EncajeApp/SettingsView.swift | 2 +- Sources/EncajeApp/UI/PreferencesView.swift | 10 +++---- .../UI/SettingSwitchToggleStyle.swift | 26 +++++++++++++++++++ .../EncajeApp/UI/WorkspaceSettingsView.swift | 6 ++--- Sources/EncajeApp/UI/ZoneGridView.swift | 11 ++++---- Sources/EncajeApp/UI/ZoneSettingsView.swift | 2 +- 7 files changed, 43 insertions(+), 16 deletions(-) create mode 100644 Sources/EncajeApp/UI/SettingSwitchToggleStyle.swift diff --git a/Sources/EncajeApp/EncajeApp.swift b/Sources/EncajeApp/EncajeApp.swift index 0aeb2f6..aa1e766 100644 --- a/Sources/EncajeApp/EncajeApp.swift +++ b/Sources/EncajeApp/EncajeApp.swift @@ -221,7 +221,7 @@ final class AppDelegate: NSObject, NSApplicationDelegate, NSWindowDelegate, NSMe showWelcome: { [weak self] in self?.showWelcome() }) settingsWindow = makeWindow( title: localized("Encaje Settings", "Ajustes de Encaje"), - size: NSSize(width: 880, height: 660), + size: NSSize(width: 880, height: 690), view: view) settingsWindow?.identifier = NSUserInterfaceItemIdentifier("encaje.settings") } diff --git a/Sources/EncajeApp/SettingsView.swift b/Sources/EncajeApp/SettingsView.swift index 8829ff5..f4eef61 100644 --- a/Sources/EncajeApp/SettingsView.swift +++ b/Sources/EncajeApp/SettingsView.swift @@ -43,7 +43,7 @@ struct SettingsView: View { }.padding(12).background(.quaternary.opacity(0.5)) } } - }.frame(width: 880, height: 660).ignoresSafeArea(.container, edges: .top).tint(.teal) + }.frame(width: 880, height: 690).ignoresSafeArea(.container, edges: .top).tint(.teal) } private var sidebar: some View { diff --git a/Sources/EncajeApp/UI/PreferencesView.swift b/Sources/EncajeApp/UI/PreferencesView.swift index 111cad7..d71c8a4 100644 --- a/Sources/EncajeApp/UI/PreferencesView.swift +++ b/Sources/EncajeApp/UI/PreferencesView.swift @@ -18,7 +18,7 @@ struct PreferencesView: View { var body: some View { ScrollView { - VStack(alignment: .leading, spacing: 18) { + VStack(alignment: .leading, spacing: 14) { GroupBox { HStack(spacing: 12) { Image(systemName: permissions.granted ? "checkmark.shield.fill" : "hand.raised.fill") @@ -64,7 +64,7 @@ struct PreferencesView: View { localized("Launch at login", "Abrir al iniciar sesión"), isOn: Binding(get: { model.loginEnabled }, set: { model.setLogin($0) }) ) - .labelsHidden().toggleStyle(.switch) + .labelsHidden().toggleStyle(.settingSwitch) }.frame(maxWidth: .infinity) if model.loginApprovalNeeded { Button(localized("Approve in Login Items…", "Aprobar en Ítems de inicio…")) { @@ -76,7 +76,7 @@ struct PreferencesView: View { Label(localized("Pause shortcuts", "Pausar atajos"), systemImage: "pause.circle") Spacer() Toggle(localized("Pause shortcuts", "Pausar atajos"), isOn: $model.paused) - .labelsHidden().toggleStyle(.switch) + .labelsHidden().toggleStyle(.settingSwitch) }.frame(maxWidth: .infinity) Divider() HStack { @@ -126,8 +126,8 @@ struct PreferencesView: View { "Your window settings stay on your Mac.", "La configuración de tus ventanas se queda en tu Mac.") ) - .font(.caption).foregroundStyle(.tertiary) - }.padding(22) + .font(.caption).foregroundStyle(.secondary) + }.padding(.horizontal, 22).padding(.vertical, 14) } } } diff --git a/Sources/EncajeApp/UI/SettingSwitchToggleStyle.swift b/Sources/EncajeApp/UI/SettingSwitchToggleStyle.swift new file mode 100644 index 0000000..83c5ddd --- /dev/null +++ b/Sources/EncajeApp/UI/SettingSwitchToggleStyle.swift @@ -0,0 +1,26 @@ +import SwiftUI + +struct SettingSwitchToggleStyle: ToggleStyle { + func makeBody(configuration: Configuration) -> some View { + OutlinedSwitch(configuration: configuration) + } + + private struct OutlinedSwitch: View { + @Environment(\.colorScheme) private var colorScheme + let configuration: Configuration + + var body: some View { + Toggle(configuration).toggleStyle(.switch) + .overlay( + Capsule().strokeBorder(Color.primary.opacity(outlineOpacity), lineWidth: 1) + .opacity(configuration.isOn ? 0 : 1) + .allowsHitTesting(false)) + } + + private var outlineOpacity: Double { colorScheme == .dark ? 0.22 : 0.45 } + } +} + +extension ToggleStyle where Self == SettingSwitchToggleStyle { + static var settingSwitch: SettingSwitchToggleStyle { SettingSwitchToggleStyle() } +} diff --git a/Sources/EncajeApp/UI/WorkspaceSettingsView.swift b/Sources/EncajeApp/UI/WorkspaceSettingsView.swift index dbe3c50..1a8ff46 100644 --- a/Sources/EncajeApp/UI/WorkspaceSettingsView.swift +++ b/Sources/EncajeApp/UI/WorkspaceSettingsView.swift @@ -30,7 +30,7 @@ struct WorkspaceSettingsView: View { Button(action: save) { Label(localized("Save current", "Guardar actual"), systemImage: "plus") } - .disabled(!canSave) + .disabled(!canSave).tint(canSave ? Color.teal : nil) } HStack { Text(localized("SAVED WORKSPACES", "ESPACIOS GUARDADOS")) @@ -63,8 +63,8 @@ struct WorkspaceSettingsView: View { .font(.caption).foregroundStyle(.secondary) } Spacer() - Button(localized("Restore", "Restaurar")) { model.restoreLayout(layout) }.disabled( - !granted) + Button(localized("Restore", "Restaurar")) { model.restoreLayout(layout) } + .disabled(!granted).tint(granted ? Color.teal : nil) Button(role: .destructive) { model.layouts.removeAll { $0.id == layout.id } } label: { diff --git a/Sources/EncajeApp/UI/ZoneGridView.swift b/Sources/EncajeApp/UI/ZoneGridView.swift index c313fc6..7491069 100644 --- a/Sources/EncajeApp/UI/ZoneGridView.swift +++ b/Sources/EncajeApp/UI/ZoneGridView.swift @@ -13,6 +13,7 @@ struct ZoneGridView: View { @Binding var zone: GridZone var references: [ZoneReference] = [] var editingChanged: (Bool) -> Void = { _ in } + @Environment(\.colorScheme) private var colorScheme @State private var dragging = false @GestureState private var gestureActive = false @@ -25,10 +26,6 @@ struct ZoneGridView: View { ForEach(references) { reference in ZoneReferenceShape(reference: reference, size: proxy.size) } - Rectangle().fill(.teal.opacity(0.26)) - .frame(width: cellWidth * Double(zone.width), height: cellHeight * Double(zone.height)) - .overlay(Rectangle().strokeBorder(.teal, lineWidth: 2)) - .offset(x: cellWidth * Double(zone.x), y: cellHeight * Double(zone.y)) Path { path in for column in 0...zone.columns { let x = Double(column) * cellWidth @@ -40,7 +37,11 @@ struct ZoneGridView: View { path.move(to: CGPoint(x: 0, y: y)) path.addLine(to: CGPoint(x: proxy.size.width, y: y)) } - }.stroke(.primary.opacity(0.12), lineWidth: 0.5) + }.stroke(.primary.opacity(colorScheme == .dark ? 0.12 : 0.22), lineWidth: 1) + Rectangle().fill(.teal.opacity(0.26)) + .frame(width: cellWidth * Double(zone.width), height: cellHeight * Double(zone.height)) + .overlay(Rectangle().strokeBorder(.teal, lineWidth: 2)) + .offset(x: cellWidth * Double(zone.x), y: cellHeight * Double(zone.y)) Text("\(zone.width) × \(zone.height)") .font(.system(size: 13, weight: .semibold, design: .rounded)).monospacedDigit() .padding(6).background(.regularMaterial, in: RoundedRectangle(cornerRadius: 5)) diff --git a/Sources/EncajeApp/UI/ZoneSettingsView.swift b/Sources/EncajeApp/UI/ZoneSettingsView.swift index 20fd1a8..e12323d 100644 --- a/Sources/EncajeApp/UI/ZoneSettingsView.swift +++ b/Sources/EncajeApp/UI/ZoneSettingsView.swift @@ -267,7 +267,7 @@ private struct ZoneRuleEditor: View { "Los atajos reemplazan esas teclas en otras apps. Puedes pausar Encaje cuando quieras." ) ) - .font(.system(size: 10)).foregroundStyle(.tertiary) + .font(.system(size: 10)).foregroundStyle(.secondary) }.padding(18) }.frame(maxWidth: .infinity, maxHeight: .infinity) } From 469463b974a448284d4b5d618800561fc65dd97d Mon Sep 17 00:00:00 2001 From: StevenACZ <51928039+StevenACZ@users.noreply.github.com> Date: Fri, 18 Sep 2026 21:23:54 -0500 Subject: [PATCH 2/2] chore(release): 1.1.3 --- Assets/Info.plist | 4 ++-- CHANGELOG.md | 9 +++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/Assets/Info.plist b/Assets/Info.plist index b785329..972958c 100644 --- a/Assets/Info.plist +++ b/Assets/Info.plist @@ -22,9 +22,9 @@ CFBundlePackageType APPL CFBundleShortVersionString - 1.1.2 + 1.1.3 CFBundleVersion - 15 + 16 LSMinimumSystemVersion 14.0 LSUIElement diff --git a/CHANGELOG.md b/CHANGELOG.md index b5f2b42..563b8b4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,15 @@ All notable changes to this project are documented here. ## [Unreleased] +## [1.1.3] - 2026-09-18 + +### Fixed + +- The settings window is a little taller and Preferences is more compact, so the Updates card is no longer cut off at the bottom. +- The disabled "Save current" and "Restore" buttons in Workspaces stay readable in Light appearance. +- Switches that are off are clearly visible on the settings cards in Light appearance. +- The zone grid lines and the small footnotes in Zones and Preferences are easier to read in both appearances. + ## [1.1.2] - 2026-09-18 ### Fixed