Comments (14)
Alright, some progress: π
What's cool is that Visual Effect Subviews still work perfectly fine. What isn't cool is that miniaturizing/restoring the window causes significant performance issues and interestingly, Flutter-drawn widgets have a shadow applied to them, but it isn't being updated, so the window can quickly end up looking like this:
Either way, I'm happy to have progressed on this issue and will try to fix those issues.
from flutter_acrylic.
Alright. I am sorry that it took me over eight months to resolve this issue, but #48 finally resolves it. However, there is a little bug that I couldn't fix (#49), so please be aware of that.
from flutter_acrylic.
The macOS port offers a variety of different WindowEffects that map to equivalent NSVisualEffectView.Materials.
I have tried to make the Windows-only WindowEffects map to macOS Materials that are βas close as possibleβ to their Windows counterparts, but obviously, they aren't going to be the same.
None of those materials are completely invisible, though. That said, I believe there is some way to achieve what you want. The macOS terminal offers a way to customize both the opacity and the blur effect of the terminal window:
I'm not going to assign myself just yet, but I might do some research to find out if (and how) something like this may be possible.
from flutter_acrylic.
Apparently making it possible to control the window's opacity and blur radius the same way the macOS terminal does is not really feasible since it relies on CGSSetWindowBackgroundBlurRadius
, which is part of a non-public API whose usage may result in your app breaking in the future (and Apple does indeed deny App Store submissions if they happen to contain calls to this API).
Though if I understand correctly, all you're after is a way to make the window completely transparent, leaving only the Flutter view to be visible? That may be possible, although I'm unsure how well that would integrate into the current project structure.
from flutter_acrylic.
Any update on this?
It's on my radar, though not actively being worked on at the moment.
EDIT: What's interesting, is that while I was initially developing the macOS support, I somehow managed to trigger a bug that actually achieved exactly what @dlewis2017 is requesting (the window got entirely invisible), but I cannot remember how I triggered it, nor do I know how well it can be implemented in the code base.
I'll take a look at that when I get some free time.
from flutter_acrylic.
Appreciate it! @Adrian-Samoticha
from flutter_acrylic.
Not a bug. Just make sure to set the alpha to 0.
await Window.setWindowAlphaValue(0.5);
from flutter_acrylic.
Sorry for all the comments but this may actually be a bug. I want just the background to be transparent. Not all components within it. Equivalent code should ideally produce the same effect in different systems for Flutter.
As you can see with the Mac application, the whole screen is see through when the alpha is set. When the alpha is not set, the transparency isn't working well. In Windows it works as intended.
from flutter_acrylic.
Not all the effects are available on every platform, same for the available functions.
Both, macOS & Windows do it differently, we do not mimic the effect within Flutter but use system's APIs to achieve it. There is no way to make behaviour exactly the same, just pick the best one you find according to your requirement on each platform.
Infact, on Windows this acrylic effect is limited to UWP apps, but this plugin does achieve it after a "hack" in Windows 10.
from flutter_acrylic.
Okay cool, I appreciate you potentially looking into it! I'll use the alpha for now set to .6/7 if Mac is the OS
from flutter_acrylic.
Windows implementation is also completely undocumented in this plugin for Windows 10.
However, I guess real issue will be rejection by Apple's App Store. And I guess, not a good thing.
from flutter_acrylic.
@Adrian-Samoticha Thanks for looking into that. My goal was to make the Flutter window transparent while leaving inside components visible. So to mimic how it looks in Windows above, but in MacOS. As of now it seems MacOS doesn't make the window transparent, and using the work around (setting the alpha) causes everything to be transparent.
from flutter_acrylic.
Electron seems to support this out of the box:
https://www.electronjs.org/docs/latest/api/browser-window
search for "transparent"
seems to also have cross platform support. I don't see any usages of CGSSetWindowBackgroundBlurRadius
, is it a special case somehow because they are using chromium?
from flutter_acrylic.
Any update on this?
from flutter_acrylic.
Related Issues (20)
- expose aera transparent ratio API on windows10
- macOS broken HOT 10
- Usage of `macos_window_utils` broken in 1.1.1 HOT 6
- [Question] is there any way for customize unfocused window color of Window Effects like mica/acrylic/tabbed?
- windows11 acrylic effect changed
- Upgrade to macos_window_utils 1.1.2
- Replace the deprecated `backgroundColor` with `colorScheme.background` in `/example/lib/widgets/macos_action_menu/description_display.dart`
- Setup linting and fix linter errors
- Improve macos_window_utils import
- hideTitle takes no effect HOT 3
- Facing error after upgrading to 1.1.2 HOT 12
- Not working on macOS 12.3.1 (21E258) and flutter 3.7.11 HOT 8
- Not work after importing flutter_easyloading HOT 2
- macOS - Running in release mode causes program to hang HOT 9
- flutter_acrylic.Window.hideWindowControls() not support on linux HOT 1
- Not Working on Android ,
- Tint colour does not work on Mac OS when using WindowEffect.acrylic HOT 2
- WindowEffect.aero not working properly in windows 11 its just transparent
- No acrylic effect at all - Windows 11 stable release HOT 4
- Crash on linux HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flutter_acrylic.