Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WebPopOver with WebLookAndFeel.setDecorateDialogs(true) on Linux #126

Closed
renato opened this issue May 21, 2014 · 2 comments
Closed

WebPopOver with WebLookAndFeel.setDecorateDialogs(true) on Linux #126

renato opened this issue May 21, 2014 · 2 comments
Assignees

Comments

@renato
Copy link

renato commented May 21, 2014

When I create a WebPopOver and place it relative to a WebButton, having WebLookAndFeel to decorate dialogs (setDecorateDialogs(true)), the popover gets decorated as well, incorrectly.

I'm using Linux.

popover

@mgarin
Copy link
Owner

mgarin commented May 21, 2014

I have committed the fix for this particular issue, WebPopOver was indeed decorated with dialog-like style in case dialog laf decoration is switched on. That was a general issue btw, not just for Linux.

Though I am not sure that WebPopOver will work normally on Linux systems due to per-pixel window transparency issues on Linux systems in Java. Due to those issues I have disabled per-pixel transparency on Linux systems (enabled only on Windows, Mac OS X and Solaris) - you can see that in ProprietaryUtils source code:

    /**
     * Returns whether window transparency is supported on current OS or not.
     *
     * @return true if window transparency is supported on current OS; false otherwise
     */
    public static boolean isWindowTransparencyAllowed ()
    {
        try
        {
            // Replace when Unix-systems will have proper support for transparency
            // com.sun.awt.AWTUtilities.isTranslucencySupported ( com.sun.awt.AWTUtilities.Translucency.PERPIXEL_TRANSPARENT )
            return SystemUtils.isWindows () || SystemUtils.isMac () || SystemUtils.isSolaris ();
        }
        catch ( final Throwable e )
        {
            return false;
        }
    }

Though I have added a special switch (also available with next update) so you can test whether per-pixel transparency works for you or not:

WebLookAndFeel.setAllowLinuxTransparency ( true );

Use this line of code anywhere before the transparent windows initialization. If you will see grayed/distorted windows after enabling this - it seems that JDK (or OS - but that is less probably) still have the same issues.

@mgarin mgarin added JDK 6 and removed Unix labels May 21, 2014
@mgarin mgarin added this to the Small issues milestone May 21, 2014
@mgarin mgarin self-assigned this May 21, 2014
@mgarin mgarin added the fixed label Jun 26, 2014
@mgarin
Copy link
Owner

mgarin commented Jun 26, 2014

Fix and changes are now available in v1.28 update:
https://github.com/mgarin/weblaf/releases/tag/v1.28

@mgarin mgarin closed this as completed Jun 26, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants