Einheitliches Leuchttisch-Design auch für Einstellungen (eigene Navigation statt blauer System-Tabs), Formulare, GroupBoxen, Listen, Titelleiste und Fensterhintergrund

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012bGzgsxrmbBhDzeMV2L57D
This commit is contained in:
Lichtkasten DevandClaude Opus 5.5 committed 2026-11-04 16:10:24 +00:00
1 parent 82ab591e7a
commit 54f5742a60
8 files changed
+127 -25

No files matched your search

+56 -2
View File
@@ -133,8 +133,62 @@ struct LKFieldBackground: ViewModifier {
extension View {
func lkField() -> some View { modifier(LKFieldBackground()) }
/// Every window: dark Leuchttisch ground and amber accent.
/// Every window: dark Leuchttisch ground, warm title bar, amber accent, Leuchttisch group boxes.
func lkWindow() -> some View {
self.preferredColorScheme(.dark).tint(LK.amber).background(LK.ground)
self.preferredColorScheme(.dark)
.tint(LK.amber)
.groupBoxStyle(LKGroupBoxStyle())
.toolbarBackground(LK.bar, for: .windowToolbar)
.toolbarBackground(.visible, for: .windowToolbar)
.background(LK.ground)
.background(LKWindowStyler())
}
/// Settings-like forms without Apple's gray boxes: two columns (label | control) on the Leuchttisch
/// ground, scrollable.
func lkForm() -> some View {
ScrollView {
self.formStyle(.columns)
.scrollContentBackground(.hidden)
.padding(.horizontal, 28)
.padding(.vertical, 22)
.frame(maxWidth: .infinity, alignment: .leading)
}
.scrollContentBackground(.hidden)
.background(LK.ground)
}
}
/// GroupBox as a Leuchttisch card (instead of Apple's gray box).
struct LKGroupBoxStyle: GroupBoxStyle {
func makeBody(configuration: Configuration) -> some View {
VStack(alignment: .leading, spacing: 10) {
configuration.label
.font(.system(size: 11, weight: .bold))
.textCase(.uppercase)
.tracking(1.2)
.foregroundStyle(LK.amber)
configuration.content
}
.padding(14)
.frame(maxWidth: .infinity, alignment: .leading)
.background(RoundedRectangle(cornerRadius: 12).fill(LK.card))
.overlay(RoundedRectangle(cornerRadius: 12).stroke(LK.border))
}
}
/// Paints the NSWindow itself warm (title bar area, behind transparent views).
struct LKWindowStyler: NSViewRepresentable {
func makeNSView(context: Context) -> NSView {
let v = NSView()
DispatchQueue.main.async { apply(v.window) }
return v
}
func updateNSView(_ nsView: NSView, context: Context) { DispatchQueue.main.async { apply(nsView.window) } }
private func apply(_ w: NSWindow?) {
guard let w else { return }
w.backgroundColor = NSColor(red: 0x16 / 255, green: 0x13 / 255, blue: 0x0E / 255, alpha: 1)
w.appearance = NSAppearance(named: .darkAqua)
}
}