You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by ha...@apache.org on 2026/02/22 14:38:02 UTC

(royale-asjs) branch develop updated: added overflow

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

harbs 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 5e6e90df84 added overflow
5e6e90df84 is described below

commit 5e6e90df84788ef0f5fc0ba5ccaf265670645683
Author: Harbs <ha...@in-tools.com>
AuthorDate: Sun Feb 22 16:37:56 2026 +0200

    added overflow
---
 .../Style/src/main/resources/basic-manifest.xml    |  1 +
 .../apache/royale/style/stylebeads/HeightStyle.as  |  2 +-
 .../apache/royale/style/stylebeads/MaxHeight.as    |  2 +-
 .../org/apache/royale/style/stylebeads/MaxWidth.as |  2 +-
 .../apache/royale/style/stylebeads/MinHeight.as    |  2 +-
 .../org/apache/royale/style/stylebeads/MinWidth.as |  2 +-
 .../royale/style/stylebeads/OverflowStyle.as       | 88 ++++++++++++++++++++++
 .../royale/style/stylebeads/PositionStyle.as       |  2 +-
 .../apache/royale/style/stylebeads/SizeStyle.as    |  2 +-
 .../apache/royale/style/stylebeads/WidthStyle.as   |  2 +-
 10 files changed, 97 insertions(+), 8 deletions(-)

diff --git a/frameworks/projects/Style/src/main/resources/basic-manifest.xml b/frameworks/projects/Style/src/main/resources/basic-manifest.xml
index 9125edab90..5d1357bbc5 100644
--- a/frameworks/projects/Style/src/main/resources/basic-manifest.xml
+++ b/frameworks/projects/Style/src/main/resources/basic-manifest.xml
@@ -27,6 +27,7 @@
   <component id="MaxWidth" class="org.apache.royale.style.stylebeads.MaxWidth"/>
   <component id="MinHeight" class="org.apache.royale.style.stylebeads.MinHeight"/>
   <component id="MinWidth" class="org.apache.royale.style.stylebeads.MinWidth"/>
+  <component id="OverflowStyle" class="org.apache.royale.style.stylebeads.OverflowStyle"/>
   <component id="PositionStyle" class="org.apache.royale.style.stylebeads.PositionStyle"/>
   <component id="SizeStyle" class="org.apache.royale.style.stylebeads.SizeStyle"/>
   <component id="WidthStyle" class="org.apache.royale.style.stylebeads.WidthStyle"/>
diff --git a/frameworks/projects/Style/src/main/royale/org/apache/royale/style/stylebeads/HeightStyle.as b/frameworks/projects/Style/src/main/royale/org/apache/royale/style/stylebeads/HeightStyle.as
index 4c821e06cf..1a5700f09d 100644
--- a/frameworks/projects/Style/src/main/royale/org/apache/royale/style/stylebeads/HeightStyle.as
+++ b/frameworks/projects/Style/src/main/royale/org/apache/royale/style/stylebeads/HeightStyle.as
@@ -25,7 +25,7 @@ package org.apache.royale.style.stylebeads
 			super();
 		}
 
-		[[Inspectable(category="General", enumeration="max-content,min-content,fit-content,stretch,none,65ch,640px,768px,1024px,1280px,1536px", defaultValue="none")]]
+		[Inspectable(category="General", enumeration="max-content,min-content,fit-content,stretch,none,65ch,640px,768px,1024px,1280px,1536px", defaultValue="none")]
 		public function get fit():String
 		{
 			return _strVal;
diff --git a/frameworks/projects/Style/src/main/royale/org/apache/royale/style/stylebeads/MaxHeight.as b/frameworks/projects/Style/src/main/royale/org/apache/royale/style/stylebeads/MaxHeight.as
index bf023d6d83..d5720cf6c5 100644
--- a/frameworks/projects/Style/src/main/royale/org/apache/royale/style/stylebeads/MaxHeight.as
+++ b/frameworks/projects/Style/src/main/royale/org/apache/royale/style/stylebeads/MaxHeight.as
@@ -25,7 +25,7 @@ package org.apache.royale.style.stylebeads
 			super();
 		}
 
-		[[Inspectable(category="General", enumeration="max-content,min-content,fit-content,stretch,none", defaultValue="none")]]
+		[Inspectable(category="General", enumeration="max-content,min-content,fit-content,stretch,none", defaultValue="none")]
 		public function get fit():String
 		{
 			return _strVal;
diff --git a/frameworks/projects/Style/src/main/royale/org/apache/royale/style/stylebeads/MaxWidth.as b/frameworks/projects/Style/src/main/royale/org/apache/royale/style/stylebeads/MaxWidth.as
index 7fc4fb6197..6de05a1c44 100644
--- a/frameworks/projects/Style/src/main/royale/org/apache/royale/style/stylebeads/MaxWidth.as
+++ b/frameworks/projects/Style/src/main/royale/org/apache/royale/style/stylebeads/MaxWidth.as
@@ -31,7 +31,7 @@ package org.apache.royale.style.stylebeads
 			super();
 		}
 
-		[[Inspectable(category="General", enumeration="max-content,min-content,fit-content,stretch,none,65ch,640px,768px,1024px,1280px,1536px", defaultValue="none")]]
+		[Inspectable(category="General", enumeration="max-content,min-content,fit-content,stretch,none,65ch,640px,768px,1024px,1280px,1536px", defaultValue="none")]
 		public function get fit():String
 		{
 			return _strVal;
diff --git a/frameworks/projects/Style/src/main/royale/org/apache/royale/style/stylebeads/MinHeight.as b/frameworks/projects/Style/src/main/royale/org/apache/royale/style/stylebeads/MinHeight.as
index d3761c40dd..85075a6831 100644
--- a/frameworks/projects/Style/src/main/royale/org/apache/royale/style/stylebeads/MinHeight.as
+++ b/frameworks/projects/Style/src/main/royale/org/apache/royale/style/stylebeads/MinHeight.as
@@ -25,7 +25,7 @@ package org.apache.royale.style.stylebeads
 			super();
 		}
 
-		[[Inspectable(category="General", enumeration="max-content,min-content,fit-content,stretch,none,65ch,640px,768px,1024px,1280px,1536px", defaultValue="none")]]
+		[Inspectable(category="General", enumeration="max-content,min-content,fit-content,stretch,none,65ch,640px,768px,1024px,1280px,1536px", defaultValue="none")]
 		public function get fit():String
 		{
 			return _strVal;
diff --git a/frameworks/projects/Style/src/main/royale/org/apache/royale/style/stylebeads/MinWidth.as b/frameworks/projects/Style/src/main/royale/org/apache/royale/style/stylebeads/MinWidth.as
index 3b987524b3..386c1d501f 100644
--- a/frameworks/projects/Style/src/main/royale/org/apache/royale/style/stylebeads/MinWidth.as
+++ b/frameworks/projects/Style/src/main/royale/org/apache/royale/style/stylebeads/MinWidth.as
@@ -31,7 +31,7 @@ package org.apache.royale.style.stylebeads
 			super();
 		}
 
-		[[Inspectable(category="General", enumeration="max-content,min-content,fit-content,stretch,none,65ch,640px,768px,1024px,1280px,1536px", defaultValue="none")]]
+		[Inspectable(category="General", enumeration="max-content,min-content,fit-content,stretch,none,65ch,640px,768px,1024px,1280px,1536px", defaultValue="none")]
 		public function get fit():String
 		{
 			return _strVal;
diff --git a/frameworks/projects/Style/src/main/royale/org/apache/royale/style/stylebeads/OverflowStyle.as b/frameworks/projects/Style/src/main/royale/org/apache/royale/style/stylebeads/OverflowStyle.as
new file mode 100644
index 0000000000..51c3746a09
--- /dev/null
+++ b/frameworks/projects/Style/src/main/royale/org/apache/royale/style/stylebeads/OverflowStyle.as
@@ -0,0 +1,88 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.style.stylebeads
+{
+	import org.apache.royale.core.IBead;
+	import org.apache.royale.core.IUIBase;
+
+	/**
+	 *  The ScrollStyle class is a StyleBead that applies scroll behavior to a component.
+	 *  It allows you to specify how overflow content should be handled, such as whether to
+	 *  show scrollbars, hide overflow, or allow content to be visible outside the component's bounds.
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10.2
+	 *  @playerversion AIR 2.6
+	 *  @productversion Royale 0.9.13
+	 */
+	public class OverflowStyle extends StyleBeadBase
+	{
+		public function OverflowStyle()
+		{
+			super();
+		}
+
+		private var _overflowX:String = "visible";
+		[Inspectable(category = "General", enumeration = "visible,hidden,scroll,auto", defaultValue = "visible")]
+			public function get overflowX():String
+			{
+				return _overflowX;
+			}
+
+			public function set overflowX(value:String):void
+			{
+				_overflowX = value;
+			}
+			private var _overflowY:String = "visible";
+		[Inspectable(category = "General", enumeration = "visible,hidden,scroll,auto", defaultValue = "visible")]
+			public function get overflowY():String
+			{
+				return _overflowY;
+			}
+
+			public function set overflowY(value:String):void
+			{
+				_overflowY = value;
+			}
+			private const selectorName:String = "overflow";
+			override public function get selectors():Array
+			{
+				var s:String = selectorName;
+				if (overflowX == overflowY)
+					return ["." + s + "-" + overflowX];
+
+				return [
+					"." + s + "-x-" + overflowX,
+					"." + s + "-y-" + overflowY
+				];
+			}
+
+			override public function get rules():Array
+			{
+				var s:String = selectorName;
+				if (overflowX == overflowY)
+					return ["." + s + ":" + overflowX + ";"];
+
+				return [
+					s + "-x:" + overflowX + ";",
+					s + "-y:" + overflowY + ";"
+				];
+			}
+
+		}
+	}
\ No newline at end of file
diff --git a/frameworks/projects/Style/src/main/royale/org/apache/royale/style/stylebeads/PositionStyle.as b/frameworks/projects/Style/src/main/royale/org/apache/royale/style/stylebeads/PositionStyle.as
index 88aa703b5b..b26f03b2ce 100644
--- a/frameworks/projects/Style/src/main/royale/org/apache/royale/style/stylebeads/PositionStyle.as
+++ b/frameworks/projects/Style/src/main/royale/org/apache/royale/style/stylebeads/PositionStyle.as
@@ -27,7 +27,7 @@ package org.apache.royale.style.stylebeads
 
 		private var _value:String;
 		
-		[[Inspectable(category="General", enumeration="static,fixed,absolute,relative,sticky", defaultValue="absolute")]]
+		[Inspectable(category="General", enumeration="static,fixed,absolute,relative,sticky", defaultValue="absolute")]
 		public function get value():String
 		{
 			return _value;
diff --git a/frameworks/projects/Style/src/main/royale/org/apache/royale/style/stylebeads/SizeStyle.as b/frameworks/projects/Style/src/main/royale/org/apache/royale/style/stylebeads/SizeStyle.as
index b36b329f81..6a251c7ac3 100644
--- a/frameworks/projects/Style/src/main/royale/org/apache/royale/style/stylebeads/SizeStyle.as
+++ b/frameworks/projects/Style/src/main/royale/org/apache/royale/style/stylebeads/SizeStyle.as
@@ -25,7 +25,7 @@ package org.apache.royale.style.stylebeads
 			super();
 		}
 
-		[[Inspectable(category="General", enumeration="max-content,min-content,fit-content,stretch,none,65ch,640px,768px,1024px,1280px,1536px", defaultValue="none")]]
+		[Inspectable(category="General", enumeration="max-content,min-content,fit-content,stretch,none,65ch,640px,768px,1024px,1280px,1536px", defaultValue="none")]
 		public function get fit():String
 		{
 			return _strVal;
diff --git a/frameworks/projects/Style/src/main/royale/org/apache/royale/style/stylebeads/WidthStyle.as b/frameworks/projects/Style/src/main/royale/org/apache/royale/style/stylebeads/WidthStyle.as
index fcced82554..2ccccb2fc4 100644
--- a/frameworks/projects/Style/src/main/royale/org/apache/royale/style/stylebeads/WidthStyle.as
+++ b/frameworks/projects/Style/src/main/royale/org/apache/royale/style/stylebeads/WidthStyle.as
@@ -25,7 +25,7 @@ package org.apache.royale.style.stylebeads
 			super();
 		}
 
-		[[Inspectable(category="General", enumeration="max-content,min-content,fit-content,stretch,none,65ch,640px,768px,1024px,1280px,1536px", defaultValue="none")]]
+		[Inspectable(category="General", enumeration="max-content,min-content,fit-content,stretch,none,65ch,640px,768px,1024px,1280px,1536px", defaultValue="none")]
 		public function get fit():String
 		{
 			return _strVal;