This is an automated email from the ASF dual-hosted git repository.
pent pushed a commit to branch feature/MXRoyale
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git
The following commit(s) were added to refs/heads/feature/MXRoyale by this push:
new af91400 Better looking Button. Still need to address labelPlacement.
af91400 is described below
commit af9140016f4eeac5a5d940db9c0637ba464d4e45
Author: Peter Ent <[email protected]>
AuthorDate: Tue Mar 27 17:23:30 2018 -0400
Better looking Button. Still need to address labelPlacement.
---
frameworks/projects/MXRoyale/src/main/royale/mx/controls/Button.as | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/Button.as
b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/Button.as
index a67f2b9..d8bacec 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/Button.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/Button.as
@@ -599,7 +599,7 @@ public class Button extends UIComponent implements
IDataRenderer
element.innerHTML = label;
}
if (icon != null) {
- element.style.background = "url('"+icon+"') no-repeat
center "+(labelPlacement == "right" ? "left" : "right");
+ element.style.background = "url('"+icon+"') no-repeat
2px center";
// since the load of a CSS background-image cannot be
detected, a standard technique
// is to create a dummy <img> and load the same image
and listen for that to
@@ -621,7 +621,7 @@ public class Button extends UIComponent implements
IDataRenderer
private function handleImageLoaded2(event:BrowserEvent):void
{
var img:HTMLImageElement = event.target as HTMLImageElement;
- element.style["padding-left"] = String(img.naturalWidth+2)+"px";
+ element.style["padding-left"] = String(img.naturalWidth+4)+"px";
this.height = Math.max(img.naturalHeight, element.offsetHeight);
--
To stop receiving notification emails like this one, please contact
[email protected].