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

Tab with rounded corners strange behaviour bug

    Details

    • Subcomponent:
    • CPU:
      x86
    • OS:
      windows_7

      Description

      FULL PRODUCT VERSION :
      openjdk version "1.8.0_45-internal"
      OpenJDK Runtime Environment (build 1.8.0_45-internal-b14)
      OpenJDK 64-Bit Server VM (build 25.45-b02, mixed mode)


      ADDITIONAL OS VERSION INFORMATION :
      I have tried on 8u60 and 8u45 on windos 7 and ubuntu 14. The same result.

      A DESCRIPTION OF THE PROBLEM :
      I want to make big rounded Tabs. However, some strange elements appear near corners and later disappear. It can be seen on the following images:
      http://i.stack.imgur.com/kyICa.jpg
      http://i.stack.imgur.com/0mnDq.jpg

      I asked this question at stackoverflow http://stackoverflow.com/questions/30690918/javafx-tab-rounded-corners/30692660#30692660 and one user said that this is "Changing CSS Id at run-time on Tab does not result in changing style" bug https://bugs.openjdk.java.net/browse/JDK-8090243

      However, I am not sure that this is the bug I am talking about as css rules are not set at runtime. This bug is important for me that's why I want to be sure that THIS bug is my problem. Please say, if this bug is my problem.

      This is my css code:

      .tab:selected .focus-indicator {
          -fx-border-radius: 10 10 0 0, 10 10 0 0;
           -fx-border-insets: -7 -7 -9 -8, -5 -5 -9 -6;
      }

      .tab-pane > .tab-header-area > .headers-region > .tab:selected{
          -fx-border-insets: 10 10 10 10, 10 10 10 10;
      }

      .tab-pane > .tab-header-area > .headers-region > .tab > .tab-container >
      .tab-label {
          -fx-alignment: CENTER;
          -fx-text-fill: -fx-text-base-color;
          -fx-padding:0 10 0 0;
      }

      .tab-header-area .tab{
          -fx-padding:4 10 5 10;
          -fx-border-radius: 10 10 0 0;
          -fx-background-radius: 10 10 0 0;
      }

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Use the css file and dynamically add tab to TabPane. You can see these strange elements;

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      I expect to see normal tabs without extra elements
      ACTUAL -
      http://i.stack.imgur.com/kyICa.jpg
      http://i.stack.imgur.com/0mnDq.jpg

      REPRODUCIBILITY :
      This bug can be reproduced occasionally.

        Attachments

        1. tabs.css
          0.5 kB
        2. TabTest.java
          2 kB

          Activity

            People

            • Assignee:
              jgiles Jonathan Giles
              Reporter:
              webbuggrp Webbug Group
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: