Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
70329ab
Extract CSS compiler into thin maven/css-compiler module
shai-almog Apr 22, 2026
aae4ed0
Add codenameone-css-compiler to root dependencyManagement
shai-almog Apr 22, 2026
380dc6f
Move css-compiler peer helpers + UIBuilderOverride hook
shai-almog Apr 22, 2026
a724477
Fix remaining designer refs in EditableResources/ResourcesMutator
shai-almog Apr 22, 2026
06e5e6e
Stop tracking .claude/ runtime files
shai-almog Apr 22, 2026
c1f1029
Keep loadedResources typed as EditableResources; cast on getResourceE…
shai-almog Apr 22, 2026
e794a4d
Fix designer fat-jar unwrap in CI and build-native-themes stdout leak
shai-almog Apr 22, 2026
94fdc7c
Un-swallow CSSTheme.load NPEs, add null guard in NoCefCSSCLI
shai-almog Apr 22, 2026
fd81841
Util.copy: fall back to direct stream close when no CN1 impl is set
shai-almog Apr 22, 2026
4ef69fc
Fix state-selector syntax in smoke native-themes CSS
shai-almog Apr 22, 2026
b5faf61
Drop font-family from smoke CSS until headless Font creation is sorted
shai-almog Apr 22, 2026
5fd6b47
Flesh out real iOS Modern + Android Material native themes
shai-almog Apr 22, 2026
281d048
Use cn1-background-type syntax for native rounded/pill borders
shai-almog Apr 22, 2026
f897214
Inline hex colors in themes; drop :root (mangles under dark-mode rewr…
shai-almog Apr 22, 2026
0aac6ba
Headless guards: EditorTTFFont + Display.convertToPixels
shai-almog Apr 22, 2026
3f66257
Font.getFace/Size/Style: headless fallback to stored descriptor
shai-almog Apr 22, 2026
9b79a97
Replace SVGDocument interface with internal reflective bridge
shai-almog Apr 22, 2026
749b66c
Phase 4: wire iOS + Android ports to new modern native themes
shai-almog Apr 22, 2026
ef02590
Use /// markdown doc for headless Font fields (core validator)
shai-almog Apr 22, 2026
9f4cd99
Util.copy headless close: route through closeQuietly with stderr log
shai-almog Apr 22, 2026
c5b5d97
Phase 5: simulator bundles all themes + Native Theme override menu
shai-almog Apr 22, 2026
ec4faf5
Util.closeQuietly: overload for InputStream and OutputStream
shai-almog Apr 22, 2026
794a75c
Phase 6: build-hint schema defaults + docs
shai-almog Apr 22, 2026
4c59591
Phase 7: theme-fidelity screenshot tests (first batch)
shai-almog Apr 22, 2026
f4f617b
Fix DualAppearanceBaseTest: drop package-private UIManager.getThemeProps
shai-almog Apr 22, 2026
19b9ea6
Wire JavaScript port to CSS-driven native themes
shai-almog Apr 22, 2026
a5042b9
Util.closeQuietly: add braces to satisfy PMD ControlStatementBraces
shai-almog Apr 22, 2026
776fbbd
Dark-mode screenshot fix + strengthen iOS disabled + expand test suite
shai-almog Apr 23, 2026
d2c0b13
Fix SpanLabel / Picker imports in new theme-screenshot tests
shai-almog Apr 23, 2026
2262e24
UIManager.refreshTheme() + drop test-side reflection
shai-almog Apr 23, 2026
23708da
Skip theme tests in HTML5 port (tight browser-lifetime budget)
shai-almog Apr 23, 2026
5f481dd
JS port: keep legacy theme default, upgrade only on explicit hint
shai-almog Apr 23, 2026
266a820
JS port: add theme screenshot tests to port.js forced-timeout list
shai-almog Apr 23, 2026
a7ebd77
Ship native themes in iOS/Android builds; fix Switch/Tabs; add grid +…
shai-almog Apr 23, 2026
b3ef932
Drop :root CSS-var block; inline colors
shai-almog Apr 23, 2026
9f998a8
Strip @media from theme file header comments
shai-almog Apr 23, 2026
f05e417
Compiler: skip @media inside block comments (dark-mode rewriter)
shai-almog Apr 23, 2026
6350883
Compiler: actually emit $Dark<UIID> entries from @media (dark)
shai-almog Apr 23, 2026
effe0fa
Fix duplicate PNG captures, switch to designer-style overlay, border-…
shai-almog Apr 23, 2026
5a5f5f2
Fill in dark-mode gaps: TitleArea, MainTitle, SpanLabel, TextArea, etc
shai-almog Apr 23, 2026
27ffa24
Keep legacy themes default; new tests opt-in modern; per-component grid
shai-almog Apr 23, 2026
b4d9eeb
DualAppearance: log whether modern theme actually loaded
shai-almog Apr 23, 2026
10ee76e
Load modern theme via Display.getResourceAsStream (Android assets path)
shai-almog Apr 23, 2026
50ec7c0
Android default theme: holo light, not pre-Holo androidTheme.res
shai-almog Apr 23, 2026
4c8195a
DualAppearance.finish: reload /theme.res, not just native theme
shai-almog Apr 23, 2026
10caa21
DualAppearance: diagnose iOS theme-load + classpath fallback
shai-almog Apr 23, 2026
3d8ae59
DualAppearance: trace each step of runAppearance
shai-almog Apr 23, 2026
1c05087
DualAppearance: split Form ctor to find the hang
shai-almog Apr 23, 2026
b019bb2
DualAppearance: probe each UIID before the Form ctor
shai-almog Apr 23, 2026
faedf49
iOS modern theme: inline TitleArea props (no cn1-derive)
shai-almog Apr 23, 2026
ab5967e
DualAppearance: drop probe/step diagnostics now that iOS works
shai-almog Apr 24, 2026
e5067f3
Install theme-fidelity goldens for iOS + Android
shai-almog Apr 24, 2026
81bc2bd
Modern themes: bottom tabs, distinct Dialog bg, explicit Title bg, si…
shai-almog Apr 24, 2026
fe2560e
Remove stale theme goldens pre-recapture
shai-almog Apr 24, 2026
b0bd2b8
native-themes/README: document cn1-derive + backdrop-filter rules
shai-almog Apr 24, 2026
c01aea0
Tabs: honor tabPlacementInt theme constant via setTabPlacement()
shai-almog Apr 24, 2026
1262606
Tabs.initLaf: null-guard tabsContainer for super()-chain call
shai-almog Apr 24, 2026
88880cf
Tabs ctor: read tabPlacementInt directly for no-arg construction
shai-almog Apr 24, 2026
0dcecf9
Tabs ctor: log tabPlacementInt read for CI diagnosis
shai-almog Apr 24, 2026
e18f2b0
UIManager.refreshTheme: preserve theme constants across the round-trip
shai-almog Apr 24, 2026
c62e111
Theme pass 2: Android compactness, iOS pill tabs, button text-align, …
shai-almog Apr 24, 2026
0c44e02
Developer guide: new chapter for native modern themes
shai-almog Apr 24, 2026
b90fb6e
Theme pass 3: textured backdrop, iOS MultiButton, per-platform check/…
shai-almog Apr 24, 2026
eb8eb39
DualAppearance: paint textured backdrop via paintBackground override
shai-almog Apr 24, 2026
21ba0bf
DualAppearance: clear ContentPane / TitleArea bg when textured
shai-almog Apr 24, 2026
5e873b1
Theme pass 4: remove core hacks, rewrite docs, polish translucency + …
shai-almog Apr 25, 2026
8ea5d50
initializr: opt new projects into the modern native themes
shai-almog Apr 25, 2026
4059455
cn1playground: preview the modern native themes
shai-almog Apr 25, 2026
a1855b3
Font: drop unused CodenameOneImplementation import
shai-almog Apr 25, 2026
a52243d
[diagnostic] Re-enable TitleArea cn1-derive: Toolbar + trace UIManager
shai-almog Apr 25, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 45 additions & 17 deletions .github/workflows/designer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,15 @@ on:
- master
paths:
- 'CodenameOneDesigner/**'
- 'maven/css-compiler/**'
- 'maven/designer/**'
- '.github/workflows/designer.yml'
pull_request:
branches:
- master
paths:
- 'CodenameOneDesigner/**'
- 'maven/css-compiler/**'
- 'maven/designer/**'
- '.github/workflows/designer.yml'

Expand All @@ -38,30 +40,47 @@ jobs:
wget https://github.com/codenameone/cn1-binaries/archive/refs/heads/master.zip
unzip master.zip -d ..
mv ../cn1-binaries-master ../cn1-binaries
mkdir -p maven/target
rm -rf maven/target/cn1-binaries
cp -R ../cn1-binaries maven/target/cn1-binaries

- name: Build core dependencies
- name: Build Designer (pulls in codenameone-css-compiler as dep)
env:
CN1_BINARIES: ${{ github.workspace }}/maven/target/cn1-binaries
run: |
xvfb-run -a ant -noinput -buildfile Ports/CLDC11/build.xml jar
xvfb-run -a ant -noinput -buildfile Ports/JavaSE/build.xml jar
xvfb-run -a ant -noinput -buildfile Ports/JavaSEWithSVGSupport/build.xml jar
xvfb-run -a ant -noinput -buildfile CodenameOne/build.xml jar

- name: Run designer CSS localization tests
run: xvfb-run -a ant -noinput -buildfile CodenameOneDesigner/build.xml test-css-localization
cd maven
mvn -B -pl designer -am -DskipTests -Plocal-dev-javase \
-Dmaven.javadoc.skip=true -Dcn1.binaries="${CN1_BINARIES}" install

- name: Run designer XML parser unit tests (Maven)
env:
CN1_BINARIES: ${{ github.workspace }}/maven/target/cn1-binaries
run: |
mkdir -p maven/target
rm -rf maven/target/cn1-binaries
cp -R ../cn1-binaries maven/target/cn1-binaries
cd maven
mvn -B -pl designer -am -DunitTests=true -Dcodename1.platform=javase -Plocal-dev-javase -Dmaven.javadoc.skip=true -Dmaven.antrun.skip=true -Dtest=SimpleXmlParserTest -DfailIfNoTests=false test

- name: Build designer release jar
run: xvfb-run -a ant -noinput -buildfile CodenameOneDesigner/build.xml release
mvn -B -pl designer -am -DunitTests=true -Dcodename1.platform=javase \
-Plocal-dev-javase -Dmaven.javadoc.skip=true -Dmaven.antrun.skip=true \
-Dcn1.binaries="${CN1_BINARIES}" \
-Dtest=SimpleXmlParserTest -DfailIfNoTests=false test

- name: Verify designer CLI CSS compilation
run: |
# The Maven-built jar-with-dependencies is a ZIP wrapper around the
# actual runnable designer_1.jar (see the antrun
# add-designer-jar-with-dependencies execution in maven/designer/pom.xml).
# Unpack and run the inner jar directly.
wrapped=$(ls maven/designer/target/codenameone-designer-*-jar-with-dependencies.jar | head -n1)
if [ -z "${wrapped}" ] || [ ! -f "${wrapped}" ]; then
echo "designer jar-with-dependencies not found" >&2
exit 1
fi
extract_dir="$(mktemp -d)"
unzip -q "${wrapped}" -d "${extract_dir}"
designer_jar="${extract_dir}/designer_1.jar"
if [ ! -f "${designer_jar}" ]; then
echo "designer_1.jar not found inside ${wrapped}" >&2
ls -la "${extract_dir}"
exit 1
fi
tmp_dir="CodenameOneDesigner/tmp-cli-test"
css_file="$tmp_dir/test.css"
l10n_dir="$tmp_dir/localization"
Expand All @@ -75,12 +94,21 @@ jobs:
cat <<'EOF' > "$l10n_dir/Strings.properties"
greeting=Hello from CLI
EOF
xvfb-run -a java -Dcli=true -jar CodenameOneDesigner/dist/designer.jar \
xvfb-run -a java -Dcli=true -jar "${designer_jar}" \
-css -stateless -input "$css_file" -output "$output_file" -localization "$l10n_dir"
test -s "$output_file"

- name: Verify native-themes CEF-free build
run: |
cd maven
mvn -B -pl css-compiler -am install -DskipTests -Dmaven.javadoc.skip=true -Plocal-dev-javase
cd ..
./scripts/build-native-themes.sh
test -f Themes/iOSModernTheme.res || { echo "missing Themes/iOSModernTheme.res"; exit 1; }
test -f Themes/AndroidMaterialTheme.res || { echo "missing Themes/AndroidMaterialTheme.res"; exit 1; }

- name: Upload designer jar artifact
uses: actions/upload-artifact@v4
with:
name: designer-jar
path: CodenameOneDesigner/dist/designer.jar
path: maven/designer/target/codenameone-designer-*-jar-with-dependencies.jar
8 changes: 8 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,14 @@ jobs:
cd maven
mvn clean verify -DunitTests=true -pl core-unittests -am -Dmaven.javadoc.skip=true -Plocal-dev-javase $MVN_ARGS
cd ..
- name: Build CSS compiler and smoke native-themes
run: |
cd maven
mvn -B -pl css-compiler -am install -DskipTests -Dmaven.javadoc.skip=true -Plocal-dev-javase
cd ..
./scripts/build-native-themes.sh
test -f Themes/iOSModernTheme.res || { echo "missing Themes/iOSModernTheme.res"; exit 1; }
test -f Themes/AndroidMaterialTheme.res || { echo "missing Themes/AndroidMaterialTheme.res"; exit 1; }
- name: Prepare Codename One binaries for Maven plugin tests
run: |
set -euo pipefail
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ node_modules
**/genfiles.properties
**/private/private.properties
.idea/
.claude/
target
pom.xml.versionsBackup
pom.xml.releaseBackup
Expand Down
2 changes: 1 addition & 1 deletion CodenameOne/src/com/codename1/io/Util.java
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ public static void copy(InputStream i, OutputStream o, int bufferSize) throws IO
}
}

/// Closes the object (connection, stream etc.) without throwing any exception, even if the
/// Closes the object (connection, stream etc.) without throwing any exception, even if the
/// object is null
///
/// #### Parameters
Expand Down
5 changes: 1 addition & 4 deletions CodenameOne/src/com/codename1/ui/Font.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
*/
package com.codename1.ui;

import com.codename1.impl.CodenameOneImplementation;

import java.util.HashMap;
import java.util.Hashtable;
Expand Down Expand Up @@ -171,9 +170,7 @@ public class Font extends CN {
}

Font(int face, int style, int size) {
Display d = Display.getInstance();
CodenameOneImplementation i = d.getImplementation();
font = i.createFont(face, style, size);
font = Display.getInstance().getImplementation().createFont(face, style, size);
}

/// Returns a previously loaded bitmap font from cache
Expand Down
24 changes: 23 additions & 1 deletion CodenameOne/src/com/codename1/ui/Tabs.java
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,16 @@ public Tabs(int tabP) {
tabsContainer.setScrollVisible(false);
tabsContainer.getStyle().setMargin(0, 0, 0, 0);
if (tabP == -1) {
// Honor the tabPlacementInt theme constant when no explicit
// placement was requested. Reading the constant here (rather
// than only in initLaf) guarantees the value is seen even
// when initLaf runs polymorphically from Component()'s super
// ctor - at that point the Tabs subclass fields haven't been
// initialised yet and writes to them are brittle.
int themePlacement = getUIManager().getThemeConstant("tabPlacementInt", -1);
if (themePlacement != -1) {
tabPlacement = themePlacement;
}
setTabPlacement(tabPlacement);
} else {
setTabPlacement(tabP);
Expand Down Expand Up @@ -216,8 +226,20 @@ protected void initLaf(UIManager manager) {
}
}
changeTabContainerStyleOnFocus = manager.isThemeConstant("changeTabContainerStyleOnFocusBool", false);
// tabPlacementInt lets a theme dictate whether tabs live at TOP /
// BOTTOM / LEFT / RIGHT. initLaf is called both during the
// Component() super() chain (before the Tabs ctor body has
// allocated tabsContainer) and again later when styles refresh.
// First call: tabsContainer is null, so just stash the value in
// the field; the ctor's setTabPlacement call at the end will
// pick it up and move the (then-allocated) container.
// Second call and beyond: container exists, so reparent it.
if (tabPlace != -1) {
tabPlacement = tabPlace;
if (tabsContainer == null) {
tabPlacement = tabPlace;
} else if (tabPlace != tabPlacement) {
setTabPlacement(tabPlace);
}
}
}

Expand Down
39 changes: 27 additions & 12 deletions CodenameOne/src/com/codename1/ui/plaf/DefaultLookAndFeel.java
Original file line number Diff line number Diff line change
Expand Up @@ -2443,15 +2443,24 @@ private void updateCheckBoxConstants(UIManager m, boolean focus, String append)
Style unsel = uim.createStyle("CheckBox.", "", false);
Style sel = uim.createStyle("CheckBox.", "sel#", true);
Style dis = uim.createStyle("CheckBox.", "dis#", false);
FontImage checkedDis = FontImage.createMaterial(FontImage.MATERIAL_CHECK_BOX, dis);
FontImage uncheckedDis = FontImage.createMaterial(FontImage.MATERIAL_CHECK_BOX_OUTLINE_BLANK, sel);
// Optional theme constants to swap the default Material
// check-box icons. Useful for platform-native looks (e.g.
// iOS modern uses CHECK_CIRCLE / RADIO_BUTTON_UNCHECKED
// for a rounded-circle aesthetic). Defaults to the legacy
// square check-box glyphs so existing themes are unaffected.
char checkedIcon = (char) uim.getThemeConstant(
"checkBoxCheckedIconInt", FontImage.MATERIAL_CHECK_BOX);
char uncheckedIcon = (char) uim.getThemeConstant(
"checkBoxUncheckedIconInt", FontImage.MATERIAL_CHECK_BOX_OUTLINE_BLANK);
FontImage checkedDis = FontImage.createMaterial(checkedIcon, dis);
FontImage uncheckedDis = FontImage.createMaterial(uncheckedIcon, sel);
if (focus) {
FontImage checkedSelected = FontImage.createMaterial(FontImage.MATERIAL_CHECK_BOX, sel);
FontImage uncheckedSelected = FontImage.createMaterial(FontImage.MATERIAL_CHECK_BOX_OUTLINE_BLANK, sel);
FontImage checkedSelected = FontImage.createMaterial(checkedIcon, sel);
FontImage uncheckedSelected = FontImage.createMaterial(uncheckedIcon, sel);
setCheckBoxFocusImages(checkedSelected, uncheckedSelected, checkedDis, uncheckedDis);
} else {
FontImage checkedUnselected = FontImage.createMaterial(FontImage.MATERIAL_CHECK_BOX, unsel);
FontImage uncheckedUnselected = FontImage.createMaterial(FontImage.MATERIAL_CHECK_BOX_OUTLINE_BLANK, unsel);
FontImage checkedUnselected = FontImage.createMaterial(checkedIcon, unsel);
FontImage uncheckedUnselected = FontImage.createMaterial(uncheckedIcon, unsel);
setCheckBoxImages(checkedUnselected, uncheckedUnselected, checkedDis, uncheckedDis);
}
}
Expand Down Expand Up @@ -2484,15 +2493,21 @@ private void updateRadioButtonConstants(UIManager m, boolean focus, String appen
Style unsel = uim.createStyle("RadioButton.", "", false);
Style sel = uim.createStyle("RadioButton.", "sel#", true);
Style dis = uim.createStyle("RadioButton.", "dis#", false);
FontImage checkedDis = FontImage.createMaterial(FontImage.MATERIAL_RADIO_BUTTON_CHECKED, dis);
FontImage uncheckedDis = FontImage.createMaterial(FontImage.MATERIAL_RADIO_BUTTON_UNCHECKED, sel);
// Same override pattern as the check-box icons above -
// theme constants can swap the default circle glyphs.
char checkedIcon = (char) uim.getThemeConstant(
"radioCheckedIconInt", FontImage.MATERIAL_RADIO_BUTTON_CHECKED);
char uncheckedIcon = (char) uim.getThemeConstant(
"radioUncheckedIconInt", FontImage.MATERIAL_RADIO_BUTTON_UNCHECKED);
FontImage checkedDis = FontImage.createMaterial(checkedIcon, dis);
FontImage uncheckedDis = FontImage.createMaterial(uncheckedIcon, sel);
if (focus) {
FontImage checkedSelected = FontImage.createMaterial(FontImage.MATERIAL_RADIO_BUTTON_CHECKED, sel);
FontImage uncheckedSelected = FontImage.createMaterial(FontImage.MATERIAL_RADIO_BUTTON_UNCHECKED, sel);
FontImage checkedSelected = FontImage.createMaterial(checkedIcon, sel);
FontImage uncheckedSelected = FontImage.createMaterial(uncheckedIcon, sel);
setRadioButtonFocusImages(checkedSelected, uncheckedSelected, checkedDis, uncheckedDis);
} else {
FontImage checkedUnselected = FontImage.createMaterial(FontImage.MATERIAL_RADIO_BUTTON_CHECKED, unsel);
FontImage uncheckedUnselected = FontImage.createMaterial(FontImage.MATERIAL_RADIO_BUTTON_UNCHECKED, unsel);
FontImage checkedUnselected = FontImage.createMaterial(checkedIcon, unsel);
FontImage uncheckedUnselected = FontImage.createMaterial(uncheckedIcon, unsel);
setRadioButtonImages(checkedUnselected, uncheckedUnselected, checkedDis, uncheckedDis);
}
}
Expand Down
38 changes: 38 additions & 0 deletions CodenameOne/src/com/codename1/ui/plaf/UIManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -551,6 +551,7 @@ public Style parseComponentCustomStyle(Resources theme, String baseStyle, String
private Style getComponentStyleImpl(String id, boolean selected, String prefix) {
try {
Style style = null;
Log.p("CN1SS:DIAG:getComponentStyleImpl.enter id=" + id + " selected=" + selected + " prefix=" + prefix);

if (id == null || id.length() == 0) {
//if no id return the default style
Expand Down Expand Up @@ -1587,6 +1588,35 @@ private Font scaleFontByFactor(Font font, float factor) {
}
}

/// Invalidates the cached Style instances and re-runs the theme build pass
/// against the currently installed theme properties. Callers use this after
/// state changes that affect style resolution (notably `Display.setDarkMode`,
/// which makes `$Dark<UIID>` entries eligible) without reloading the theme
/// from a resource file. Components styled after this call resolve against
/// the refreshed theme; already-resolved Style references on existing
/// components keep their old values until those components re-fetch their
/// styles.
public void refreshTheme() {
if (!accessible || themeProps == null) {
return;
}
Hashtable props = new Hashtable();
for (String key : themeProps.keySet()) {
props.put(key, themeProps.get(key));
}
// buildTheme strips `@`-prefixed constants into themeConstants and
// drops them from the main themeProps map. Round-tripping through
// setThemePropsImpl would therefore lose every constant - so
// re-add them from themeConstants with the `@` restored, matching
// the shape buildTheme expects on input.
if (themeConstants != null) {
for (String key : themeConstants.keySet()) {
props.put("@" + key, themeConstants.get(key));
}
}
setThemePropsImpl(props);
}

/// Returns a theme constant defined in the resource editor
///
/// #### Parameters
Expand Down Expand Up @@ -2040,9 +2070,12 @@ private Style createStyle(String id, String prefix, boolean selected, boolean al
if (useDarkStyle) {
id = "$Dark" + id;
}
Log.p("CN1SS:DIAG:createStyle.enter id=" + id + " selected=" + selected + " allowDark=" + allowDarkStyle);

String baseStyle = (String) themeProps.get(id + "derive");
Log.p("CN1SS:DIAG:createStyle.derive id=" + id + " baseStyle=" + baseStyle);
if (baseStyle == null && useDarkStyle) {
Log.p("CN1SS:DIAG:createStyle.darkRecurse id=" + id);
style = new Style(createStyle(originalId, prefix, selected, false));
} else {
style = null;
Expand All @@ -2057,9 +2090,13 @@ private Style createStyle(String id, String prefix, boolean selected, boolean al
if (pos > -1) {
String baseId = baseStyle.substring(0, pos);
String basePrefix = baseStyle.substring(pos + 1);
Log.p("CN1SS:DIAG:createStyle.deriveImpl id=" + id + " -> " + baseId + " prefix=" + basePrefix);
style = new Style(getComponentStyleImpl(baseId, basePrefix.indexOf("sel") > -1, basePrefix));
Log.p("CN1SS:DIAG:createStyle.deriveImpl.done id=" + id);
} else {
Log.p("CN1SS:DIAG:createStyle.deriveBase id=" + id + " -> getComponentStyle(" + baseStyle + ")");
style = new Style(getComponentStyle(baseStyle));
Log.p("CN1SS:DIAG:createStyle.deriveBase.done id=" + id);
}
} else {
if (selected) {
Expand All @@ -2075,6 +2112,7 @@ private Style createStyle(String id, String prefix, boolean selected, boolean al
style = new Style(defaultStyle);
}
}
Log.p("CN1SS:DIAG:createStyle.props id=" + id);
if (themeProps != null) {
String bgColor;
String fgColor;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
package com.codename1.designer;

import com.codename1.ui.util.EditableResources;
import com.codename1.ui.util.EditableResourcesEditor;
import java.io.IOException;
import java.io.InputStream;
import java.util.Hashtable;
Expand Down Expand Up @@ -198,7 +199,7 @@ public String addResource(EditableResources res, ResourceEditorView view) {
InputStream is = getClass().getResourceAsStream("/templates/" + template.getSelectedItem().toString() + ".res");
if(is != null) {
try {
EditableResources r = new EditableResources();
EditableResources r = new EditableResourcesEditor();
r.openFile(is);
is.close();
theme = r.getTheme(r.getThemeResourceNames()[0]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
package com.codename1.designer;

import com.codename1.ui.util.EditableResources;
import com.codename1.ui.util.EditableResourcesEditor;
import java.io.IOException;
import java.io.InputStream;
import java.util.Hashtable;
Expand Down Expand Up @@ -199,7 +200,7 @@ public String addResource(EditableResources res, ResourceEditorView view) {
InputStream is = getClass().getResourceAsStream("/templates/" + template.getSelectedItem().toString() + ".res");
if(is != null) {
try {
EditableResources r = new EditableResources();
EditableResources r = new EditableResourcesEditor();
r.openFile(is);
is.close();
ui = r.getResourceObject("Main");
Expand Down
Loading
Loading