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

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


The following commit(s) were added to refs/heads/color_picker by this push:
     new 494cba4  Some layout improvements to ColorPickerPopUpWithPalette, but 
this class should probably not be in the SDK anyway, consider removing.
494cba4 is described below

commit 494cba471f74378f0c16983100714f5dbc19e256
Author: DESKTOP-RH4S838\Yishay <[email protected]>
AuthorDate: Sun May 12 11:51:23 2019 +0300

    Some layout improvements to ColorPickerPopUpWithPalette, but this class 
should probably not be in the SDK anyway, consider removing.
---
 .../supportClasses/ColorPickerPopUpWithPalette.as   | 21 +++++++++++----------
 1 file changed, 11 insertions(+), 10 deletions(-)

diff --git 
a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/supportClasses/ColorPickerPopUpWithPalette.as
 
b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/supportClasses/ColorPickerPopUpWithPalette.as
index bcaf3df..11f56eb 100644
--- 
a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/supportClasses/ColorPickerPopUpWithPalette.as
+++ 
b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/supportClasses/ColorPickerPopUpWithPalette.as
@@ -19,6 +19,8 @@
 package org.apache.royale.html.supportClasses
 {
        import org.apache.royale.events.Event;
+       import org.apache.royale.html.beads.layouts.TileLayout;
+       import org.apache.royale.utils.loadBeadFromValuesManager;
 
        /**
         *  The ColorPickerPopUpWithPalette class is used in ColorPicker. It 
contains a set of controls for picking a color, incluse a color palette.
@@ -45,13 +47,18 @@ package org.apache.royale.html.supportClasses
                {
                        super();
                        colorPalette = new ColorPalette();
+                       var colorPaletteLayout:TileLayout = 
loadBeadFromValuesManager(TileLayout, "iBeadLayout", colorPalette) as 
TileLayout;
+                       colorPaletteLayout.rowHeight = 
colorPaletteLayout.columnWidth = 30;
+                       var pwidth:Number = 300;
+                       var margin:Number = 10;
+                       colorPalette.width =  pwidth;
+                       colorSpectrum.x = pwidth + margin;
                        COMPILE::JS 
                        {
-                               colorPalette.element.style.position = 
"absolute";
+                               colorSpectrum.element.style.position = 
"absolute";
                        }
-                       colorPalette.y = colorSpectrum.height + 10;
-                       colorPalette.x = colorSpectrum.x;
-                       colorPalette.width =  300;
+                       hueSelector.x += pwidth + margin;
+                       
                }
                
                override public function set model(value:Object):void
@@ -63,11 +70,5 @@ package org.apache.royale.html.supportClasses
                                addElement(colorPalette);
                        }
                }
-               
-               override public function addedToParent():void
-               {
-                       super.addedToParent();
-                       colorPalette.dispatchEvent(new Event('layoutNeeded'));
-               }
        }
 }

Reply via email to