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

ChoiceBox and MenuButton -fx-text-fill is broken

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: P3 P3
    • 8
    • fx2.1
    • javafx

      For starters if you set the base color for CB or MB then the text should automatically switch to white. This works for all other controls. This is broken because
       -fx-text-fill is not working on these controls. You can test this with a app with CSS

      .choice-box {
          -fx-text-fill: red;
      }
      .menu-button {
          -fx-text-fill: red;
      }

      Neither show up read. I expect this is related to RT-19062 that text fill property is not working on these controls as its not bound up between the inner label in the skin and the control's property. Once this is fixed it should be possible to remove the workaround in caspian.css for menu button.

      A workaround is adding these to your app CSS but this needs to be fixed properly by adding the binding in the skin.

      .choice-box .label{
          -fx-text-fill: -fx-text-base-color;
      }
      .menu-button .label{
          -fx-text-fill: -fx-text-base-color;
      }

            psomashe Parvathi Somashekar (Inactive)
            jasper Jasper Potts (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: