changeset 2154:fb5f92a6d1f6

Modena updates - new slider track
author mo.chicharro
date Sun, 06 Jan 2013 23:04:26 +0000
parents f9854bbcd1cb
children 5904556f2895
files apps/experiments/Modena/src/modena/Modena.css apps/experiments/Modena/src/modena/SamplePage.java
diffstat 2 files changed, 18 insertions(+), 25 deletions(-) [+]
line wrap: on
line diff
--- a/apps/experiments/Modena/src/modena/Modena.css	Sun Jan 06 13:26:23 2013 -0800
+++ b/apps/experiments/Modena/src/modena/Modena.css	Sun Jan 06 23:04:26 2013 +0000
@@ -193,7 +193,7 @@
      * a control. It is typically the same size as the control (i.e., insets
      * are 0).
      */
-    -fx-outer-border: derive(-fx-color,-20%);
+    -fx-outer-border: derive(-fx-color,-23%);
 /*    -fx-outer-border: linear-gradient(
         to bottom,
         derive(-fx-color,-9%) 0%, 
@@ -709,20 +709,11 @@
     -fx-color: -fx-pressed-base;
 }
 
-.slider .track {
-    -fx-background-color:
-        derive(-fx-color,-22%),
-        linear-gradient(to bottom, derive(-fx-color,-15.5%), derive(-fx-color,34%) 30%, derive(-fx-color,68%));
-    -fx-background-insets: 0, 1;
-    -fx-background-radius: 2.5, 1.5;
-    -fx-padding: 0.208333em; /* 2.5 */
-}
-
-.slider:vertical .track {
-    -fx-background-color:
-        derive(-fx-color,-22%),
-        linear-gradient(to right, derive(-fx-color,-15.5%), derive(-fx-color,34%) 30%, derive(-fx-color,68%));
-    -fx-background-insets: 0, 1;
+.slider .track, .slider:vertical .track {
+    -fx-background-color:  derive(-fx-box-border, 20%), derive(-fx-background, -5%), -fx-background;
+    -fx-background-insets: 0, 1, 2 1 1 1;
+    -fx-background-radius: 2.5, 1.5, 1.5;
+    -fx-padding: 2;
 }
 
 .slider .axis {
--- a/apps/experiments/Modena/src/modena/SamplePage.java	Sun Jan 06 13:26:23 2013 -0800
+++ b/apps/experiments/Modena/src/modena/SamplePage.java	Sun Jan 06 23:04:26 2013 +0000
@@ -267,16 +267,18 @@
                 withState(new Hyperlink("F & Hover"), "focused, hover"),
                 withState(new Hyperlink("F & Armed"), "focused, armed"),
                 withState(new Hyperlink("Disabled"), "disabled"));
-        newSection("Slider:", 
-                new Slider(0,100,50),
-                withState(new Slider(0,100,50), null, ".thumb", "hover"),
-                withState(new Slider(0,100,50), null, ".thumb", "hover, pressed"),
-                withState(new Slider(0,100,50), "disabled"));
-        newSection("Slider Focused:", 
-                withState(new Slider(0,100,50), "focused"),
-                withState(new Slider(0,100,50), "focused", ".thumb", "hover"),
-                withState(new Slider(0,100,50), "focused", ".thumb", "hover, pressed"));
-        newSection("Slider (V):", 
+        newDetailedSection(
+                new String[]{"Slider - H: ", "normal", "hover", "pressed", "disabled"},
+                new Slider(0, 100, 50),
+                withState(new Slider(0, 100, 50), null, ".thumb", "hover"),
+                withState(new Slider(0, 100, 50), null, ".thumb", "hover, pressed"),
+                withState(new Slider(0, 100, 50), "disabled"));
+        newDetailedSection(
+                new String[]{"Slider - H - Focused: ", "normal", "hover", "pressed"},
+                withState(new Slider(0, 100, 50), "focused"),
+                withState(new Slider(0, 100, 50), "focused", ".thumb", "hover"),
+                withState(new Slider(0, 100, 50), "focused", ".thumb", "hover, pressed"));
+        newSection("Slider - V:",
                 SliderBuilder.create().min(0).max(100).value(50).orientation(Orientation.VERTICAL).build(),
                 withState(SliderBuilder.create().min(0).max(100).value(50).orientation(Orientation.VERTICAL).build(), null, ".thumb", "hover"),
                 withState(SliderBuilder.create().min(0).max(100).value(50).orientation(Orientation.VERTICAL).build(), null, ".thumb", "hover, pressed"),