Git Product home page Git Product logo

Comments (7)

whoozle avatar whoozle commented on June 11, 2024

Interesting, there's also small black artefacts (looks like area under mouse wasn't properly repainted) in your gif

what operating system are you using? Is it Xorg or Wayland? is it hardware accelerated chrome? what GPU do you have? do you have any additional styles in your html file?

from qmlcore.

whoozle avatar whoozle commented on June 11, 2024

I can't reproduce it using official Chrome Linux build on my machine, Gentoo/Xorg/1050Ti
Version 91.0.4472.114 (Official Build) unknown (64-bit)

from qmlcore.

tomager avatar tomager commented on June 11, 2024

Both are Windows (mostly I do dev on linux server and use Windows for desktop). Happens on two machines (both Windows), with integrated Intel and Nvidia graphics.

Brave: Version 1.26.74 Chromium: 91.0.4472.124 (Official Build) (64-bit)
Chrome: Version 91.0.4472.124 (Official Build) (64-bit)

The black artifacts on the gif are a bug in the screen capture tool and aren't related to this issue.

from qmlcore.

tomager avatar tomager commented on June 11, 2024

No, there is no extra styling anywhere. The html file is the one generated from the --boilderplate option.

from qmlcore.

whoozle avatar whoozle commented on June 11, 2024

@tomager we had this feature request for a while (although privately).

Instead of keeping full screen rectangle anchored maybe provide background/colour to the context itself. I think this may solve all kind of problems in different html engines.
On other hand this will require adding it to native ports, but this shouldn't be a problem.

Could you do a few tests for me please?

  1. try do something like the following in the root item:
onCompleted: {
  context.style('background-color', 'blue');
}

Then check chrome web inspector that style was actually applied and visible in tag with id qml-context-index and try resizing it.

  1. Try setting this attribute directly in chrome web inspector to the <body> tag to see if it's working. I assume this will fix it.

from qmlcore.

whoozle avatar whoozle commented on June 11, 2024

Interesting, I think I managed to reproduce this issue after setting style on context div!

Could you try

--- a/platform/html5/html.js
+++ b/platform/html5/html.js
@@ -563,7 +563,7 @@ exports.init = function(ctx) {
        log("Context: window size: " + w + "x" + h);
        div = html.createElement(ctx, tag)
        div.dom.id = divId
-       win.on('resize', function() { ctx.width = win.width(); ctx.height = win.height(); });
+       win.on('resize', function() { ctx.width = win.width() + 1; ctx.height = win.height(); });
        var body = html.getElement(ctx, 'body')
        body.append(div);
    }

I think this is rounding error in chrome somewhere

from qmlcore.

tomager avatar tomager commented on June 11, 2024

Super-- that fixes it for me. Submitted a pull request that does the height and init cases as well.

from qmlcore.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.