JDK-8094697 : ColorPicker color boxes lack DPI scaling
  • Type: Bug
  • Component: javafx
  • Sub-Component: controls
  • Affected Version: 8u45
  • Priority: P4
  • Status: Resolved
  • Resolution: Duplicate
  • Submitted: 2015-06-02
  • Updated: 2015-06-12
  • Resolved: 2015-06-02
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8
8u60Resolved
Related Reports
Duplicate :  
Description
ColorPicker shows a box of the selected color next to the color name when closed, and a grid of standard color boxes when opened. These boxes do not scale with Windows DPI settings, meaning they are too small at any DPI setting above 100% (96 DPI).

See these two screenshots for a demonstration:
http://kynosarges.org/images/dpi/ColorPicker-96.png (96 DPI = 100%, boxes same size as text height)
http://kynosarges.org/images/dpi/ColorPicker-192.png (192 DPI = 200%, boxes much smaller than text height)

At 200% the boxes are already rather tiny, and that's the required scaling for a modern 4K display (indeed my Dell XPS 15 defaults to 250%). The screenshots were created using this simple test program:

package org.kynosarges;

import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.ColorPicker;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;

public class ColorPickerTest extends Application {

    @Override
    public void start(Stage primaryStage) {
        primaryStage.setTitle("ColorPicker Test");
        primaryStage.setScene(new Scene(new StackPane(new ColorPicker())));
        primaryStage.show();
    }

    public static void main(String[] args) {
        launch(args);
    }
}

Comments
Excellent, good to hear it's already fixed.
03-06-2015

Tested on the latest build and the relative sizing now matches the 96DPI example, but overall scaled for the DPI.
02-06-2015

Prior to 8u60-b17 there was no support for High DPI on windows. This should be re-tested with 8u60.
02-06-2015