Revision: 2522
http://sourceforge.net/p/swingme/code/2522
Author: yuranet
Date: 2021-07-08 11:52:03 +0000 (Thu, 08 Jul 2021)
Log Message:
-----------
default ios theme
Modified Paths:
--------------
iOSME/src/android/graphics/ColorMatrix.java
iOSME/src/javax/microedition/lcdui/Graphics.java
iOSME/src/net/yura/ios/plaf/IOSLookAndFeel.java
Added Paths:
-----------
iOSME/iosmeimg/
iOSME/iosmeimg/button.png
iOSME/iosmeimg/dialog.png
iOSME/iosmeimg/iconGrid.png
iOSME/iosmeimg/thumb.png
iOSME/res/
iOSME/res/iOS_theme.xml
Added: iOSME/iosmeimg/button.png
===================================================================
(Binary files differ)
Index: iOSME/iosmeimg/button.png
===================================================================
--- iOSME/iosmeimg/button.png 2021-07-08 11:48:20 UTC (rev 2521)
+++ iOSME/iosmeimg/button.png 2021-07-08 11:52:03 UTC (rev 2522)
Property changes on: iOSME/iosmeimg/button.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Added: iOSME/iosmeimg/dialog.png
===================================================================
(Binary files differ)
Index: iOSME/iosmeimg/dialog.png
===================================================================
--- iOSME/iosmeimg/dialog.png 2021-07-08 11:48:20 UTC (rev 2521)
+++ iOSME/iosmeimg/dialog.png 2021-07-08 11:52:03 UTC (rev 2522)
Property changes on: iOSME/iosmeimg/dialog.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Added: iOSME/iosmeimg/iconGrid.png
===================================================================
(Binary files differ)
Index: iOSME/iosmeimg/iconGrid.png
===================================================================
--- iOSME/iosmeimg/iconGrid.png 2021-07-08 11:48:20 UTC (rev 2521)
+++ iOSME/iosmeimg/iconGrid.png 2021-07-08 11:52:03 UTC (rev 2522)
Property changes on: iOSME/iosmeimg/iconGrid.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Added: iOSME/iosmeimg/thumb.png
===================================================================
(Binary files differ)
Index: iOSME/iosmeimg/thumb.png
===================================================================
--- iOSME/iosmeimg/thumb.png 2021-07-08 11:48:20 UTC (rev 2521)
+++ iOSME/iosmeimg/thumb.png 2021-07-08 11:52:03 UTC (rev 2522)
Property changes on: iOSME/iosmeimg/thumb.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Added: iOSME/res/iOS_theme.xml
===================================================================
--- iOSME/res/iOS_theme.xml (rev 0)
+++ iOSME/res/iOS_theme.xml 2021-07-08 11:52:03 UTC (rev 2522)
@@ -0,0 +1,178 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE synth SYSTEM "SynthME.dtd">
+
+<synth>
+
+ <style id="global">
+ <state>
+ <font name="PROPORTIONAL" size="MEDIUM"/>
+ <!-- do not set default foreground as we want the component to get it from the window -->
+ </state>
+ </style>
+ <bind style="global" key=".*"/>
+
+ <style id="tooltip">
+ <state>
+ <color type="BACKGROUND" value="#FFFFFF"/>
+ </state>
+ </style>
+ <bind style="tooltip" key="ToolTip"/>
+
+
+ <style id="button">
+ <insets top="5" left="5" bottom="5" right="5"/>
+ <state>
+ <imagePainter path="/iosmeimg/button.png" sourceInsets="12 10 11 10" paintCenter="false"/>
+ <color type="BORDERFILL" value="#d6d6d6"/>
+ <color type="FOREGROUND" value="#000000"/>
+ </state>
+ <state value="FOCUSED"> <!-- top, left, bottom, right -->
+ <imagePainter path="/iosmeimg/highlight.png" sourceInsets="12 10 11 10" paintCenter="false"/>
+ <color type="BORDERFILL" value="#8f9dac"/>
+ </state>
+ </style>
+ <bind style="button" key="Button"/>
+
+
+ <style id="text">
+ <insets top="3" left="6" bottom="3" right="6"/>
+ <state value="ENABLED">
+ <imagePainter path="/iosmeimg/textbox2.png" sourceInsets="13 15 13 15" paintCenter="false"/>
+ <color type="BORDERFILL" value="#d3dae4"/>
+ <color type="FOREGROUND" value="#000000"/>
+ </state>
+ <state value="FOCUSED"> <!-- top, left, bottom, right -->
+ <imagePainter path="/iosmeimg/textbox.png" sourceInsets="13 15 13 15" paintCenter="false"/>
+ <color type="BORDERFILL" value="#ffffff"/>
+ <color type="FOREGROUND" value="#000000"/>
+ </state>
+ </style>
+ <bind style="text" key="TextField"/>
+ <bind style="text" key="TextArea"/>
+
+
+
+ <style id="window">
+ <insets top="0" left="0" bottom="0" right="0"/>
+ <state>
+ <color type="BACKGROUND" value="#F2F2F7"/>
+ <color type="FOREGROUND" value="#52425c"/>
+ </state>
+ </style>
+ <bind style="window" key="Frame"/>
+
+
+ <style id="dialog">
+ <insets top="30" left="30" bottom="30" right="30"/>
+ <state>
+ <imagePainter path="/iosmeimg/dialog.png" sourceInsets="30 30 30 30" paintCenter="true"/>
+ <color type="FOREGROUND" value="#FFFFFF"/>
+ </state>
+ </style>
+ <bind style="dialog" key="Dialog"/>
+
+
+ <style id="dialogTitle">
+ <state>
+ <property key="titleAlignment" type="string" value="center"/>
+ </state>
+ </style>
+ <bind style="dialogTitle" key="InternalFrameTitlePane"/>
+
+ <style id="titleLabel">
+ <state>
+ <font name="PROPORTIONAL" size="MEDIUM" style="BOLD"/>
+ </state>
+ </style>
+ <bind style="titleLabel" key="TitleBarLabel"/>
+
+ <style id="menu">
+ <state>
+ <color type="BACKGROUND" value="#000000"/>
+ <color type="FOREGROUND" value="#FFFFFF"/>
+ </state>
+ </style>
+ <bind style="menu" key="Menu"/>
+ <bind style="menu" key="Popup"/>
+ <bind style="menu" key="TitleBar"/>
+
+ <style id="checkbox">
+ <insets top="5" left="5" bottom="5" right="5"/>
+ <imageIcon id="check_on" path="/iosmeimg/iconGrid.png" x="0" y="0" width="16" height="16"/>
+ <imageIcon id="check_on_disabled" path="/iosmeimg/iconGrid.png" x="0" y="16" width="16" height="16"/>
+ <imageIcon id="check_off" path="/iosmeimg/iconGrid.png" x="0" y="32" width="16" height="16"/>
+ <imageIcon id="check_off_disabled" path="/iosmeimg/iconGrid.png" x="0" y="48" width="16" height="16"/>
+ <state>
+ <property key="icon" value="check_off"/>
+ </state>
+ <state value="SELECTED">
+ <property key="icon" value="check_on"/>
+ </state>
+ <state value="DISABLED">
+ <property key="icon" value="check_off_disabled"/>
+ </state>
+ <state value="DISABLED AND SELECTED">
+ <property key="icon" value="check_on_disabled"/>
+ </state>
+ </style>
+ <bind style="checkbox" key="CheckBox"/>
+
+
+ <style id="radioButton">
+ <insets top="5" left="5" bottom="5" right="5"/>
+ <imageIcon id="radio_on" path="/iosmeimg/iconGrid.png" x="0" y="64" width="16" height="16"/>
+ <imageIcon id="radio_on_disabled" path="/iosmeimg/iconGrid.png" x="0" y="80" width="16" height="16"/>
+ <imageIcon id="radio_off" path="/iosmeimg/iconGrid.png" x="0" y="96" width="16" height="16"/>
+ <imageIcon id="radio_off_disabled" path="/iosmeimg/iconGrid.png" x="0" y="112" width="16" height="16"/>
+ <state>
+ <property key="icon" value="radio_off"/>
+ </state>
+ <state value="SELECTED">
+ <property key="icon" value="radio_on"/>
+ </state>
+ <state value="DISABLED">
+ <property key="icon" value="radio_off_disabled"/>
+ </state>
+ <state value="DISABLED AND SELECTED">
+ <property key="icon" value="radio_on_disabled"/>
+ </state>
+ </style>
+ <bind style="radioButton" key="RadioButton"/>
+
+
+
+ <style id="scrollpane">
+ <insets top="2" left="5" bottom="2" right="5"/>
+ <state>
+ <imagePainter method="scrollBarThumbBackground" path="/iosmeimg/thumb.png" direction="vertical" sourceInsets="2 5 2 5" />
+ </state>
+ </style>
+ <bind style="scrollpane" type="region" key="ScrollBarThumb"/>
+
+
+
+
+ <style id="listRenderer">
+ <insets top="3" left="3" bottom="3" right="3"/>
+ <state>
+ <imagePainter path="/iosmeimg/select_row.png" sourceInsets="0 0 1 0" paintCenter="false"/>
+ <color type="BORDERFILL" value="#FFFFFF"/>
+ </state>
+ <state value="SELECTED">
+ <imagePainter path="/iosmeimg/select_row.png" sourceInsets="43 0 1 0" paintCenter="false"/>
+ <color type="BORDERFILL" value="#3b78e6"/>
+ </state>
+ </style>
+ <bind style="listRenderer" key="ListRenderer"/>
+
+
+ <style id="section">
+ <insets top="5" left="5" bottom="5" right="5"/>
+ <state>
+ <imagePainter path="/iosmeimg/section.png" sourceInsets="12 12 12 12" paintCenter="false"/>
+ <color type="BORDERFILL" value="#ffffff"/>
+ </state>
+ </style>
+ <bind style="section" key="Section"/>
+
+</synth>
Modified: iOSME/src/android/graphics/ColorMatrix.java
===================================================================
--- iOSME/src/android/graphics/ColorMatrix.java 2021-07-08 11:48:20 UTC (rev 2521)
+++ iOSME/src/android/graphics/ColorMatrix.java 2021-07-08 11:52:03 UTC (rev 2522)
@@ -176,6 +176,9 @@
return true;
}
+ /**
+ * convert android ColorMatrix into iOS CIColorMatrix
+ */
public CIFilter toCIFilter() {
CIFilter filter = CIFilter.filterWithName("CIColorMatrix");
Modified: iOSME/src/javax/microedition/lcdui/Graphics.java
===================================================================
--- iOSME/src/javax/microedition/lcdui/Graphics.java 2021-07-08 11:48:20 UTC (rev 2521)
+++ iOSME/src/javax/microedition/lcdui/Graphics.java 2021-07-08 11:52:03 UTC (rev 2522)
@@ -45,7 +45,7 @@
private int tx, ty;
private int strokeWidth = 1, strokeStyle;
- // Get clipBounds is slow, we keep a cache.
+ // we keep a cache.
private CGRect clipBounds = new CGRect();
private boolean dirtyClip = true;
@@ -127,6 +127,8 @@
public void setStrokeStyle(int stroke) {
this.strokeStyle = stroke;
+ // TODO CoreGraphics.CGContextSetStrokePattern(context, pattern, components);
+ // TODO CoreGraphics.CGContextSetLineDash(context, );
}
public int getStrokeStyle() {
Modified: iOSME/src/net/yura/ios/plaf/IOSLookAndFeel.java
===================================================================
--- iOSME/src/net/yura/ios/plaf/IOSLookAndFeel.java 2021-07-08 11:48:20 UTC (rev 2521)
+++ iOSME/src/net/yura/ios/plaf/IOSLookAndFeel.java 2021-07-08 11:52:03 UTC (rev 2522)
@@ -1,11 +1,9 @@
package net.yura.ios.plaf;
-import net.yura.mobile.gui.Icon;
import net.yura.mobile.gui.border.Border;
import net.yura.mobile.gui.border.MatteBorder;
import net.yura.mobile.gui.plaf.SynthLookAndFeel;
import java.io.InputStream;
-import javax.microedition.lcdui.Image;
import apple.uikit.UIImage;
import apple.uikit.enums.UIImageResizingMode;
import apple.uikit.struct.UIEdgeInsets;
@@ -28,6 +26,7 @@
if (border instanceof MatteBorder) {
MatteBorder ninePatch = (MatteBorder) border;
UIImage orgImg = ninePatch.getTileIcon().getImage().getUIImage();
+ // TODO what if 'ninePatch.back' (draw center background) is false?
int[] insets = ninePatch.getImageEdgeInsets();
UIImage borderImg = orgImg.resizableImageWithCapInsetsResizingMode(new UIEdgeInsets(insets[0], insets[1], insets[2], insets[3]), UIImageResizingMode.Stretch);
return new IOSBorder(borderImg, ninePatch.getTop(), ninePatch.getLeft(), ninePatch.getBottom(), ninePatch.getRight());
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|