Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8151025

ColorPicker min height is too low

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • 8u74
    • javafx
    • None

      In the test below the min height of ColorPicker is different to other controls. By resizing the window the height of the ColorPicker varies. This behavior is different to CombBox and DatePicker.

      public class DatePickerTest extends Application
      {
        public static void main(String[] args)
        {
          Application.launch(args);
        }

        @Override
        public void start(Stage stage)
        {
          System.err.println(System.getProperty("javafx.runtime.version"));

          VBox vbox = new VBox(10);

          ComboBox<?> combo = new ComboBox<>();
          vbox.getChildren().add(combo);
          
          DatePicker datePicker = new DatePicker();
          vbox.getChildren().add(datePicker);
          
          ColorPicker colorPicker = new ColorPicker();
          //workaround
          //colorPicker.setMinHeight(Region.USE_PREF_SIZE);
          vbox.getChildren().add(colorPicker);
          
          Scene scene = new Scene(vbox);
          stage.setScene(scene);
          stage.show();
          
          System.err.println(combo.getPrefHeight() + " " + combo.getMinHeight());
          System.err.println(datePicker.getPrefHeight() + " " + datePicker.getMinHeight());
          System.err.println(colorPicker.getPrefHeight() + " " + colorPicker.getMinHeight());
        }
      }

            Unassigned Unassigned
            wzberger Wolfgang Zitzelsberger
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: