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

ChoiceBox and MenuButton -fx-text-fill is broken

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Cannot Reproduce
    • Affects Version/s: fx2.1
    • Fix Version/s: 8
    • Component/s: javafx

      Description

      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;
      }

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported: