Standardize native-theme build hints; fix simulator menu bugs#4855
Merged
shai-almog merged 1 commit intomasterfrom May 3, 2026
Merged
Standardize native-theme build hints; fix simulator menu bugs#4855shai-almog merged 1 commit intomasterfrom
shai-almog merged 1 commit intomasterfrom
Conversation
Build hints rename: nativeTheme (global), ios.themeMode and and.themeMode (platform-specific). The old keys cn1.nativeTheme and cn1.androidTheme stay accepted as deprecated aliases on every runtime, builder (maven plugin + BuildDaemon), and the simulator's schema editor. Simulator fixes: - Native Theme menu reload now uses frm.dispose() + deinitializeSync() (matching the working skin selector) instead of the unreliable window field, so selecting a theme actually triggers a reload. - "Auto" in the Native Theme menu defers to the project's build hints (ios.themeMode / and.themeMode / nativeTheme), so a project that set ios.themeMode=modern previews iOS Modern instead of being hard-coded to one default. - Restored the "Rotate" menu item for non-single-window mode. It was removed wholesale when the toolbar Portrait/Landscape buttons landed; now gated behind appFrame == null like the sibling Zoom item so single-window users still see only the toolbar buttons. Defaults: - initializr / Playground codenameone_settings.properties (and the bundled common.zip template) ship the renamed keys: nativeTheme, ios.themeMode, and.themeMode all set to modern. - PlaygroundProjectExporter now writes the same defaults into generated project zips downloaded from cn1playground. Playground samples: - Removed trailing form;/root; lines from the bundled samples - the runner already falls back to the first created Form/Component. The exporter also strips form; / root; lines defensively when generating Lifecycle source from a snippet. Docs: - Native-Themes.asciidoc, Advanced-Topics-Under-The-Hood.asciidoc, and the liquid-glass blog post all describe the new naming with the deprecated aliases noted. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
|
Developer Guide build artifacts are available for download from this workflow run:
Developer Guide quality checks: |
Collaborator
Author
|
Compared 7 screenshots: 7 matched. |
Contributor
Cloudflare Preview
|
Contributor
✅ Continuous Quality ReportTest & Coverage
Static Analysis
Generated automatically by the PR CI workflow. |
Collaborator
Author
|
Compared 86 screenshots: 86 matched. Native Android coverage
✅ Native Android screenshot tests passed. Native Android coverage
Benchmark ResultsDetailed Performance Metrics
|
Collaborator
Author
|
Compared 86 screenshots: 86 matched. Benchmark Results
Build and Run Timing
Detailed Performance Metrics
|
Contributor
✅ ByteCodeTranslator Quality ReportTest & Coverage
Benchmark Results
Static Analysis
Generated automatically by the PR CI workflow. |
This file contains hidden or 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
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.
Summary
nativeTheme(global),ios.themeMode/and.themeMode(platform-specific). The previouscn1.nativeTheme/cn1.androidThemekeys stay accepted everywhere as deprecated aliases - simulator schema, runtime ports (Android, HTML5, iOS), Maven plugin, and the BuildDaemon's IPhoneBuilder / AndroidGradleBuilder.window.dispose()(unreliable field) instead of thefrm.dispose()+deinitializeSync()pattern the skin selector already uses - selecting a theme had no effect. Fixed.ios.themeMode/and.themeMode/nativeThemeincodenameone_settings.properties(with the deprecated aliases as fallback). A project withios.themeMode=modernpreviews iOS Modern; flipping the same project toios.themeMode=ios7previews iOS 7. Without the fix, "Auto" hard-coded the modern theme.appFrame == nullbut Rotate was just deleted, leaving non-single-window users with no way to rotate. Now gated the same way.common.ziptemplate, the sourcecodenameone_settings.propertiesfiles, andPlaygroundProjectExporter.codenameOneSettings()all emitnativeTheme=modern+ios.themeMode=modern+and.themeMode=modern.form;/root;line - removed from the 11 bundled samples; the runner's existing first-created-Form / first-created-Component fallback covers the implicit return. The exporter also stripsform;/root;defensively when synthesizing Lifecycle source.docs/developer-guide/Native-Themes.asciidoc,docs/developer-guide/Advanced-Topics-Under-The-Hood.asciidoc, and theliquid-glass-material-3-modern-native-themesblog post describe the new naming with the deprecated aliases noted.Test plan
codenameone_settings.properties(no theme hints) — Auto previews iOS Modern.ios.themeMode=ios7incodenameone_settings.properties— Auto now previews iOS 7 after reload.common/codenameone_settings.propertiescontainsnativeTheme=modern/ios.themeMode=modern/and.themeMode=modern.codenameone_settings.properties.form;/root;line.cn1.androidTheme=material(legacy alias) — Android runtime still loadsAndroidMaterialTheme.res.nativeTheme=modernonly (no platform-specific hints) — iOS builder picksmodern, Android runtime picksmaterial.🤖 Generated with Claude Code