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

Mac OS: CSS padding not correctly applied on the ScrollPane content

XMLWordPrintable

      I have a ScrollPane with some content (in my case, the content is a StackPane).
      I want to add 1 pixel gap between the content and the scroll bar, so I added the following :

      .scrollBarVisible {
          /* Add 1 pixel gap between the ScrollPane content and the ScrollPane scroll bar when the scroll bar is visible */
          -fx-padding: 0 1 0 0;
      }

      On windows, the rendering is as expected.
      On mac, I don't see my 1 pixel gap. I have to define 2 pixels gap to get the correct rendering.
      See attached screen shots.

        1. windows.png
          windows.png
          12 kB
        2. Test.java
          3 kB
        3. test.css
          0.9 kB
        4. resultWithPadding2.tiff
          17 kB
        5. resultWithPadding1.tiff
          17 kB
        6. mac.png
          mac.png
          12 kB

            miflemi Mick Fleming
            slions Sandra Lions-piron
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: