You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by jm...@apache.org on 2014/03/07 02:05:27 UTC
[17/50] git commit: [flex-sdk] [refs/heads/master] - Fix FLEX-34107
IconItemRenderer separators disappear when using a large font. changed
usedOpaqueBackground to CSS
Fix FLEX-34107 IconItemRenderer separators disappear when using a large font.
changed usedOpaqueBackground to CSS
Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/6d9a6109
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/6d9a6109
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/6d9a6109
Branch: refs/heads/master
Commit: 6d9a61097fd29b718dcfd233760ff77aec160e87
Parents: 1999965
Author: mamsellem <ma...@systar.com>
Authored: Tue Feb 25 11:07:46 2014 +0100
Committer: mamsellem <ma...@systar.com>
Committed: Tue Feb 25 11:07:46 2014 +0100
----------------------------------------------------------------------
.../src/spark/components/LabelItemRenderer.as | 32 +++++++++-----------
1 file changed, 14 insertions(+), 18 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/6d9a6109/frameworks/projects/mobilecomponents/src/spark/components/LabelItemRenderer.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/mobilecomponents/src/spark/components/LabelItemRenderer.as b/frameworks/projects/mobilecomponents/src/spark/components/LabelItemRenderer.as
index 00c1328..ca9dfdd 100644
--- a/frameworks/projects/mobilecomponents/src/spark/components/LabelItemRenderer.as
+++ b/frameworks/projects/mobilecomponents/src/spark/components/LabelItemRenderer.as
@@ -170,6 +170,18 @@ include "../styles/metadata/StyleableTextFieldTextStyles.as"
*/
[Style(name="verticalAlign", type="String", enumeration="bottom,middle,top", inherit="no")]
+/**
+ * Option to use an opaqueBackground property for this renderer. This can improve scrolling speed.
+ * Since opaqueBackground adds space around the text proportional to the font's size,
+ * you might need to turn it off when using large fonts to avoid background overflow.
+ * @default true
+ *
+ * @langversion 3.0
+ * @playerversion AIR 3.0
+ * @productversion Flex 4.12
+ */
+
+[Style(name="useOpaqueBackground", type="Boolean", inherit="yes")]
//--------------------------------------
// Excluded APIs
@@ -329,23 +341,6 @@ public class LabelItemRenderer extends UIComponent
* Whether or not we're the last element in the list
*/
mx_internal var isLastItem:Boolean = false;
-
- private var _useOpaqueBackground: Boolean = true;
-
- /**
- * Option to use an opaqueBackground property for this renderer. This can improve scrolling speed.
- * Since opaqueBackground adds space around the text proportional to the font's size,
- * you might need to turn it off when using large fonts to avoid background overflow.
- * @default true
- */
- public function get useOpaqueBackground(): Boolean {
- return _useOpaqueBackground;
- }
-
- public function set useOpaqueBackground(value: Boolean): void {
- _useOpaqueBackground = value;
- invalidateDisplayList();
- }
//--------------------------------------------------------------------------
//
@@ -909,7 +904,8 @@ public class LabelItemRenderer extends UIComponent
{
// If our background is a solid color, use it as the opaqueBackground property
// for this renderer. This makes scrolling considerably faster.
- if (_useOpaqueBackground)
+ var useOpaqueBackground: * = getStyle("useOpaqueBackground") ; // if not defined, then true
+ if (useOpaqueBackground == undefined || useOpaqueBackground == true )
opaqueBackgroundColor = backgroundColor;
}