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 2018/06/04 09:17:18 UTC
[royale-asjs] branch develop updated: CloseButton uses SVG
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 88fc131 CloseButton uses SVG
88fc131 is described below
commit 88fc131acba120c0dd666b9a56a5d7bc062e1e78
Author: Harbs <ha...@in-tools.com>
AuthorDate: Mon Jun 4 12:17:10 2018 +0300
CloseButton uses SVG
Fixed class selectors
(TitleBar CloseButton selector needs to be fixed in the compiler)
---
.../projects/Basic/src/main/resources/defaults.css | 6 -----
.../royale/org/apache/royale/html/CloseButton.as | 26 ++++++++++------------
frameworks/themes/Basic/src/basic.css | 13 +++++++++++
3 files changed, 25 insertions(+), 20 deletions(-)
diff --git a/frameworks/projects/Basic/src/main/resources/defaults.css b/frameworks/projects/Basic/src/main/resources/defaults.css
index 153c6bf..5ba8f28 100644
--- a/frameworks/projects/Basic/src/main/resources/defaults.css
+++ b/frameworks/projects/Basic/src/main/resources/defaults.css
@@ -693,12 +693,6 @@ TitleBar
min-height: 30px;
}
-TitleBar .TitleBarCloseButton {
- width: 16px;
- height: 16px;
- margin: 0px;
-}
-
ToolTip
{
background-color: #FFFFCC;
diff --git a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/CloseButton.as b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/CloseButton.as
index e93fcd7..92ade63 100644
--- a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/CloseButton.as
+++ b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/CloseButton.as
@@ -20,7 +20,8 @@ package org.apache.royale.html
{
COMPILE::JS
{
- import org.apache.royale.core.WrappedHTMLElement;
+ import org.apache.royale.core.WrappedHTMLElement;
+ import org.apache.royale.html.util.addElementToWrapper;
}
/**
@@ -45,22 +46,19 @@ package org.apache.royale.html
public function CloseButton()
{
super();
+ typeNames = "Button CloseButton";
}
-
- /**
- * @royaleignorecoercion org.apache.royale.core.WrappedHTMLElement
- */
- COMPILE::JS
+
+ COMPILE::JS
override protected function createElement():WrappedHTMLElement
{
- super.createElement();
- element.textContent = 'x';
-
- element.style.padding = 0;
- height = 11;
- width = 11;
+ addElementToWrapper(this,'button');
+ element.setAttribute('type', 'button');
+ element.style.lineHeight = "0";
+ element.style.padding = "0";
+ var data:String = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA2MCA2MCI+PHBvbHlnb24gcG9pbnRzPSI2MCA2LjIyIDUzLjc4IDAgMzAgMjMuNzcgNi4yMiAwIDAgNi4yMiAyMy43OCAzMCAwIDUzLjc4IDYuMjIgNjAgMzAgMzYuMjMgNTMuNzggNjAgNjAgNTMuNzggMzYuMjIgMzAgNjAgNi4yMiIvPjwvc3ZnPg==';
+ element.innerHTML = "<img style='height:60%;width:60%' src='" + data + "'/>";
return element;
- }
-
+ }
}
}
diff --git a/frameworks/themes/Basic/src/basic.css b/frameworks/themes/Basic/src/basic.css
index f27dab9..ade9e0c 100644
--- a/frameworks/themes/Basic/src/basic.css
+++ b/frameworks/themes/Basic/src/basic.css
@@ -42,6 +42,19 @@ Button:active
padding: 4px;
}
+CloseButton
+{
+ width: 12px;
+ height: 12px;
+}
+
+TitleBar CloseButton
+{
+ width: 16px;
+ height: 16px;
+ margin: 0px;
+}
+
CheckBox
{
font-size: 12px;
--
To stop receiving notification emails like this one, please contact
harbs@apache.org.