Revision: 2580
http://sourceforge.net/p/swingme/code/2580
Author: yuranet
Date: 2021-11-04 12:06:41 +0000 (Thu, 04 Nov 2021)
Log Message:
-----------
theme fix for file chooser
Modified Paths:
--------------
iOSME/res/iOS_theme.xml
iOSME/src/net/yura/ios/plaf/IOSLookAndFeel.java
Modified: iOSME/res/iOS_theme.xml
===================================================================
--- iOSME/res/iOS_theme.xml 2021-11-04 11:23:21 UTC (rev 2579)
+++ iOSME/res/iOS_theme.xml 2021-11-04 12:06:41 UTC (rev 2580)
@@ -206,7 +206,9 @@
<bind style="listRenderer" key="ListRendererCollapsed"/>
<bind style="listRenderer" key="PopupListRenderer"/>
<bind style="listRenderer" key="MenuRenderer"/>
+ <bind style="listRenderer" key="CheckBoxRenderer"/>
+
<style id="list">
<state>
<color type="FOREGROUND" value="#000000"/>
Modified: iOSME/src/net/yura/ios/plaf/IOSLookAndFeel.java
===================================================================
--- iOSME/src/net/yura/ios/plaf/IOSLookAndFeel.java 2021-11-04 11:23:21 UTC (rev 2579)
+++ iOSME/src/net/yura/ios/plaf/IOSLookAndFeel.java 2021-11-04 12:06:41 UTC (rev 2580)
@@ -55,35 +55,33 @@
//chevron.backward chevron.forward
- Style defaultStyle = getStyle("");
+ Style checkBoxRenderer = makeStyleFor("CheckBoxRenderer");
+ UIColor fileChooserIconColor = UIColor.blackColor();
- Style checkBoxRenderer = new Style(defaultStyle);
- UIColor white = UIColor.whiteColor();
-
- Icon folderIcon = getSystemImage("folder", white); // folder.fill
+ Icon folderIcon = getSystemImage("folder", fileChooserIconColor); // folder.fill
if (folderIcon != null) checkBoxRenderer.addProperty(folderIcon, "folderIcon", Style.ALL);
- Icon imageIcon = getSystemImage("photo", white); // photo.fill
+ Icon imageIcon = getSystemImage("photo", fileChooserIconColor); // photo.fill
if (imageIcon != null) checkBoxRenderer.addProperty(imageIcon, "imageIcon", Style.ALL);
- Icon soundIcon = getSystemImage("speaker", white); // hifispeaker.fill speaker.fill
+ Icon soundIcon = getSystemImage("speaker", fileChooserIconColor); // hifispeaker.fill speaker.fill
if (soundIcon != null) checkBoxRenderer.addProperty(soundIcon, "soundIcon", Style.ALL);
- Icon videoIcon = getSystemImage("video", white); // film.fill video.fill
+ Icon videoIcon = getSystemImage("video", fileChooserIconColor); // film.fill video.fill
if (videoIcon != null) checkBoxRenderer.addProperty(videoIcon, "videoIcon", Style.ALL);
- Icon unknownIcon = getSystemImage("doc", white); // doc.fill
+ Icon unknownIcon = getSystemImage("doc", fileChooserIconColor); // doc.fill
if (unknownIcon != null) checkBoxRenderer.addProperty(unknownIcon, "unknownIcon", Style.ALL);
setStyleFor("CheckBoxRenderer", checkBoxRenderer);
- Style menuItem = new Style(defaultStyle);
+ Style menuItem = makeStyleFor("MenuItem");
Icon arrow = getSystemImage("chevron.right", null);
if (arrow != null) menuItem.addProperty(arrow, "arrow", Style.ALL);
setStyleFor("MenuItem", menuItem);
- Style spinner = new Style(defaultStyle);
+ Style spinner = makeStyleFor("Spinner");
spinner.addBorder(new EmptyBorder(0, 20, 0, 20), Style.ALL);
UIColor blue = UIColor.systemBlueColor();
UIColor gray = UIColor.systemGrayColor();
@@ -106,6 +104,18 @@
// not working checkBoxRenderer.addBorder(new EmptyBorder(20,10,20,10), Style.ALL);
}
+ /**
+ * @see net.yura.mobile.gui.DesktopPane#getDefaultTheme(String)
+ */
+ private Style makeStyleFor(String name) {
+ Style style = getStyle(name);
+ if (style != null) {
+ return style;
+ }
+ Style defaultStyle = getStyle("");
+ return new Style(defaultStyle);
+ }
+
private static Icon getSystemImage(String name, UIColor color) {
UIImage image;
try {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|