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

Redundant shadow effect when using -fx-effect: null;

XMLWordPrintable

    • x86_64
    • linux_debian_3.0

      A DESCRIPTION OF THE PROBLEM :
      I've set the following CSS class to change the ChoiceBox and TextField context-menu, especially its background shadow, it works perfectly on Windows platform but on one of the Debian based Linux distros (Crunchbang++) it doesn't work as expected, Actually when I set -fx-effect to the null value there will be another default shadow (secondary) behind the context-menu (exactly like the shadow around the main window of the application) and there is no way to disable it, same will happen to tooltips!

      .context-menu {
          -fx-background-color: #fff;
          -fx-background-radius: 2;
          -fx-padding: 0.6em 0 0.6em 0;
          -fx-text-fill: #444;
          -fx-effect: null;
      }

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Put three different controls on the scene, a ChoiceBox, a TextField and a Button that contains a Tooltip, then in your CSS file that is attached to the scene, define the following rule to remove the default ContextMenu background shadow:

      .context-menu {
          -fx-effect: null;
      }

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Remove the shadow behind and around the ContextMenu and Tooltip! (When opening a ChoiceBox list, showing a tooltip and doing a right-click on a TextField)
      ACTUAL -
      There will be a shadow that resembles the one around the main window of the application.

        1. screenshot.png
          screenshot.png
          16 kB
        2. Test.java
          1 kB
        3. styles.css
          0.2 kB

            adev Anupam Dev
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: