changeset 1688:511912d3d0d9

RT-24450: Pagination control buttons are not centered and are also missing the navigation arrows.
author Kinsley Wong
date Thu, 23 Aug 2012 15:51:43 -0700
parents 6c299cc567e5
children 0bf8526320f1
files javafx-ui-controls/src/com/sun/javafx/scene/control/skin/PaginationSkin.java javafx-ui-controls/src/com/sun/javafx/scene/control/skin/caspian/caspian.css javafx-ui-controls/src/javafx/scene/control/Control.java
diffstat 3 files changed, 15 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/PaginationSkin.java	Fri Aug 24 09:44:26 2012 +1200
+++ b/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/PaginationSkin.java	Thu Aug 23 15:51:43 2012 -0700
@@ -716,7 +716,7 @@
 
         layoutInArea(currentStackPane, left, top, w, stackPaneHeight, 0, HPos.CENTER, VPos.CENTER);
         layoutInArea(nextStackPane, left, top, w, stackPaneHeight, 0, HPos.CENTER, VPos.CENTER);
-        layoutInArea(navigation, left, stackPaneHeight, h, navigationHeight, 0, HPos.CENTER, VPos.CENTER);
+        layoutInArea(navigation, left, stackPaneHeight, w, navigationHeight, 0, HPos.CENTER, VPos.CENTER);
     }
 
     class NavigationControl extends StackPane {
--- a/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/caspian/caspian.css	Fri Aug 24 09:44:26 2012 +1200
+++ b/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/caspian/caspian.css	Thu Aug 23 15:51:43 2012 -0700
@@ -3471,7 +3471,7 @@
     -fx-arrows-visible: true;
     -fx-tooltip-visible: true;
     -fx-page-information-visible: true;
-    -fx-page-information-alignment: bottom;    
+    -fx-page-information-alignment: bottom;        
 }
 .pagination > .page {
     -fx-background-color: transparent;
@@ -3487,16 +3487,16 @@
     -fx-alignment: center;
 }
 
-.pagination > .pagination-control > .left-arrow-button{
+.pagination > .pagination-control > .control-box > .left-arrow-button{
     -fx-background-radius: 0;
     -fx-padding: 0.166667em 0.416em 0.25em 0.333em;
 }
-.pagination > .pagination-control > .right-arrow-button {
+.pagination > .pagination-control > .control-box > .right-arrow-button {
     -fx-background-radius: 0;
     -fx-padding: 0.166667em 0.333em 0.25em 0.416em;
 }
 
-.pagination > .pagination-control > .left-arrow {
+.pagination > .pagination-control .left-arrow {
     -fx-background-color: -fx-mark-highlight-color, -fx-mark-color;
     -fx-background-insets: 1 0 -1 0, 0;
     -fx-padding: 0.375em 0.291em 0.375em 0.291em;
@@ -3504,7 +3504,7 @@
     -fx-scale-shape: true;
 }
 
-.pagination > .pagination-control > .right-arrow {
+.pagination > .pagination-control .right-arrow {
     -fx-background-color: -fx-mark-highlight-color, -fx-mark-color;
     -fx-background-insets: 1 0 -1 0, 0;
     -fx-padding: 0.375em 0.291em 0.375em 0.291em;
@@ -3524,8 +3524,8 @@
     -fx-base: -fx-accent;
 }
 
-.pagination.bullet > .pagination-control > .left-arrow-button, 
-.pagination.bullet > .pagination-control > .right-arrow-button {
+.pagination.bullet > .pagination-control > .control-box > .left-arrow-button, 
+.pagination.bullet > .pagination-control > .control-box > .right-arrow-button {
     -fx-background-radius: 4em;
 }
 
--- a/javafx-ui-controls/src/javafx/scene/control/Control.java	Fri Aug 24 09:44:26 2012 +1200
+++ b/javafx-ui-controls/src/javafx/scene/control/Control.java	Thu Aug 23 15:51:43 2012 -0700
@@ -219,6 +219,13 @@
             // clear out the styleable properties so that the list is rebuilt
             // next time they are requested.
             styleableProperties = null;
+            
+            // calling impl_processCSS(true) as the styleable properties may now
+            // be different, as we will now be able to return styleable properties 
+            // belonging to the skin. If impl_process(true) is not called, the 
+            // impl_getStyleableProperties() method is never called, so the 
+            // skin properties are never exposed.
+            impl_processCSS(true);
 
             // DEBUG: Log that we've changed the skin
             final PlatformLogger logger = Logging.getControlsLogger();