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

Incorrectly placed drop shadow when using flamingo JCommandButton #358

Closed
Bios-Marcel opened this issue Jul 20, 2021 · 2 comments
Closed
Milestone

Comments

@Bios-Marcel
Copy link
Contributor

Bios-Marcel commented Jul 20, 2021

Hey,

we are using the following dependency that offers buttons with special behaviour:

<dependency>
  <groupId>com.github.insubstantial</groupId>
  <artifactId>flamingo</artifactId>
  <version>7.3</version>
</dependency>

When using this with FlatLaf in a maximized window, the popupmenu itself shows correctly, but the drop shadow is displayed in the top left corner.

It looks like this:

image

Is there a workaround to this issue?

Here's minimum code to reproduce this:

  public static void main( final String[] args )
  {
    FlatLightLaf.setup();

    //Setup most basic command button with popup
    final JCommandButton button = new JCommandButton( "JCommandButton" );
    button.setPopupCallback( ( final var __ ) ->
    {
      final JCommandPopupMenu popupMenu = new JCommandPopupMenu();
      popupMenu.addMenuButton( new JCommandMenuButton( "Menu Item", null ) );
      return popupMenu;
    } );
    button.setCommandButtonKind( IspCommandButton.CommandButtonKind.POPUP_ONLY );

    //Position button
    final JPanel panel = new JPanel( new BorderLayout() );
    panel.add( button, BorderLayout.NORTH );
    panel.setBorder( BorderFactory.createEmptyBorder( 50, 50, 50, 50 ) );

    final JFrame frame = new JFrame();
    frame.setJMenuBar( new JMenuBar() );
    frame.add( panel );
    frame.setExtendedState( Frame.MAXIMIZED_BOTH );
    frame.setVisible( true );
  }
DevCharly added a commit that referenced this issue Jul 29, 2021
@DevCharly
Copy link
Collaborator

Thanks, fixed in main branch.

@DevCharly DevCharly added this to the 1.5 milestone Jul 29, 2021
@Bios-Marcel
Copy link
Contributor Author

Thanks :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants