dalyIsaac / Whim

Pluggable dynamic window manager for Windows🏗️🪟
https://dalyisaac.github.io/Whim/
MIT License
147 stars 8 forks source link

Support Alpha Channel of Background and Foreground over Resource Files #908

Open devsecur opened 3 months ago

devsecur commented 3 months ago

Is there an existing issue for this?

Proposal

As a user, I would like to make the Bar background and other properties transparent to increase style and also to protect my OLED monitor from burn-in effects. I use wallpaper engine which animates my background and having a transparent bar would look stunning

Alternatives

No response

Additional context

No response

dalyIsaac commented 3 months ago

Might be able to take inspiration from WinUIEx: https://dotmorten.github.io/WinUIEx/concepts/CustomBackdrops.html

devsecur commented 3 months ago

Does this mean, I can just define a Custom Backdrop Type like

public class TransparentBackdrop : CompositionBrushBackdrop
{
    protected override Windows.UI.Composition.CompositionBrush CreateBrush(Windows.UI.Composition.Compositor compositor)
    {
      var brush = compositor.CreateColorBrush(Windows.UI.Color.FromArgb(255,255,0,0));
  }
}

barConfig.Backdrop = new(TransparentBackdrop)

and on Argb I can select Alpha channel as needed? Do I need to Import for CompositionBrushBackdrop?

dalyIsaac commented 3 months ago

Sorry, unfortunately not. That was more of a note for myself for future reference.