Author: max
Date: 2006-11-15 12:28:51 -0800 (Wed, 15 Nov 2006)
New Revision: 2539
Modified:
openlaszlo/branches/legals/lps/components/incubator/custombutton.lzx
Log:
Change 20061115-maxcarlson-B by [EMAIL PROTECTED] on 2006-11-15 11:56:05 PST
in /Users/maxcarlson/openlaszlo/legals
Summary: Fix incubator/custombutton in dhtml and swf
New Features:
Bugs Fixed: LPP-2262 - incubator/custombutton doesn't render correctly in
Legals PR1 SWF
Technical Reviewer: promanik
QA Reviewer: [EMAIL PROTECTED]
Doc Reviewer: (pending)
Documentation:
Release Notes:
Details:
Tests:
Files:
M lps/components/incubator/custombutton.lzx
Changeset:
http://svn.openlaszlo.org/openlaszlo/patches/20061115-maxcarlson-B.tar
Modified: openlaszlo/branches/legals/lps/components/incubator/custombutton.lzx
===================================================================
--- openlaszlo/branches/legals/lps/components/incubator/custombutton.lzx
2006-11-15 20:04:53 UTC (rev 2538)
+++ openlaszlo/branches/legals/lps/components/incubator/custombutton.lzx
2006-11-15 20:28:51 UTC (rev 2539)
@@ -40,7 +40,7 @@
the iconname should be that resource name, without the "_icon_rsc"
-->
<class name="custombutton" extends="basebutton" focusable="true"
- resourceviewcount="3" doesenter="true"
style="$once{custombutton_style}" styleable="true"
+ resourceviewcount="3" doesenter="true" styleable="true"
height="18" fontsize="10">
<!-- text attributes -->
@@ -72,15 +72,9 @@
<!-- button background -->
<!-- have to use placeholder resources so that basebutton initializes
correctly -->
- <view name="left" resource="transparent_button_rsc"
height="${parent.height}" x="0" stretches="height"
visible="$once{classroot.leftrsc != ''}">
- <method event="onload">this.updateResourceSize();</method>
- </view>
- <view name="middle" resource="transparent_button_rsc"
height="${parent.height}" x="${parent.left.width}"
width="${parent.width-parent.left.width-parent.right.width}" stretches="both">
- <method event="onload">this.updateResourceSize();</method>
- </view>
- <view name="right" resource="transparent_button_rsc"
height="${parent.height}" x="${parent.width-width}" stretches="height"
visible="$once{classroot.rightrsc != ''}">
- <method event="onload">this.updateResourceSize();</method>
- </view>
+ <view name="left" resource="transparent_button_rsc"
height="${parent.height}" x="0" stretches="height"
visible="$once{classroot.leftrsc != ''}"/>
+ <view name="middle" resource="transparent_button_rsc"
height="${parent.height}" x="${parent.left.width}"
width="${parent.width-parent.left.width-parent.right.width}" stretches="both"/>
+ <view name="right" resource="transparent_button_rsc"
height="${parent.height}" x="${parent.width-width}" stretches="height"
visible="$once{classroot.rightrsc != ''}"/>
<view name="content" x="${Math.round((parent.width - width) / 2)}"
height="${parent.height}">
<simplelayout name="contentlayout" axis="x"
spacing="$once{classroot.iconspace}" />
@@ -188,8 +182,8 @@
var tc = s.textcolor*1;
//Debug.write("Button style .. s.textcolor,tc",s.textcolor,
tc);
//this.content.txt.setAttribute("fgcolor", this.enabled ? tc :
s.textdisabledcolor);
- this.content.txt.setAttribute("font", s.font);
- this.content.txt.setAttribute("fontsize", s.fontsize);
+ if (s.font) this.content.txt.setAttribute("font", s.font);
+ if (s.fontsize) this.content.txt.setAttribute("fontsize",
s.fontsize);
}
</method>
_______________________________________________
Laszlo-checkins mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-checkins