You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 8ed68d9
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: python-multiplatform-compose/fixtures/compose/src/desktopTest/kotlin/fixture/compose/ComposableRenderTest.kt
+91Lines changed: 91 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -797,6 +797,97 @@ class ComposableRenderTest {
797
797
assertTrue(0xFFFF0000.toInt() !in green, "a green scheme painted red, so the argument was not read: $green")
798
798
}
799
799
800
+
/**
801
+
* Issue #309: a colour scheme from Python without `lightColorScheme`'s 48 defaults.
802
+
*
803
+
* `lightColorScheme` / `darkColorScheme` / `ColorScheme.copy` each declare 48 defaulted
804
+
* parameters, past `ArtifactScanner.MAX_OMITTABLE_PARAMETERS` (6), so they bind with every
805
+
* parameter required (a keyword factory that fills the rest is pythonx-compose's job; defaults
806
+
* depend on each other, e.g. `surfaceTint` defaults to `primary`, so "call defaults then copy"
807
+
* was rejected). What Python can do today is call the `ColorScheme` constructor, the public
808
+
* 48-argument one (no defaults; the 36- and 29-argument ones are `@Deprecated(HIDDEN)` and
809
+
* declined), and pass the handle to `MaterialTheme(colorScheme=...)`.
810
+
*
811
+
* Rendered, not just constructed: every slot black except `primary`, so a shifted argument would
0 commit comments