diff --git a/Sources/Update/UpdateTitlebarAccessory.swift b/Sources/Update/UpdateTitlebarAccessory.swift index 84ac40d3aeb4..3900ab7dfa64 100644 --- a/Sources/Update/UpdateTitlebarAccessory.swift +++ b/Sources/Update/UpdateTitlebarAccessory.swift @@ -479,11 +479,27 @@ struct TitlebarControlsView: View { .background(ShortcutHintPillBackground()) } + private var iconForegroundColor: Color? { + let sidebarVisible = AppDelegate.shared?.sidebarState?.isVisible ?? false + guard !sidebarVisible else { return nil } + let bg = GhosttyApp.shared.defaultBackgroundColor + return bg.isLightColor + ? Color.black.opacity(0.55) + : Color.white.opacity(0.65) + } + @ViewBuilder private func iconLabel(systemName: String, config: TitlebarControlsStyleConfig) -> some View { - let icon = Image(systemName: systemName) + let baseIcon = Image(systemName: systemName) .font(.system(size: config.iconSize, weight: .semibold)) .frame(width: config.buttonSize, height: config.buttonSize) + let icon = Group { + if let color = iconForegroundColor { + baseIcon.foregroundColor(color) + } else { + baseIcon + } + } if config.buttonBackground { icon