You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pivot.apache.org by rw...@apache.org on 2017/12/15 02:59:50 UTC

svn commit: r1818230 - /pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/ScrollPaneSkin.java

Author: rwhitcomb
Date: Fri Dec 15 02:59:50 2017
New Revision: 1818230

URL: http://svn.apache.org/viewvc?rev=1818230&view=rev
Log:
PIVOT-1018: Propagate the scroll pane background color to the default
corner components when they get made visible so the correct background
is painted.

Modified:
    pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/ScrollPaneSkin.java

Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/ScrollPaneSkin.java
URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/ScrollPaneSkin.java?rev=1818230&r1=1818229&r2=1818230&view=diff
==============================================================================
--- pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/ScrollPaneSkin.java (original)
+++ pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/ScrollPaneSkin.java Fri Dec 15 02:59:50 2017
@@ -16,6 +16,7 @@
  */
 package org.apache.pivot.wtk.skin;
 
+import java.awt.Color;
 import java.awt.Graphics2D;
 import java.awt.Paint;
 import java.awt.Transparency;
@@ -740,6 +741,8 @@ public class ScrollPaneSkin extends Cont
 
         // Handle corner components
 
+        Color backColor = getBackgroundColor();
+
         if (columnHeaderHeight > 0 && rowHeaderWidth > 0) {
             if (corner != null) {
                 corner.setVisible(true);
@@ -751,6 +754,7 @@ public class ScrollPaneSkin extends Cont
                 topLeftCorner.setVisible(true);
                 topLeftCorner.setSize(rowHeaderWidth, columnHeaderHeight);
                 topLeftCorner.setLocation(0, 0);
+                topLeftCorner.getStyles().put("backgroundColor", backColor);
             }
         } else {
             if (corner != null) {
@@ -764,6 +768,7 @@ public class ScrollPaneSkin extends Cont
             bottomLeftCorner.setVisible(true);
             bottomLeftCorner.setSize(rowHeaderWidth, horizontalScrollBarHeight);
             bottomLeftCorner.setLocation(0, height - horizontalScrollBarHeight);
+            bottomLeftCorner.getStyles().put("backgroundColor", backColor);
         } else {
             bottomLeftCorner.setVisible(false);
         }
@@ -773,6 +778,7 @@ public class ScrollPaneSkin extends Cont
             bottomRightCorner.setSize(verticalScrollBarWidth, horizontalScrollBarHeight);
             bottomRightCorner.setLocation(width - verticalScrollBarWidth, height
                 - horizontalScrollBarHeight);
+            bottomRightCorner.getStyles().put("backgroundColor", backColor);
         } else {
             bottomRightCorner.setVisible(false);
         }
@@ -781,6 +787,7 @@ public class ScrollPaneSkin extends Cont
             topRightCorner.setVisible(true);
             topRightCorner.setSize(verticalScrollBarWidth, columnHeaderHeight);
             topRightCorner.setLocation(width - verticalScrollBarWidth, 0);
+            topRightCorner.getStyles().put("backgroundColor", backColor);
         } else {
             topRightCorner.setVisible(false);
         }