-
Notifications
You must be signed in to change notification settings - Fork 120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Release 0.21.0 #444
Merged
Release 0.21.0 #444
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#355 spotless conflict
Replace cinterops with regular kotlin code.
To support runtime The switch the files need to be copied to iosApp. which can be automated by a gradle task like below and configure it as iOS run script. val copyColorAssetsToIOSApp = tasks.register<Copy>("copyColorAssetsToIOSApp") { from("$rootDir/resources/build/generated/moko/iosMain/res/Assets.xcassets") into("$rootDir/iosApp/iosApp/Assets.xcassets/colors") } Now to get the color from the iOS app assets we need to use UIColor.colorNamed(“colorName”) function. Below extension method can be used for that fun ColorResource.getThemeColor(): UIColor { return UIColor.colorNamed(this.name)!! }
name added in ColorResource.kt to support runtime theme switch in iOS
Always use forward slash for JVM resources
Platform colors, updated kotlin (to use experimental Compose), extracted samples
Initial support of region fully qualified Locale languages
You have successfully added a new SonarCloud configuration ``. As part of the setup process, we have scanned this repository and found no existing alerts. In the future, you will see all code scanning alerts on the repository Security tab. |
Alex009
commented
Mar 25, 2023
resources-compose/src/macosMain/kotlin/dev/icerock/moko/resources/compose/ColorResource.kt
Outdated
Show resolved
Hide resolved
resources/src/commonMain/kotlin/dev/icerock/moko/resources/desc/color/ColorDesc.kt
Show resolved
Hide resolved
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes
Improvements
resources-compose
- Android, iOS, macOS, JVM, Webresources-compose
ColorResource
now backed by platform implementations with full support of dark/light themepainterResource
inresources-compose
fontFamilyResource
inresources-compose
Fixes
AssetResource
on JVM for WindowsBreaking changes
ColorResource
api was changed. Old behavior with platform-independent logic now supported byColorDesc
.ColorResource
now works as other resources - by platform rules.Thanks
@kevincianfarini , @jittya , @zacharee , @Cilestal , @InsanusMokrassar , @wakaztahir , @PaulWoitaschek