Skip to content

Commit

Permalink
Min and Max Button width is set in Pod
Browse files Browse the repository at this point in the history
Animation Effect in restore removed by setting parallel duration
Property
Skins which are not used are removed

Change-Id: I75fa50fc47dcef642712143fd9534385b7b3a628
  • Loading branch information
sanjay1909 committed Oct 9, 2012
1 parent f0c1200 commit 2fe424a
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 219 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import spark.effects.Resize;

public class PodLayoutManager extends EventDispatcher
{
public var effectDuration:int = 1000; // added for Weave
public var effectDuration:int = 10; // added for Weave

public var id:String;
public var items:Array = new Array(); // Stores the pods which are not minimized.
Expand Down Expand Up @@ -156,7 +156,9 @@ public class PodLayoutManager extends EventDispatcher
{
var pod:Pod = Pod(e.currentTarget);
maximizeParallel = new Parallel();

maximizeParallel.duration = effectDuration;

addResizeAndMoveToParallel(pod, maximizeParallel, availablePodWidth, availableMaximizedPodHeight, 0, 0);
maximizeParallel.play();

Expand Down Expand Up @@ -195,6 +197,8 @@ public class PodLayoutManager extends EventDispatcher

maximizedPod = null;
maximizeParallel = new Parallel();
//Weave: Added for Weave to speed up the restore
maximizeParallel.duration = effectDuration;
var point:Point = Point(gridPoints[pod.index]);
addResizeAndMoveToParallel(pod, maximizeParallel, itemWidth, itemHeight, point.x, point.y);
maximizeParallel.play();
Expand Down
104 changes: 0 additions & 104 deletions WeaveUISpark/src/com/adobe/devnet/skins/CustomButtonBarButtonSkin.mxml

This file was deleted.

100 changes: 0 additions & 100 deletions WeaveUISpark/src/com/adobe/devnet/skins/CustomListSkin.mxml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
in accordance with the terms of the license agreement accompanying it.
-->
<!--Modified for Weave 10/9/2012
url for the original code = http://www.adobe.com/devnet/flex/articles/migrating-flex-apps-part4.html-->

<!--- The default skin class for a Spark ToggleButton component.
Expand Down Expand Up @@ -44,16 +46,16 @@
<s:State name="downAndSelected" stateGroups="downStates, selectedStates" />
<s:State name="disabledAndSelected" stateGroups="selectedUpStates, disabledStates, selectedStates" />
</s:states>

<s:BitmapImage includeIn="up, down" width="14" height="14"
<!-- Weave: Width and height takes its value set in Pod -->
<s:BitmapImage includeIn="up, down" width="100%" height="100%"
source="@Embed(source='/com/adobe/devnet/assets/maximize_up.png')"/>

<s:BitmapImage includeIn="over" width="14" height="14"
<s:BitmapImage includeIn="over" width="100%" height="100%"
source="@Embed(source='/com/adobe/devnet/assets/maximize_over.png')"/>

<s:BitmapImage includeIn="upAndSelected, downAndSelected" width="14"
height="14" source="@Embed(source='/com/adobe/devnet/assets/restore_up.png')"/>
<s:BitmapImage includeIn="upAndSelected, downAndSelected" width="100%" height="100%"
source="@Embed(source='/com/adobe/devnet/assets/restore_up.png')"/>

<s:BitmapImage includeIn="overAndSelected" width="14" height="14"
<s:BitmapImage includeIn="overAndSelected" width="100%" height="100%"
source="@Embed(source='/com/adobe/devnet/assets/restore_over.png')"/>
</s:SparkSkin>
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
-->

<!--Modified for Weave 10/9/2012
url for the original code = http://www.adobe.com/devnet/flex/articles/migrating-flex-apps-part4.html-->

<!--- The default skin class for the Spark Button component.
@see spark.components.Button
Expand All @@ -32,6 +35,7 @@
[HostComponent("spark.components.Button")]
]]>
</fx:Metadata>


<!-- states -->
<s:states>
Expand All @@ -40,10 +44,10 @@
<s:State name="down" />
<s:State name="disabled" />
</s:states>
<s:BitmapImage includeIn="up, down" width="14" height="14"
<!-- Weave: Width and height takes its value set in Pod -->
<s:BitmapImage includeIn="up, down" width="100%" height="100%"
source="@Embed(source='/com/adobe/devnet/assets/minimize_up.png')"/>
<s:BitmapImage includeIn="over" width="14" height="14"
<!-- Weave: Width and height takes its value set in Pod -->
<s:BitmapImage includeIn="over" width="100%" height="100%"
source="@Embed(source='/com/adobe/devnet/assets/minimize_over.png')"/>
</s:SparkSkin>
16 changes: 12 additions & 4 deletions WeaveUISpark/src/com/adobe/devnet/skins/CustomPanelSkin.mxml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,20 @@ in accordance with the terms of the license agreement accompanying it.
-->
<s:SparkSkin xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:fb="http://ns.adobe.com/flashbuilder/2009" blendMode="normal" mouseEnabled="false"
minWidth="131" minHeight="127" alpha.disabled="0.5" alpha.disabledWithControlBar="0.5">
<fx:Metadata>[HostComponent("com.adobe.devnet.view.Pod")]</fx:Metadata>
minWidth="131" minHeight="127" alpha.disabled="0.5" alpha.disabledWithControlBar="0.5" >
<fx:Metadata>
[HostComponent("com.adobe.devnet.view.Pod")]
</fx:Metadata>

<fx:Script fb:purpose="styling">
//Modified for Weave 10/9/2012
// url for the original code = http://www.adobe.com/devnet/flex/articles/migrating-flex-apps-part4.html

/* Define the skin elements that should not be colorized.
For panel, border and title background are skinned, but the content area and title text are not. */
static private const exclusions:Array = ["background", "titleDisplay", "contentGroup", "controlBarGroup"];



/**
* @private
Expand Down Expand Up @@ -234,9 +241,10 @@ in accordance with the terms of the license agreement accompanying it.

<s:HGroup id="controlsHolder" right="9" top="4"
horizontalAlign="right" verticalAlign="middle" gap="3">
<s:Button id="minimizeButton"
<!-- Weave: Width and height takes its value set in Pod -->
<s:Button id="minimizeButton" width="{this.hostComponent.button_width}" height="{this.hostComponent.button_height}"
skinClass="com.adobe.devnet.skins.CustomMinimizeButtonSkin"/>
<s:ToggleButton id="maximizeRestoreButton"
<s:ToggleButton id="maximizeRestoreButton" width="{this.hostComponent.button_width}" height="{this.hostComponent.button_height}"
skinClass="com.adobe.devnet.skins.CustomMaximizeButtonSkin"/>
</s:HGroup>
</s:Group>
Expand Down
3 changes: 3 additions & 0 deletions WeaveUISpark/src/com/adobe/devnet/view/Pod.as
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ public class Pod extends SkinnableContainer
public static const WINDOW_STATE_MINIMIZED:Number = 0;
public static const WINDOW_STATE_MAXIMIZED:Number = 1;

public var button_width:Number = 18;
public var button_height:Number = 18;

public var windowState:Number; // Corresponds to one of the WINDOW_STATE variables.
public var index:Number; // Index within the layout.

Expand Down

0 comments on commit 2fe424a

Please sign in to comment.