Skip to content

Commit 61768f8

Browse files
shai-almogclaude
andcommitted
Revert StatusBar theme change (restore device status-bar space); JS skips it; dev-guide cleanup
Theme / status bar (the real regression): a JS-port PR (795fe03) added a StatusBar UIID with `padding: 0` to the shared iOS-modern and android-material native themes to stop an undefined-UIID black strip on the web. On iOS (paintsTitleBarBool=true) that zeroed the reserved status-bar/safe-area space at the top of every modern-theme Form, so the regenerated iOS theme goldens lost the status strip. Revert the StatusBar UIID from both native themes and regenerate the committed .res (now byte-identical to the pre-795fe0375 .res), so real devices reserve the status-bar space again. The web has no OS status bar, so the JS port now explicitly disables it (`@paintsTitleBarBool=false` in installNativeTheme) instead of zeroing StatusBar.padding -- no black strip, no reserved space on the web. Restore the 64 iOS theme goldens (GL + Metal) to the with-status-bar baseline. Android (paintsTitleBarBool=false), Mac Catalyst and Windows (desktop, no status bar) and the JS port are unaffected. Developer guide: - Remove the redundant "3D Graphics" section from Index.asciidoc now that there is a dedicated 3D-Graphics chapter (Index reverts to the master content). - Promote the render-thread caveat to a prominent IMPORTANT admonition at the top of the 3D chapter: Renderer callbacks run on the native render thread, not the EDT. - Crop the four 3D demo screenshots to the rendered content (drop the redundant in-image title bar and the dead margins that made them render as thin tall strips at scaledwidth=40%). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 2cd01f4 commit 61768f8

75 files changed

Lines changed: 22 additions & 218 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Ports/JavaScriptPort/src/main/java/com/codename1/impl/html5/HTML5Implementation.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2984,7 +2984,13 @@ public void installNativeTheme(){
29842984
}
29852985
Hashtable tp = r.getTheme(r.getThemeResourceNames()[0]);
29862986

2987-
tp.put("StatusBar.padding", "0,0,0,0");
2987+
// The browser has no OS status bar / notch, so the app must not
2988+
// reserve a status-bar strip at the top of the Form the way iOS
2989+
// does. The iOS-modern theme sets paintsTitleBarBool=true to
2990+
// reserve that safe-area space on real devices; force it off on the
2991+
// JS port so the web layout starts flush at the top (otherwise the
2992+
// undefined StatusBar UIID would also paint an opaque strip there).
2993+
tp.put("@paintsTitleBarBool", "false");
29882994

29892995
UIManager.getInstance().setThemeProps(tp);
29902996
return;

Themes/AndroidMaterialTheme.res

-1.2 KB
Binary file not shown.

Themes/iOSModernTheme.res

-1.2 KB
Binary file not shown.

docs/developer-guide/3D-Graphics.asciidoc

Lines changed: 15 additions & 0 deletions

docs/developer-guide/Index.asciidoc

Lines changed: 0 additions & 202 deletions
-20.7 KB
-11.3 KB
-30.7 KB
-14.9 KB

native-themes/android-material/theme.css

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -330,12 +330,6 @@ Title {
330330
}
331331
MainTitle { cn1-derive: Title; }
332332

333-
/* paintsTitleBarBool=true makes Form add a StatusBar component at the top
334-
of the title area. An undefined UIID resolves to the framework default
335-
Style (opaque black), so without this rule the status strip paints solid
336-
black above the title. Match the Toolbar surface. */
337-
StatusBar { background-color: #fef7ff; color: #1d1b20; padding: 0; margin: 0; }
338-
339333
BackCommand { cn1-derive: Button; background-color: transparent; color: var(--accent-color, #6750a4); padding: 1mm 2mm 1mm 2mm; }
340334
TitleCommand { cn1-derive: Button; background-color: transparent; color: var(--accent-color, #6750a4); padding: 1mm 2mm 1mm 2mm; }
341335

@@ -608,7 +602,6 @@ PopupContent {
608602
TitleArea { background-color: #141218; color: #e6e0e9; }
609603
Title { color: #e6e0e9; background-color: #141218; }
610604
MainTitle { color: #e6e0e9; background-color: #141218; }
611-
StatusBar { background-color: #141218; color: #e6e0e9; }
612605
BackCommand { color: var(--accent-color-dark, #d0bcff); background-color: transparent; }
613606
TitleCommand { color: var(--accent-color-dark, #d0bcff); background-color: transparent; }
614607

0 commit comments

Comments
 (0)