Skip to content

Allow vibrancy effect #3002

Closed
Closed

Description

@sphw

Actually achieving vibrancy is fairly easy. You simply make the NSVisualEffectView the content view of the mac window. The issue with this is that it blurs the whole window, which is obviously not ideal. The way I see it there are couple different ways of going about this. There could be an API that allows you to create these VisualEffect views and then update their position and size. This may have issues with timing though, as things like element resizes would have to go through chromium to JS and then back to C++. Now this may prove to be negligible. The other solution would be to create a css property that can achieve this. This would prove to be harder. I am not completely sure where CSS is parsed, but a starting place may be the code behind -webkit-app-region. This seems like the most ideal way to implement this as it allows people to easily style their elements with it.

Activity

  1. changed the title [-]Vibrancy OS X[/-] [+]Allow vibrancy effect[/+] on Oct 6, 2015
  2. JoshTheDerf commented on Oct 6, 2015

    @JoshTheDerf

    Also see the webkit implementation which would allow such an effect in pure CSS, were it ported and included in Blink/Chromium. https://www.webkit.org/blog/3632/introducing-backdrop-filters/

  3. sphw commented on Oct 6, 2015

    @sphw
    Author

    The issue with using backdrop filters is that they wouldn't render through
    to background apps. As far as I know the only way to achieve this feature
    is the use of a NSVisualEffectView or something custom. We could modify
    backdrop filters to achieve this, but that may prove to be difficult.

    On Tue, Oct 6, 2015 at 7:47 AM dkfiresky [email protected] wrote:

    [image: 👍] +1 for the backdrop filters

    —
    Reply to this email directly or view it on GitHub
    #3002 (comment).

  4. JoshTheDerf commented on Oct 6, 2015

    @JoshTheDerf

    @wisesascha Ah, I figured they'd probably cover that. Not sure how that would work.

  5. ggamel commented on Oct 9, 2015

    @ggamel
    Contributor

    Having the ability to easily toggle vibrancy will bring apps under OS X even closer to native. 👍 on adding this effect as a toggle.

  6. evgenyzinoviev commented on Dec 1, 2015

    @evgenyzinoviev

    For everyone interested in Vibrancy effect I've made a small example on how to do it https://github.com/evgenyzinoviev/electron-vibrancy-demo/

  7. daviddfm commented on Jan 29, 2016

    @daviddfm

    Being able to enable blur purely on the Mac window behind BrowserWindow would be huge. No need to support HTML blur - the right blur effect would blur against the Mac's background. It would give Electron apps a native feel which could be visible in any part of the HTML page simply by using background:transparent; Consider this a vote for enabling this alongside transparent:true with something like transparent_blur: 10;

  8. knpwrs commented on Jan 29, 2016

    @knpwrs

    Count 👍 for me as well. Is there anything in particular that would prevent this from shipping if somebody were to formalize the example by @evgenyzinoviev into a pull request?

  9. ggamel commented on Jan 29, 2016

    @ggamel
    Contributor

    It would be really quite nice if @evgenyzinoviev or anyone else with understanding of NSVisualEffectView opted to submit a PR for Vibrancy. Had I the ability and experience, I'd work on this.

    This is an enhancement many will utilize.

  10. evgenyzinoviev commented on Jan 29, 2016

    @evgenyzinoviev

    Vibrancy depends on enabled transparency, and since 0.36 (or since Chromium 47, more precisely) Electron has troubles with it. Right now I'm writing a project that has blurred transparent window and I'm forced to stick to 0.35 with patches because of that.

    I'm going to contribute this feature to Electron someday if nobody overtake me, but with transparency bug now it looks pretty terrible. I hope that Chromium guys will fix it. That is what should be done at first.

  11. 16 remaining items

  12. MikeLP commented on Oct 21, 2016

    @MikeLP

    Hey. It's awesome! Thanks for addon. So we will wait MacOs support.

  13. scherii commented on Oct 24, 2016

    @scherii

    @arkenthera Would this #7460 (comment) by @zcbenz help with support for macOS?

  14. 0x61726b commented on Oct 26, 2016

    @0x61726b

    Update: Mac version of electron-vibrancy will be live probably this weekend. You can try the test app on mac now and get something like this.

    Also light/dark materials are available through options object. Thanks for @scherii for his help on testing.

  15. controversial commented on Nov 7, 2016

    @controversial

    @arkenthera Would you be willing to submit a PR for this?

  16. 0x61726b commented on Nov 7, 2016

    @0x61726b

    Edit: FYI #7898 has been merged.

  17. kevinsawicki commented on Nov 21, 2016

    @kevinsawicki
    Contributor

    Fixed by #7898 and released in 1.4.7, closing this out.

  18. matthiasg commented on Apr 27, 2018

    @matthiasg

    @arkenthera #7898 only supports mac while https://github.com/arkenthera/electron-vibrancy supports windows too. Any specific reason for only merging Mac ?

  19. danbulant commented on Aug 4, 2020

    @danbulant

    @kevinsawicki shouldn't be closed as this supports only MacOS, not windows or linux. (which is quite sad, I would love to see those effects on Linux)

  20. embu18 commented on Sep 26, 2020

    @embu18

    @kevinsawicki shouldn't be closed as this supports only MacOS, not windows or linux. (which is quite sad, I would love to see those effects on Linux)

    The same... Really wish to use it. I've lost all desire to develop desktop app for linux on Electron because of lack of this effect =(
    And I would like to contribute, but dont know how to do it exactly. Do I need to write a plugin on GTK for Electron or what?

  21. 0xENDER commented on Oct 26, 2020

    @0xENDER

    When will this come to windows? (at least windows 10)
    It's possible to get a blurred window on Windows 10 using this module: https://github.com/Seo-Rii/electron-acrylic-window
    It's pretty stable.
    2020-10-26-14-10-38

  22. kylewelsby commented on Oct 26, 2020

    @kylewelsby
  23. 0xENDER commented on Oct 26, 2020

    @0xENDER

    Hmmm, ok. I'll try to get in contact with the module owner to make a pull request.

  24. velllu commented on Jun 9, 2023

    @velllu

    Still nothing? Would be cool to have in vs code

  25. 0xENDER commented on Jun 9, 2023

    @0xENDER

    I believe they have been working on this recently. (IDK if it was released or not)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions