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 2018/03/31 10:35:00 UTC
[royale-asjs] branch feature/jewel-ui-set updated: basic jewel
alert finished now needs theme coloring
This is an automated email from the ASF dual-hosted git repository.
carlosrovira pushed a commit to branch feature/jewel-ui-set
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git
The following commit(s) were added to refs/heads/feature/jewel-ui-set by this push:
new 13ead95 basic jewel alert finished now needs theme coloring
13ead95 is described below
commit 13ead9514374c22ac96b63c6cff5398e63e28cd4
Author: Carlos Rovira <ca...@apache.org>
AuthorDate: Sat Mar 31 12:34:56 2018 +0200
basic jewel alert finished now needs theme coloring
---
.../projects/Jewel/src/main/resources/defaults.css | 8 ++-
.../projects/Jewel/src/main/royale/JewelClasses.as | 1 +
.../royale/jewel/beads/layouts/HorizontalLayout.as | 2 +-
.../jewel/beads/views/AlertTitleBarView.mxml | 57 ++++++++++++++++++++++
.../apache/royale/jewel/beads/views/AlertView.as | 3 ++
.../projects/Jewel/src/main/sass/_global.sass | 2 +-
.../Jewel/src/main/sass/components/_alert.sass | 5 +-
.../Jewel/src/main/sass/components/_titlebar.sass | 1 -
8 files changed, 73 insertions(+), 6 deletions(-)
diff --git a/frameworks/projects/Jewel/src/main/resources/defaults.css b/frameworks/projects/Jewel/src/main/resources/defaults.css
index 2aa6697..81d048a 100644
--- a/frameworks/projects/Jewel/src/main/resources/defaults.css
+++ b/frameworks/projects/Jewel/src/main/resources/defaults.css
@@ -20,7 +20,7 @@
display: block;
}
.layout.horizontal > * {
- display: inline-block !important;
+ display: inline-block;
}
.layout.vertical {
@@ -88,10 +88,14 @@
.jewel.alert .jewel.controlbar {
padding: 0px 14px 14px 14px;
position: absolute;
- right: 0;
+ left: 50%;
+ transform: translate(-50%, 0%);
bottom: 0;
height: 50px;
}
+.jewel.alert .jewel.controlbar > *:first-child {
+ margin-left: 0px;
+}
.jewel.alert .jewel.controlbar > * {
margin-left: 6px;
}
diff --git a/frameworks/projects/Jewel/src/main/royale/JewelClasses.as b/frameworks/projects/Jewel/src/main/royale/JewelClasses.as
index 300f270..d2be88b 100644
--- a/frameworks/projects/Jewel/src/main/royale/JewelClasses.as
+++ b/frameworks/projects/Jewel/src/main/royale/JewelClasses.as
@@ -35,6 +35,7 @@ package
import org.apache.royale.jewel.beads.controllers.AlertController; AlertController;
import org.apache.royale.jewel.beads.views.AlertView; AlertView;
import org.apache.royale.jewel.beads.views.TitleBarView; TitleBarView;
+ import org.apache.royale.jewel.beads.views.AlertTitleBarView; AlertTitleBarView;
COMPILE::SWF
{
diff --git a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/layouts/HorizontalLayout.as b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/layouts/HorizontalLayout.as
index 5ec7691..c9673c8 100644
--- a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/layouts/HorizontalLayout.as
+++ b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/layouts/HorizontalLayout.as
@@ -152,7 +152,7 @@ package org.apache.royale.jewel.beads.layouts
* }
*
* .layout.horizontal > * {
- * display: inline-block !important;
+ * display: inline-block;
* }
*/
diff --git a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/views/AlertTitleBarView.mxml b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/views/AlertTitleBarView.mxml
new file mode 100644
index 0000000..8bd1ef3
--- /dev/null
+++ b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/views/AlertTitleBarView.mxml
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+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.
+
+-->
+<!---
+ The AlertTitleBarView is the view for a Jewel TitleBar used on Alert written in MXML
+
+ @langversion 3.0
+ @playerversion Flash 10.2
+ @playerversion AIR 2.6
+ @productversion Royale 0.9.3
+-->
+<js:MXMLBeadView xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:js="library://ns.apache.org/royale/basic"
+ xmlns:j="library://ns.apache.org/royale/jewel">
+
+ <fx:Script>
+ <![CDATA[
+ import org.apache.royale.core.ITitleBarModel;
+ import org.apache.royale.events.IEventDispatcher;
+ import org.apache.royale.events.CloseEvent;
+
+ private function clickHandler():void
+ {
+ var newEvent:Event = new Event('close');
+ //var closeEvent:CloseEvent = new CloseEvent("close", false, false, buttonFlag);
+ IEventDispatcher(_strand).dispatchEvent(newEvent)
+ }
+ ]]>
+ </fx:Script>
+
+ <js:beads>
+ <js:MXMLBeadViewDataBinding />
+ <js:LayoutChangeNotifier watchedProperty="{titleLabel.text}" />
+ </js:beads>
+
+ <j:Label id="titleLabel" text="{ITitleBarModel(model).title}"/>
+
+ <j:Button id="closeButton" click="clickHandler()" className="closebutton"
+ visible="{ITitleBarModel(model).showCloseButton}"/>
+
+</js:MXMLBeadView>
diff --git a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/views/AlertView.as b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/views/AlertView.as
index a028027..9c58e64 100644
--- a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/views/AlertView.as
+++ b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/views/AlertView.as
@@ -38,6 +38,7 @@ package org.apache.royale.jewel.beads.views
import org.apache.royale.jewel.TitleBar;
import org.apache.royale.jewel.ControlBar;
import org.apache.royale.jewel.beads.layouts.HorizontalLayoutSpaceBetween;
+ import org.apache.royale.jewel.beads.views.AlertTitleBarView;
COMPILE::SWF
{
@@ -126,7 +127,9 @@ package org.apache.royale.jewel.beads.views
// TitleBar
titleBar = new TitleBar();
titleBar.addBead(new HorizontalLayoutSpaceBetween());
+ titleBar.addBead(new AlertTitleBarView());
titleBar.title = alertModel.title;
+ //titleBar.showCloseButton = true;
IParent(_strand).addElement(titleBar);
// Text
diff --git a/frameworks/projects/Jewel/src/main/sass/_global.sass b/frameworks/projects/Jewel/src/main/sass/_global.sass
index 451e01d..19b9d16 100644
--- a/frameworks/projects/Jewel/src/main/sass/_global.sass
+++ b/frameworks/projects/Jewel/src/main/sass/_global.sass
@@ -23,7 +23,7 @@
white-space: nowrap
display: block
> *
- display: inline-block !important
+ display: inline-block
.layout.vertical
vertical-align: top
> *
diff --git a/frameworks/projects/Jewel/src/main/sass/components/_alert.sass b/frameworks/projects/Jewel/src/main/sass/components/_alert.sass
index 63121ba..4635740 100644
--- a/frameworks/projects/Jewel/src/main/sass/components/_alert.sass
+++ b/frameworks/projects/Jewel/src/main/sass/components/_alert.sass
@@ -71,10 +71,13 @@
.jewel.controlbar
padding: 0px 14px 14px 14px
position: absolute
- right: 50%
+ left: 50%
+ transform: translate(-50%, 0%)
bottom: 0
height: 50px
+ > *:first-child
+ margin-left: 0px
> *
margin-left: 6px
diff --git a/frameworks/projects/Jewel/src/main/sass/components/_titlebar.sass b/frameworks/projects/Jewel/src/main/sass/components/_titlebar.sass
index 1f3d6f1..49eca6d 100644
--- a/frameworks/projects/Jewel/src/main/sass/components/_titlebar.sass
+++ b/frameworks/projects/Jewel/src/main/sass/components/_titlebar.sass
@@ -25,7 +25,6 @@
j|TitleBar
IBeadModel: ClassReference("org.apache.royale.html.beads.models.TitleBarModel")
IBeadLayout: ClassReference("org.apache.royale.jewel.beads.layouts.HorizontalLayout")
- //IBeadLayout: ClassReference("org.apache.royale.jewel.beads.layouts.HorizontalLayoutSpaceBetween")
IBeadView: ClassReference("org.apache.royale.jewel.beads.views.TitleBarView")
@media -royale-swf
--
To stop receiving notification emails like this one, please contact
carlosrovira@apache.org.