JPro-one / JPro-Tickets

The right place to report about bugs or suggest improvements for JPro.
https://www.jpro.one
9 stars 4 forks source link

Rendering glitch while resizing node for right edge while using Rectangle clip on node with Arc width and height set. #75

Open jigarjigjig opened 4 years ago

jigarjigjig commented 4 years ago

OS: Mac OS X JPro: 2019.2.7 Java version: 11.0.2 JVM: 11.0.2 Oracle Corporation

Screenshot 2020-08-30 at 9 52 12 AM Screenshot 2020-08-30 at 9 52 05 AM

Code:

double endX = 0 ; double initialMouseStartX = 0 ;

@Override
public void start(Stage primaryStage) throws Exception {

    Pane windowPane = new Pane();
    windowPane.setPrefSize(100,100);

    Pane windowPaneContainer = new Pane(windowPane);
    windowPaneContainer.setMaxSize(800,100);
    windowPaneContainer.setMinSize(800,100);

    String cssStyle =
            "                -fx-border-width:" +  "10 10 10 10;" +
                    "                -fx-border-style: solid inside;" +
                    "                -fx-border-color: red;";
    windowPane.setStyle(cssStyle);
    windowPane.setLayoutX(50);

    String containerStyle =
            "                -fx-border-width:" +  "1 1 1 1;" +
                    "                -fx-border-style: solid inside;" +
                    "                -fx-border-color: blue;";
    windowPaneContainer.setStyle(containerStyle);

    Rectangle clipRect = new Rectangle(windowPane.getWidth(), windowPane.getHeight());
    clipRect.heightProperty().bind(windowPane.heightProperty());
    clipRect.widthProperty().bind(windowPane.widthProperty());
    clipRect.setArcHeight(30);
    clipRect.setArcWidth(30);
    windowPane.setClip(clipRect);

    windowPane.setOnMousePressed(new EventHandler<MouseEvent>() {
        @Override
        public void handle(MouseEvent mouseEvent) {
            endX = windowPane.getLayoutX() + windowPane.getPrefWidth();
            initialMouseStartX = mouseEvent.getSceneX();
        }
    });

    windowPane.setOnMouseDragged(new EventHandler<MouseEvent>() {
        @Override
        public void handle(MouseEvent mouseEvent) {

            double delta = mouseEvent.getSceneX() - initialMouseStartX;
            windowPane.setPrefWidth(endX + delta);
        }
    });

    primaryStage.setScene(new Scene(windowPaneContainer, 800, 100));
    primaryStage.show();

}
FlorianKirmaier commented 4 years ago

I can confirm the problem with Chrome and Firefox. It works on Safari.

jigarjigjig commented 3 years ago

@FlorianKirmaier I am still seeing this issue in version 2020.1.0. Is this issue fixed or Do I need to make any changes from code side ?

FlorianKirmaier commented 3 years ago

@jigarjigjig We haven't fixed it yet. We can probably fix it for the version.

jigarjigjig commented 2 years ago

@FlorianKirmaier Still we are seeing this issue. Has fix for this released ?

FlorianKirmaier commented 2 years ago

No this isn't fixed yet. At the time you've reported it, we've investigated it - but it wasn't so trivial. We've just rechecked it - it only happens when the arc of the clip is set. We've got a possible solution - but we have to first check for possible performance issues with the fix. Technically this is a Chrome bug.

FlorianKirmaier commented 2 years ago

@jigarjigjig You can now try out the version 2021.2.0-SNAPSHOT, it should fix your problem. We will probably release a stable version next week.

jigarjigjig commented 2 years ago

@FlorianKirmaier Still seeing this issue in Firefox and Chrome browser and in safari 50% of app UI layout is broken of which chrome and Firefox browser layout is 100% proper.

[info] c.j.i.s.Initializer$ - OS: Mac OS X [info] c.j.i.s.Initializer$ - JPro: 2021.2.0-SNAPSHOT [info] c.j.i.s.Initializer$ - JPro buildtime: 2021-09-28T00:13:30.493038+02:00[Europe/Berlin] [info] c.j.i.s.Initializer$ - Java version: 16.0.2 [info] c.j.i.s.Initializer$ - JVM: 16.0.2 Oracle Corporation [info] c.j.i.s.Initializer$ - JavaFX jar: file:/Users/jigar/.gradle/caches/modules-2/files-2.1/org.openjfx/javafx-graphics/11.0.3.8-jpro+0/934e4f4219b16819e3294e341cf9cc122b662899/javafx-graphics-11.0.3.8-jpro+0-mac.jar [info] c.j.i.s.Initializer$ - redirected OUT / ERR [info] c.j.i.s.Initializer$ - installed SLF4JBridge [info] c.j.i.s.Initializer$ - finished init! [info] c.j.i.s.Initializer$ - JavaFX version: 11.0.3.8-jpro+0-2021-01-03-144529

FlorianKirmaier commented 2 years ago

Thank you for the udpate! I think we forgot to make a new build after fixing it. Should be working now according to our tests. Can you retest it?

This is the timestamp of the build with the fix:

[info] c.j.i.s.Initializer$ - JPro: 2021.2.0-SNAPSHOT
[info] c.j.i.s.Initializer$ - JPro buildtime: 2021-09-28T22:56:59.643318+02:00[Europe/Berlin]
jigarjigjig commented 2 years ago

@FlorianKirmaier Issue is still there and for this build 50% of UI layout is broken for Firefox and Safari.

[info] c.j.i.s.Initializer$ - OS: Mac OS X [info] c.j.i.s.Initializer$ - JPro: 2021.2.0-SNAPSHOT [info] c.j.i.s.Initializer$ - JPro buildtime: 2021-09-28T22:56:59.643318+02:00[Europe/Berlin] [info] c.j.i.s.Initializer$ - Java version: 16.0.2 [info] c.j.i.s.Initializer$ - JVM: 16.0.2 Oracle Corporat

FlorianKirmaier commented 2 years ago

Hm, strange - the demo You've provided works with this version on my machine for Chrome, Firefox, and Safari.

Screenshot 2021-09-29 at 23 27 50

You've mentioned "50% of the UI is broken" - this sounds like a different issue. What do you mean by it?

jigarjigjig commented 2 years ago

@FlorianKirmaier Now

Screenshot 2021-09-30 at 1 13 42 PM

Before

Screenshot 2021-09-30 at 1 13 08 PM
FlorianKirmaier commented 2 years ago

@jigarjigjig Thank you for reporting this. This looks to me like a different bug - is the initial bug gone? Is this the same component, which had problems with the initial bug?

Are there any Exceptions, either in this javascript console or from the JVM? It's quite suspicious, that the content of the dropdown is also missing.

Maybe you can try out our old JavaFX fork, to pin down the error. Gradle

jpro.javafxVersion = "16"

Maven

        <plugin>
            <groupId>com.sandec.jpro</groupId>
            <artifactId>jpro-maven-plugin</artifactId>
            <version>${jpro.version}</version>
            <configuration>
                <javafxVersion>16</javafxVersion>
            </configuration>
        </plugin>
jigarjigjig commented 2 years ago

@FlorianKirmaier I could not reach to that part of UI as top buttons are not visible for pop up. But stand alone sample app is working fine for all browsers.

I tried with javafx 16 but result is same.

[info] a.e.s.Slf4jLogger - Slf4jLogger started [info] c.g.c.b.i.Finalizer - Couldn't access Thread.inheritableThreadLocals. Reference finalizer threads will inherit thread local values. [info] play.api.Play - Application started (Prod) (no global state) [info] p.c.s.AkkaHttpServer - Enabling HTTP/2 on Akka HTTP server...

[info] c.jpro.activity - Starting the server [info] c.j.i.s.Initializer$ - Starting JPro: https://www.jpro.one/ [info] c.j.i.s.Initializer$ - OS: Mac OS X [info] c.j.i.s.Initializer$ - JPro: 2021.2.0-SNAPSHOT [info] c.j.i.s.Initializer$ - JPro buildtime: 2021-09-28T22:56:59.643318+02:00[Europe/Berlin] [info] c.j.i.s.Initializer$ - Java version: 16.0.2 [info] c.j.i.s.Initializer$ - JVM: 16.0.2 Oracle Corporation [info] c.j.i.s.Initializer$ - JavaFX jar: file:/Users/jigar/.gradle/caches/modules-2/files-2.1/org.openjfx/javafx-graphics/16.0.0.2-jpro+0/ab82a017c5295fa0fdba293e27f5d615e483d154/javafx-graphics-16.0.0.2-jpro+0-mac.jar [info] c.j.i.s.Initializer$ - redirected OUT / ERR [info] c.j.i.s.Initializer$ - installed SLF4JBridge [warn] javafx - Unsupported JavaFX configuration: classes were loaded from 'unnamed module @40a279e6' [info] c.j.i.s.Initializer$ - finished init! [info] c.j.i.s.Initializer$ - JavaFX version: 16.0.0.2-jpro+0-2021-05-10-112227 [info] c.jpro - application requested: 0!blitzjpro [info] c.jpro - Creating Application: 0!blitzjpro [info] c.jpro - remoteAddress 127.0.0.1

jigarjigjig commented 2 years ago

@FlorianKirmaier

For JPro: 2021.1.4 same layout issue is seen in Safari but for Firefox and chrome is fine.

FlorianKirmaier commented 2 years ago

@jigarjigjig Ok, I'm quite sure these are two independent issues. Can you quickly test the other version, so you can tell me, which was the last JPro version without the layout issue? This way, we might be able to fix the issue, without creating another minimal reproducing sample application.

Can you also check the javascript console and the JVM console, for exceptions?