You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pivot.apache.org by tv...@apache.org on 2009/09/21 15:50:32 UTC
svn commit: r817252 - in /incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk:
content/MenuBarItemDataRenderer.java skin/terra/TerraMenuSkin.java
Author: tvolkert
Date: Mon Sep 21 13:50:31 2009
New Revision: 817252
URL: http://svn.apache.org/viewvc?rev=817252&view=rev
Log:
Made MenuBarItemDataRenderer use a more standard padding, removed superlfuous calls to setVisible() in TerraMenuSkin
Modified:
incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/content/MenuBarItemDataRenderer.java
incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/terra/TerraMenuSkin.java
Modified: incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/content/MenuBarItemDataRenderer.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/content/MenuBarItemDataRenderer.java?rev=817252&r1=817251&r2=817252&view=diff
==============================================================================
--- incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/content/MenuBarItemDataRenderer.java (original)
+++ incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/content/MenuBarItemDataRenderer.java Mon Sep 21 13:50:31 2009
@@ -23,6 +23,7 @@
import org.apache.pivot.wtk.BoxPane;
import org.apache.pivot.wtk.HorizontalAlignment;
import org.apache.pivot.wtk.ImageView;
+import org.apache.pivot.wtk.Insets;
import org.apache.pivot.wtk.Label;
import org.apache.pivot.wtk.MenuBar;
import org.apache.pivot.wtk.VerticalAlignment;
@@ -39,7 +40,7 @@
public MenuBarItemDataRenderer() {
getStyles().put("horizontalAlignment", HorizontalAlignment.LEFT);
getStyles().put("verticalAlignment", VerticalAlignment.CENTER);
- getStyles().put("padding", 3);
+ getStyles().put("padding", new Insets(4, 6, 4, 6));
add(imageView);
add(label);
Modified: incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/terra/TerraMenuSkin.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/terra/TerraMenuSkin.java?rev=817252&r1=817251&r2=817252&view=diff
==============================================================================
--- incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/terra/TerraMenuSkin.java (original)
+++ incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/terra/TerraMenuSkin.java Mon Sep 21 13:50:31 2009
@@ -183,13 +183,10 @@
for (Menu.Item item : section) {
if (item.isVisible()) {
- item.setVisible(true);
item.setSize(width, item.getPreferredHeight(width));
item.setLocation(0, itemY);
itemY += item.getHeight();
- } else {
- item.setVisible(false);
}
}