From f1d739f309200d794f32fb84e82ef56c1b473169 Mon Sep 17 00:00:00 2001 From: Rune Olsen Date: Fri, 21 Aug 2026 15:22:11 +0200 Subject: [PATCH] =?UTF-8?q?Drop=20color=20tints=20from=20glass=20effects?= =?UTF-8?q?=20=E2=80=94=20rendering=20as=20solid=20blocks,=20not=20glass?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Rune caught this live too: content is now visible (last commit fixed that), but the tinted glass (.regular.tint(.blue) etc.) rendered as a solid, opaque, saturated color block instead of translucent frosted glass — looked like a plain filled button, not Liquid Glass. Dropped .tint() from all four Phase 1 conversions (tabButton, mcpSidebarRow, and ModelSelectorView's filter/category/favorites/sort chips) — the selection/active signal already comes from the icon/text foreground color turning blue (or yellow, or the category color), which was untouched by any of this. The glass itself is now always .regular with no tint. tabButton's unselected state also switched from .buttonStyle(.glass) to .buttonStyle(.plain) — restores the original "only the selected tab shows any background" look, since with the tint gone a plain .glass button style for every tab would visually flatten the selected/unselected distinction back down to icon color alone. --- oAI/Views/Screens/ModelSelectorView.swift | 11 ++++------- oAI/Views/Screens/SettingsView.swift | 12 ++++++++---- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/oAI/Views/Screens/ModelSelectorView.swift b/oAI/Views/Screens/ModelSelectorView.swift index c4d51e3..34ac660 100644 --- a/oAI/Views/Screens/ModelSelectorView.swift +++ b/oAI/Views/Screens/ModelSelectorView.swift @@ -121,10 +121,7 @@ struct ModelSelectorView: View { .font(.caption) .padding(.horizontal, 10) .padding(.vertical, 6) - .glassEffect( - selectedCategory != nil ? .regular.tint(selectedCategory!.color) : .regular, - in: .rect(cornerRadius: 6) - ) + .glassEffect(.regular, in: .rect(cornerRadius: 6)) .foregroundColor(selectedCategory != nil ? selectedCategory!.color : .secondary) } .buttonStyle(.plain) @@ -144,7 +141,7 @@ struct ModelSelectorView: View { .font(.caption) .padding(.horizontal, 10) .padding(.vertical, 6) - .glassEffect(filterFavorites ? .regular.tint(.yellow) : .regular, in: .rect(cornerRadius: 6)) + .glassEffect(.regular, in: .rect(cornerRadius: 6)) .foregroundColor(filterFavorites ? .yellow : .secondary) } .buttonStyle(.plain) @@ -172,7 +169,7 @@ struct ModelSelectorView: View { .font(.caption) .padding(.horizontal, 10) .padding(.vertical, 6) - .glassEffect(sortOrder != .default ? .regular.tint(.blue) : .regular, in: .rect(cornerRadius: 6)) + .glassEffect(.regular, in: .rect(cornerRadius: 6)) .foregroundColor(sortOrder != .default ? .blue : .secondary) } .menuStyle(.borderlessButton) @@ -297,7 +294,7 @@ struct FilterToggle: View { .font(.caption) .padding(.horizontal, 10) .padding(.vertical, 6) - .glassEffect(isOn ? .regular.tint(.blue) : .regular, in: .rect(cornerRadius: 6)) + .glassEffect(.regular, in: .rect(cornerRadius: 6)) .foregroundColor(isOn ? .blue : .secondary) } .buttonStyle(.plain) diff --git a/oAI/Views/Screens/SettingsView.swift b/oAI/Views/Screens/SettingsView.swift index 6266425..7f7c181 100644 --- a/oAI/Views/Screens/SettingsView.swift +++ b/oAI/Views/Screens/SettingsView.swift @@ -639,7 +639,9 @@ It's better to admit "I need more information" or "I cannot do that" than to fak Button(action: { selectedMCPSubsection = section }) { Group { if selectedMCPSubsection == section { - mcpSidebarRowLabel(section).glassEffect(.regular.tint(.blue), in: .rect(cornerRadius: 8)) + // Untinted — see tabButton's comment on why a colored tint here renders + // as a near-opaque block instead of translucent glass. + mcpSidebarRowLabel(section).glassEffect(.regular, in: .rect(cornerRadius: 8)) } else { mcpSidebarRowLabel(section) } @@ -3322,16 +3324,18 @@ It's better to admit "I need more information" or "I cannot do that" than to fak let selected = selectedTab == tag Group { if selected { + // Untinted glass — the blue comes from the icon/text foreground color below, + // not the glass itself. A colored tint here renders as a near-opaque solid + // block rather than translucent glass (found live, see CLAUDE.md's gotcha). Button(action: { selectedTab = tag }) { tabButtonLabel(icon: icon, label: label, beta: beta, selected: true) } - .buttonStyle(.glassProminent) - .tint(.blue) + .buttonStyle(.glass) } else { Button(action: { selectedTab = tag }) { tabButtonLabel(icon: icon, label: label, beta: beta, selected: false) } - .buttonStyle(.glass) + .buttonStyle(.plain) } } .buttonBorderShape(.roundedRectangle(radius: 8))