Issue
The .palette modifier cannot be applied to WindowGroup as demonstrated in the README.md.
Tested Environment
The test has been conducted on
- Ubuntu Server 24.04 LTS with Swift toolchain version 6.3.2
- macOS Sequoia 15.7.7 with Swift toolchain version 6.2.4.1.4
and TUIKit main branch version.
How to Reproduce
@main
struct MyApp: App {
var body: some Scene {
WindowGroup {
ContentView()
}
.palette(SystemPalette(.green)) // Classic green terminal
}
}
Observed Behaviour
Compiling the code will result in the following error:
App.swift:9:5: error: value of type 'WindowGroup<ContentView>' has no member 'palette'
7 | ContentView()
8 | }
9 | .palette(SystemPalette(.amber))
| `- error: value of type 'WindowGroup<ContentView>' has no member 'palette'
10 | }
11 | }
Expected Behaviour
Compiling the code should be successful regarding to TUIkit's own documentation.
Work-around
Moving the .palette modifier to the ContentView() results in successful compilation, and the application works visually as expected.
Issue
The
.palettemodifier cannot be applied toWindowGroupas demonstrated in the README.md.Tested Environment
The test has been conducted on
and TUIKit main branch version.
How to Reproduce
Observed Behaviour
Compiling the code will result in the following error:
Expected Behaviour
Compiling the code should be successful regarding to TUIkit's own documentation.
Work-around
Moving the
.palettemodifier to theContentView()results in successful compilation, and the application works visually as expected.