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

Mnemonic indicator does not share color with control's text

XMLWordPrintable

    • x86_64
    • generic

      ADDITIONAL SYSTEM INFORMATION :
      C:\Users\hwaite>ver

      Microsoft Windows [Version 10.0.17134.228]

      C:\Users\hwaite>"%JAVA_HOME%\bin"\java -version
      java version "1.8.0_181"
      Java(TM) SE Runtime Environment (build 1.8.0_181-b13)
      Java HotSpot(TM) 64-Bit Server VM (build 25.181-b13, mixed mode)

      A DESCRIPTION OF THE PROBLEM :
      'Mnemonic' underline should adopt same color as the text it's underlining. This is not happening when the latter's foreground color is modified by style.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Launch program and press 'Alt' key.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Mnemonic underline is white.
      ACTUAL -
      Mnemonic underline is black.

      ---------- BEGIN SOURCE ----------
      public class Test extends Application {
          @Override
          public void start(Stage pStage) {
              final Button btn = new Button("_Foobar");
              btn.setStyle("-fx-background-color: #c4052f; -fx-text-fill: #ffffff");
              pStage.setScene(new Scene(new StackPane(btn), 300, 250));
              pStage.show();
          }

          public static void main(String[] pArgs) {launch(pArgs);}
      }
      ---------- END SOURCE ----------

      FREQUENCY : always


            arapte Ambarish Rapte
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: