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

WebPopup in MAC I set rounded corners to have a white background color. How can I set transparent rounded corners #699

Open
xcfdszzr opened this issue May 11, 2022 · 4 comments
Assignees
Projects

Comments

@xcfdszzr
Copy link

image

  WebPopup in MAC I set rounded corners to have a white background color.
  How can I set transparent rounded corners


        <style type="popup" id="element-choose">
                <component>
                    <opaque>false</opaque>
                    <foreground>black</foreground>
                </component>
                <painter>
                    <decorations>
                        <decoration >
                            <WebShape round="10"/>
        <!--                    <WebShadow type="outer" width="0" />-->
                            <LineBorder color="237,237,237,0"/>
                            <ColorBackground color="255,255,255"/>
                        </decoration>
                        <decoration states="mac">
                            <WebShape round="30"/>
                            <WebShadow type="outer" width="1"/>
                            <LineBorder color="0,0,0"/>
                            <ColorBackground color="255,255,255"/>
                        </decoration>
                    </decorations>
                </painter>
            </style>
@mgarin mgarin self-assigned this May 11, 2022
@mgarin mgarin added the bug label May 11, 2022
@mgarin mgarin added this to Planned in v1.3.0 via automation May 11, 2022
@mgarin
Copy link
Owner

mgarin commented May 11, 2022

I've tried the same example on Windows and it seems to work just fine, will test this on a Mac a bit later to see if I can reproduce the problem there.

In the meantime, here are a few additional questions:

  • What Java version did you use?
  • What is your Mac OS X version?
  • Can you provide a small code example that reproduces this issue? (just code that shows the popup)

@mgarin
Copy link
Owner

mgarin commented May 11, 2022

Just for reference, this is how I displayed the popup -

new WebButton ( "test", e -> {
    final WebPopup popup = new WebPopup ( StyleId.of ( "element-choose" ) );

    final WebStyledLabel content = new WebStyledLabel ( "{Sample:b}" );
    content.setPreferredSize ( 500, 400 );
    popup.add ( content );

    final Component src = ( Component ) e.getSource ();
    popup.showPopup ( src, 0, src.getHeight () );
} )

And I used the exact popup style you have provided.

@xcfdszzr
Copy link
Author

xcfdszzr commented May 12, 2022

    mac os 12.3.1
    jdk 1.8

  public RunErrorPopup(EditorTree editorTree, String message, String detailMsg) {
          super(StyleId.of("element-choose"));
      }


    this.setPreferredSize(480, 160);

  
    public static void showRunErrorPopup(EditorTree editorTree, String message, String detailMsg, int x, int y) {
          if (runErrorPopup != null) {
              runErrorPopup.hidePopup();
          }
          runErrorPopup = new RunErrorPopup(editorTree, message,detailMsg);
          runErrorPopup.setVisible(true);
          runErrorPopup.showPopup(editorTree, x, y);
      }

@mgarin
Copy link
Owner

mgarin commented May 12, 2022

jdk 1.8

What is the specific update number/vendor?
It rarely matters, but I seen a few cases where some features worked differently within the same major version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
v1.3.0
  
Planned
Development

No branches or pull requests

2 participants