Giter Site home page Giter Site logo

Comments (11)

raphamorim avatar raphamorim commented on July 26, 2024 1

Hey @Cthutu pushed a correction for those issues in 3b482ff. Please pull latest main and check if still happens.

I will close this issue after validate the fix with @filaruina

from rio.

Cthutu avatar Cthutu commented on July 26, 2024 1

Your changes fixes the first issue (woohoo!). However, it doesn't render correctly on a tiled window manager (the window opens at the usual size then immediately gets resized and repositioned by the desktop manager) or when you resize the window (e.g. maximising). I think this is just because you don't redraw on resize in the demo? I haven't had enough time lately to get to the bottom of it.

from rio.

raphamorim avatar raphamorim commented on July 26, 2024 1

Yes, that's "expected" (not a bug) in demo since it only listen to ScaleFactor updates but is ignoring resize events without scale factor updates. Would be good to add it to the examples.

Also, I think it happens the same for rect case when happens a resize:

Screenshot 2023-05-26 at 09 59 53

For now I will close this issue but feel to update the examples 🙏

Other thing to take in consideration is the examples are using fixed LogicalSize, idk how it behaves in Linux (considering test PhysicalSize instead)

from rio.

Cthutu avatar Cthutu commented on July 26, 2024

This is the result of the rect.rs example. I am not sure if it's correct:
image

It also suffers from resizing problems.

from rio.

raphamorim avatar raphamorim commented on July 26, 2024

Hey there @Cthutu , yes I am aware (unfortunately). Same behaviour happens in the macos when having an external monitor with a scale factor different than 2.0. The initial render of sugarloaf has a hardcoded logic to start calculating layouts with 2.0, this need to be fixed.

Rect is the only case that's correct because doesn't the scale calculation.

from rio.

raphamorim avatar raphamorim commented on July 26, 2024

I plan to look on that soon, but feel free to send a PR as well 🙏

from rio.

raphamorim avatar raphamorim commented on July 26, 2024

BTW same happens to Rio in macos when using external monitor with 1.0 scale factor.

image

from rio.

Cthutu avatar Cthutu commented on July 26, 2024

If you want pixel perfect you should be using PhysicalSize. If you want to take into account the user's settings for monitor scale factors etc, LogicalSize is your friend.

from rio.

raphamorim avatar raphamorim commented on July 26, 2024

Yea, I like LogicalSize for the terminal as an user application but thinking in enable it as configuration option, then you can choose what fits better for your case.

from rio.

filaruina avatar filaruina commented on July 26, 2024

BTW same happens to Rio in macos when using external monitor with 1.0 scale factor.

image

This is fixed for me using main version. Running on ubuntu

from rio.

raphamorim avatar raphamorim commented on July 26, 2024

Great, thank you @filaruina for testing it too !

from rio.

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.