You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by ca...@apache.org on 2020/04/02 23:05:10 UTC

[royale-asjs] branch develop updated: Icons: Remove FontIcon and ToggleFontIcon as announced some days ago. Use MaterialIcon and MaterialToggleIcon instead (or FontAwesome versions)

This is an automated email from the ASF dual-hosted git repository.

carlosrovira pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git


The following commit(s) were added to refs/heads/develop by this push:
     new e1ec847  Icons: Remove FontIcon and ToggleFontIcon as announced some days ago. Use MaterialIcon and MaterialToggleIcon instead (or FontAwesome versions)
e1ec847 is described below

commit e1ec8471ea49b9015353ca27785af273a9dc0aec
Author: Carlos Rovira <ca...@apache.org>
AuthorDate: Fri Apr 3 01:05:05 2020 +0200

    Icons: Remove FontIcon and ToggleFontIcon as announced some days ago. Use MaterialIcon and MaterialToggleIcon instead (or FontAwesome versions)
---
 .../Icons/src/main/resources/icons-manifest.xml    |   2 -
 .../royale/org/apache/royale/icons/FontIcon.as     | 117 --------------------
 .../org/apache/royale/icons/ToggleFontIcon.as      | 121 ---------------------
 3 files changed, 240 deletions(-)

diff --git a/frameworks/projects/Icons/src/main/resources/icons-manifest.xml b/frameworks/projects/Icons/src/main/resources/icons-manifest.xml
index 39e1c2f..5c270a2 100644
--- a/frameworks/projects/Icons/src/main/resources/icons-manifest.xml
+++ b/frameworks/projects/Icons/src/main/resources/icons-manifest.xml
@@ -20,8 +20,6 @@
 
 
 <componentPackage>
-    <component id="FontIcon" class="org.apache.royale.icons.FontIcon"/>
-    <component id="ToggleFontIcon" class="org.apache.royale.icons.ToggleFontIcon"/>
     <component id="MaterialIcon" class="org.apache.royale.icons.MaterialIcon"/>
     <component id="MaterialToggleIcon" class="org.apache.royale.icons.MaterialToggleIcon"/>
     <component id="FontAwesomeIcon" class="org.apache.royale.icons.FontAwesomeIcon"/>
diff --git a/frameworks/projects/Icons/src/main/royale/org/apache/royale/icons/FontIcon.as b/frameworks/projects/Icons/src/main/royale/org/apache/royale/icons/FontIcon.as
deleted file mode 100644
index 7a2a2b6..0000000
--- a/frameworks/projects/Icons/src/main/royale/org/apache/royale/icons/FontIcon.as
+++ /dev/null
@@ -1,117 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  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.royale.icons
-{
-    import org.apache.royale.utils.StringUtil;
-
-    /**
-     *  Icons can be used alone or in buttons and other controls 
-     * 
-     *  This class could be used with any icon family out there and with
-     *  its text property
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10.2
-     *  @playerversion AIR 2.6
-     *  @productversion Royale 0.9.3
-     * 
-     *  @deprecated this class will be removed soon
-     */
-    public class FontIcon extends FontIconBase
-    {
-        /**
-         *  constructor.
-         *
-         *  @langversion 3.0
-         *  @playerversion Flash 10.2
-         *  @playerversion AIR 2.6
-         *  @productversion Royale 0.9.3
-         */
-        public function FontIcon()
-        {
-            super();
-
-            typeNames = "fonticon";
-        }
-        
-        /**
-         *  The text of the icon
-         *  
-         *  @langversion 3.0
-         *  @playerversion Flash 10.2
-         *  @playerversion AIR 2.6
-         *  @productversion Royale 0.9.3
-         */
-        override public function set text(value:String):void
-		{
-            super.text = value;
-
-			COMPILE::JS
-			{
-                textNode.nodeValue = _text;	
-			}
-		}
-
-        /**
-         *  The icon text
-         *  
-         *  @langversion 3.0
-         *  @playerversion Flash 10.2
-         *  @playerversion AIR 2.6
-         *  @productversion Royale 0.9.3
-         */
-        override protected function get iconText():String
-        {
-            return text;
-        }
-
-        private var _material:Boolean;
-        /**
-         *  add class name "material-icons" since in IE11 this font only
-         *  works with that class name strangely. it seems we can avoid this 
-         *  self-hosting the fonts @see https://google.github.io/material-design-icons/
-         *  but we must think if this is or not the right way.
-         *
-         *  @langversion 3.0
-         *  @playerversion Flash 10.2
-         *  @playerversion AIR 2.6
-         *  @productversion Royale 0.9.3
-         */
-        public function get material():Boolean
-        {
-            return _material;
-        }
-        public function set material(value:Boolean):void
-        {
-            if (_material != value)
-            {
-                _material = value;
-
-                typeNames = StringUtil.removeWord(typeNames, " material-icons");
-                typeNames += " material-icons";
-
-                COMPILE::JS
-                {
-                    if (parent)
-                        setClassName(computeFinalClassNames()); 
-                }
-            }
-        }
-    }
-}
diff --git a/frameworks/projects/Icons/src/main/royale/org/apache/royale/icons/ToggleFontIcon.as b/frameworks/projects/Icons/src/main/royale/org/apache/royale/icons/ToggleFontIcon.as
deleted file mode 100644
index ff577a5..0000000
--- a/frameworks/projects/Icons/src/main/royale/org/apache/royale/icons/ToggleFontIcon.as
+++ /dev/null
@@ -1,121 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  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.royale.icons
-{
-    import org.apache.royale.core.ISelectable;
-
-    /**
-     *  Icons can be used alone or in buttons and other controls 
-     * 
-     *  This class could be used with any icon family out there and with
-     *  its text property
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10.2
-     *  @playerversion AIR 2.6
-     *  @productversion Royale 0.9.3
-     * 
-     *  @deprecated this class will be removed soon
-     */
-    public class ToggleFontIcon extends FontIcon implements ISelectable
-    {
-        /**
-         *  constructor.
-         *
-         *  @langversion 3.0
-         *  @playerversion Flash 10.2
-         *  @playerversion AIR 2.6
-         *  @productversion Royale 0.9.3
-         */
-        public function ToggleFontIcon()
-        {
-            super();
-        }
-
-        private var _selected:Boolean = false;
-        
-        /**
-         *  <code>true</code> if the Button is selected.
-         *
-         *  @langversion 3.0
-         *  @playerversion Flash 10.2
-         *  @playerversion AIR 2.6
-         *  @productversion Royale 0.9.3
-         */
-        public function get selected():Boolean
-        {
-            return _selected;
-        }
-
-        /**
-         *  @private
-         */
-        public function set selected(value:Boolean):void
-        {
-            _selected = value;
-            internalSelected();
-        }
-
-        private var _selectedText:String = "";
-        /**
-         *  The selectedText of the icon
-         *  
-         *  @langversion 3.0
-         *  @playerversion Flash 10.2
-         *  @playerversion AIR 2.6
-         *  @productversion Royale 0.9.3
-         */
-		public function get selectedText():String
-		{
-            return _selectedText;            
-		}
-        public function set selectedText(value:String):void
-		{
-            _selectedText = value;
-            internalSelected();
-		}
-
-        override public function set text(value:String):void
-		{
-            _text = value;
-            internalSelected();
-		}
-
-        private function internalSelected():void
-        {
-            COMPILE::JS
-			{
-                textNode.nodeValue = _selected ? _selectedText : _text;	
-			}
-        }
-        
-        /**
-         *  The icon text
-         *  
-         *  @langversion 3.0
-         *  @playerversion Flash 10.2
-         *  @playerversion AIR 2.6
-         *  @productversion Royale 0.9.3
-         */
-        override protected function get iconText():String
-        {
-            return selected ? selectedText : text;
-        }
-    }
-}