You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by ca...@apache.org on 2017/01/12 19:25:30 UTC
git commit: [flex-asjs] [refs/heads/develop] - More buttons styles in
exampled (icon, minifab and flat),
moved IconToogle to Toogles Panel since is based on checkbox
Repository: flex-asjs
Updated Branches:
refs/heads/develop cd78a3a45 -> ade5a833a
More buttons styles in exampled (icon, minifab and flat), moved IconToogle to Toogles Panel since is based on checkbox
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/ade5a833
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/ade5a833
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/ade5a833
Branch: refs/heads/develop
Commit: ade5a833a610b23c598346ee718c803936534982
Parents: cd78a3a
Author: Carlos Rovira <ca...@apache.org>
Authored: Thu Jan 12 20:25:26 2017 +0100
Committer: Carlos Rovira <ca...@apache.org>
Committed: Thu Jan 12 20:25:26 2017 +0100
----------------------------------------------------------------------
.../MDLExample/src/main/flex/Buttons.mxml | 48 +++++++++++++++---
.../MDLExample/src/main/flex/Toggles.mxml | 13 ++++-
.../flex/mdl/materialIcons/MaterialIconMood.as | 52 ++++++++++++++++++++
.../flex/mdl/materialIcons/MaterialIconsType.as | 1 +
.../src/main/resources/mdl-manifest.xml | 1 +
5 files changed, 108 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ade5a833/examples/flexjs/MDLExample/src/main/flex/Buttons.mxml
----------------------------------------------------------------------
diff --git a/examples/flexjs/MDLExample/src/main/flex/Buttons.mxml b/examples/flexjs/MDLExample/src/main/flex/Buttons.mxml
index ad20861..42d0579 100644
--- a/examples/flexjs/MDLExample/src/main/flex/Buttons.mxml
+++ b/examples/flexjs/MDLExample/src/main/flex/Buttons.mxml
@@ -62,16 +62,52 @@ limitations under the License.
</mdl:beads>
</mdl:Button>
- <mdl:IconToggle dataMdlFor="mdlBoldIcon">
+ <!-- Flat button -->
+ <mdl:Button text="Flat"/>
+
+ <!-- Flat button with ripple -->
+ <mdl:Button text="Ripple" ripple="true"/>
+
+ <!-- Disabled flat button -->
+ <mdl:Button text="Disabled">
+ <mdl:beads>
+ <mdl:Disabled/>
+ </mdl:beads>
+ </mdl:Button>
+
+ <!-- Primary-colored flat button -->
+ <mdl:Button text="primary" primary="true"/>
+
+ <!-- Accent-colored flat button -->
+ <mdl:Button text="accent" accent="true"/>
+
+ <!-- Icon button -->
+ <mdl:Button icon="true">
+ <mdl:materialIcon>
+ <mdl:MaterialIconMood/>
+ </mdl:materialIcon>
+ </mdl:Button>
+
+ <!-- Colored icon button -->
+ <mdl:Button icon="true" colored="true">
<mdl:materialIcon>
- <mdl:MaterialIconFormatBold />
+ <mdl:MaterialIconMood/>
</mdl:materialIcon>
- </mdl:IconToggle>
- <mdl:IconToggle dataMdlFor="mdlItalicIcon">
+ </mdl:Button>
+
+ <!-- Mini FAB button -->
+ <mdl:Button fab="true" minifab="true">
<mdl:materialIcon>
- <mdl:MaterialIconFormatItalic />
+ <mdl:MaterialIconAdd/>
</mdl:materialIcon>
- </mdl:IconToggle>
+ </mdl:Button>
+
+ <!-- Colored mini FAB button -->
+ <mdl:Button fab="true" minifab="true" colored="true">
+ <mdl:materialIcon>
+ <mdl:MaterialIconAdd/>
+ </mdl:materialIcon>
+ </mdl:Button>
</mdl:Grid>
</mdl:TabBarPanel>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ade5a833/examples/flexjs/MDLExample/src/main/flex/Toggles.mxml
----------------------------------------------------------------------
diff --git a/examples/flexjs/MDLExample/src/main/flex/Toggles.mxml b/examples/flexjs/MDLExample/src/main/flex/Toggles.mxml
index ad3bba5..9ecc469 100644
--- a/examples/flexjs/MDLExample/src/main/flex/Toggles.mxml
+++ b/examples/flexjs/MDLExample/src/main/flex/Toggles.mxml
@@ -32,7 +32,18 @@ limitations under the License.
<mdl:RadioButton groupName="g1" text="Red"/>
<mdl:Switch text="Switch" ripple="true" selected="true"/>
-
+
+ <mdl:IconToggle dataMdlFor="mdlBoldIcon">
+ <mdl:materialIcon>
+ <mdl:MaterialIconFormatBold />
+ </mdl:materialIcon>
+ </mdl:IconToggle>
+
+ <mdl:IconToggle dataMdlFor="mdlItalicIcon">
+ <mdl:materialIcon>
+ <mdl:MaterialIconFormatItalic />
+ </mdl:materialIcon>
+ </mdl:IconToggle>
</mdl:Grid>
</mdl:TabBarPanel>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ade5a833/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/materialIcons/MaterialIconMood.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/materialIcons/MaterialIconMood.as b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/materialIcons/MaterialIconMood.as
new file mode 100644
index 0000000..7f7205e
--- /dev/null
+++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/materialIcons/MaterialIconMood.as
@@ -0,0 +1,52 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.mdl.materialIcons
+{
+ import org.apache.flex.mdl.supportClasses.MaterialIconBase;
+
+ /**
+ * The MaterialIconMood bead class is a specialty bead that add "mood" icon
+ * to component taken from "material-icons"
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public class MaterialIconMood extends MaterialIconBase
+ {
+ /**
+ * constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function MaterialIconMood()
+ {
+ super();
+ }
+
+ override protected function get iconText():String
+ {
+ return MaterialIconsType.MOOD;
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ade5a833/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/materialIcons/MaterialIconsType.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/materialIcons/MaterialIconsType.as b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/materialIcons/MaterialIconsType.as
index 939ed95..0cabd61 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/materialIcons/MaterialIconsType.as
+++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/materialIcons/MaterialIconsType.as
@@ -27,6 +27,7 @@ package org.apache.flex.mdl.materialIcons
public static const SHARE:String = "share";
public static const EVENT:String = "event";
public static const FACE:String = "face";
+ public static const MOOD:String = "mood";
public static const MORE_VERT:String = "more_vert";
public static const SEARCH:String = "search";
public static const KEYBOARD_ARROW_DOWN:String = "keyboard_arrow_down";
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ade5a833/frameworks/projects/MaterialDesignLite/src/main/resources/mdl-manifest.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/resources/mdl-manifest.xml b/frameworks/projects/MaterialDesignLite/src/main/resources/mdl-manifest.xml
index 016e72b..1b8b2a0 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/resources/mdl-manifest.xml
+++ b/frameworks/projects/MaterialDesignLite/src/main/resources/mdl-manifest.xml
@@ -110,6 +110,7 @@
<component id="MaterialIconShare" class="org.apache.flex.mdl.materialIcons.MaterialIconShare"/>
<component id="MaterialIconEvent" class="org.apache.flex.mdl.materialIcons.MaterialIconEvent"/>
<component id="MaterialIconFace" class="org.apache.flex.mdl.materialIcons.MaterialIconFace"/>
+ <component id="MaterialIconMood" class="org.apache.flex.mdl.materialIcons.MaterialIconMood"/>
<component id="MaterialIconMoreVert" class="org.apache.flex.mdl.materialIcons.MaterialIconMoreVert"/>
<component id="MaterialIconSearch" class="org.apache.flex.mdl.materialIcons.MaterialIconSearch"/>
<component id="MaterialIconKeyboardArrowDown" class="org.apache.flex.mdl.materialIcons.MaterialIconKeyboardArrowDown"/>