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

-fx-highlight-text-fill is hardcoded for .text-input:focused

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P4
    • 8u20
    • 8
    • javafx
    • JDK 1.8.0-b132 and JDK 1.8.0_20-ea-b5 on Mac OS X 10.7.5.

    Description

      In modena.css, the text fill for highlighted, focused text is hard-coded as "white". This makes selected text unreadable if a -fx-accent is changed to a light color. As an example:
      .root {
      -fx-base: #3f474f;
      -fx-accent: #e7eff7 ;
      -fx-default-button: #7f878f ;
      -fx-focus-color: #efefef;
              -fx-faint-focus-color: #efefef22;
      }

      The text fill rule should probably be based on a ladder, using -fx-highlight-fill as the basis for the ladder. Something like:

      .text-input:focused {
          /* ... */
          -fx-highlight-text-fill: ladder(
              -fx-highlight-fill,
              -fx-light-text-color 45%,
              -fx-dark-text-color 46%,
              -fx-dark-text-color 59%,
              -fx-mid-text-color 60%
          );
          /* ... */
      }

      Attachments

        1. after-noSelect.png
          after-noSelect.png
          10 kB
        2. after-select.png
          after-select.png
          10 kB
        3. before-noSelect.png
          before-noSelect.png
          10 kB
        4. before-select.png
          before-select.png
          10 kB

        Activity

          People

            jgiles Jonathan Giles
            jdenvirjfx James Denvir (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              Imported: