JFXtras/jfxtras-labs

ListSpinner focused styling messed up in 8.0 branch

pfurbacher opened this issue · 1 comments

Run ListSpinner1 demo from the 8.0 branch of https://github.com/JFXtras/jfxtras-labs-samples.git.

Use the TAB key to change focus. [Only two (2) controls seem to receive focus in this demo: the "cyclic" checkbox, and the list spinner in the left pane.]

Note that the spinner control becomes completely flat when it has the focus via keyboard navigation. It looks like a plain vanilla label.

Look at the console output.

Dec 05, 2013 10:03:47 AM javafx.scene.CssStyleHelper calculateValue
WARNING: Could not resolve '-fx-focused-base' while resolving lookups for '-fx-background-color' from rule '*.ListSpinner:focused' in stylesheet jar:file:/Users/pf/.gradle/caches/artifacts-26/filestore/org.jfxtras/jfxtras-labs/8.0-r1-SNAPSHOT/jar/37202fdba27cbd3553ca296604cb049ae6760288/jfxtras-labs-8.0-r1-SNAPSHOT.jar!/jfxtras/labs/internal/scene/control/ListSpinner.css ...
[several more similar logging statements omitted for brevity]

Modena.css does not define "-fx-focused-base". It does define the following:

-fx-focus-color: #039ED3;
-fx-faint-focus-color: #039ED322;

Caspian.css defines -fx-focused-base with the comment:

/* Used to specify the body color for focused objects. By default, it's
* the same as -fx-base (i.e., the body color doesn't change when a control
* gets focus).
*/
-fx-focused-base: -fx-base;

So, I'm guessing the fix for this is to just replace -fx-focused-base with -fx-base in ListSpinner.css.

Beyond this, I wondering: ListSpinnerCaspianSkin?! Why is the skin "tied" (at least in name) to the caspian theme?


Environment:

$ java -version
java version "1.8.0-ea"
Java(TM) SE Runtime Environment (build 1.8.0-ea-b117)
Java HotSpot(TM) 64-Bit Server VM (build 25.0-b59, mixed mode)

$ sw_vers
ProductName: Mac OS X
ProductVersion: 10.9
BuildVersion: 13A603

tbee commented

Focus handling seems to work fine.