Coder Social home page Coder Social logo

Comments (13)

lilpard-mk avatar lilpard-mk commented on August 19, 2024 2

OMG!!!! That's fantastic!!! Thanks you sososososososososo much!!!! πŸ₯³πŸ₯³πŸ₯³πŸ₯³πŸ₯³

from flutter_acrylic.

Adrian-Samoticha avatar Adrian-Samoticha commented on August 19, 2024 1

Alright, I'm slowly approaching the finish line. So, this is the current status:
The library will offer a widget called TransparentMacOSSidebar. Using it is as simple as wrapping it around an existing sidebar in your project.

Screen.Recording.2022-10-30.at.19.29.06.mov

As you can see, the widget reacts to resize events automatically. There was nothing β€œspecial” I needed to do to make it work with the animation β€” it β€œjust works” (I just had to make sure the MacOSSidebar was inside the TweenAnimationBuilder's build method, rather than wrapping the TweekAnimationBuilder inside the MacOSSidebar, but that was it). You'll be able to see the example for yourself.

More complex usages might be a little less straightforward, but I will document the library's usage as well as possible.

from flutter_acrylic.

lilpard-mk avatar lilpard-mk commented on August 19, 2024 1

That's so amazing!!!!! When my app is accomplished you'll be the FIRST ONE on the thank list!!!!! 😘😘😘😘😘😘

from flutter_acrylic.

Adrian-Samoticha avatar Adrian-Samoticha commented on August 19, 2024

Such functionality is not supported at the moment. I'm currently not quite sure what's the best way to implement it, though.
I wanted to check how macos_ui goes about solving this issue, however, it turns out that it does, in fact, not support window tinting either.

One way would be to add support for adding multiple NSVisualEffectViews to flutter_acrylic and implement a way to manipulate them through Dart code.

Another way would be to find a way to retrieve the current wallpaper and window position and implement the window tinting yourself. While the window position can be retrieved using window_utils, I have not found a package that allows you to retrieve the system's desktop wallpaper. Perhaps that could be done via the wallpaper crate and Dart/Rust ffi, though?

I'd have to do a little bit of research to find out what's the best way forward.

from flutter_acrylic.

Adrian-Samoticha avatar Adrian-Samoticha commented on August 19, 2024

Turns out that macOS asks the user for permission when a program attempts to retrieve the current wallpaper using the wallpaper crate which might make it less than ideal for this specific use case.

from flutter_acrylic.

lilpard-mk avatar lilpard-mk commented on August 19, 2024

Alright, thanks for answering! And thanks for all the works that you have done!

from flutter_acrylic.

Adrian-Samoticha avatar Adrian-Samoticha commented on August 19, 2024

No problem. I am currently a little busy with some personal matters, but I'll look further into this issue once I'm free.

from flutter_acrylic.

Adrian-Samoticha avatar Adrian-Samoticha commented on August 19, 2024

I managed to add two NSVisualEffectViews to a single window and it now looks like this:

image

There are still certain issues with this implementation (such as the transparent subview blocking mouse events) but given that what we're after seems very much possible I guess I'd assign myself. :)

from flutter_acrylic.

Adrian-Samoticha avatar Adrian-Samoticha commented on August 19, 2024

Alright, I am now able to manipulate the views through Dart code, and the performance is pretty good as well. I am manipulating the view 125 times per second right here:

Screen.Recording.2022-10-22.at.19.48.38.mov

This means that animations are very well possible. Also, the alpha value of the views can also be changed, so applying them to pop-up windows and the like (which may change their transparency during their open/close animations) is all fair game. :D

Things are certainly going well.

from flutter_acrylic.

lucasjinreal avatar lucasjinreal commented on August 19, 2024

@Adrian-Samoticha does this merged? this is exactly I need, does it support windows as well BTW?

from flutter_acrylic.

Adrian-Samoticha avatar Adrian-Samoticha commented on August 19, 2024

@Adrian-Samoticha does this merged? this is exactly I need, does it support windows as well BTW?

This feature has been present in flutter_acrylic for a while now and is fully functional on macOS. Windows doesn't have wallpaper tinting, so I'm not sure how useful this feature would be on Windows. Judging by your recent issue (#60) what you're after is simply an opaque window with a transparent sidebar, though. You could achieve that by setting the material to WindowEffect.acrylic and wrapping your content view with a container that has an opaque background, though.

from flutter_acrylic.

lucasjinreal avatar lucasjinreal commented on August 19, 2024

@Adrian-Samoticha I tried wrapping content in white background, but takes no effect.

from flutter_acrylic.

Adrian-Samoticha avatar Adrian-Samoticha commented on August 19, 2024

@jinfagang Can you show me your code and a screenshot of what you are seeing? If you remember this post of mine, this is basically would you'd need to do on Windows.

from flutter_acrylic.

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.