Coder Social home page Coder Social logo

"Glowing" borders about jankyborders HOT 9 CLOSED

koekeishiya avatar koekeishiya commented on May 24, 2024 4
"Glowing" borders

from jankyborders.

Comments (9)

FelixKratz avatar FelixKratz commented on May 24, 2024 1

I have added a subtle glow effect which can be actived by passing glow(0xAARRGGBB) to a <color> argument.

from jankyborders.

FelixKratz avatar FelixKratz commented on May 24, 2024

Looks good. We could include this in the current configuration syntax as another special color argument e.g:

borders active_color=glow(0xAARRGGBB)

Or something like that.

I am still thinking about moving the drawing logic to a CALayer backed solution for GPU acceleration, where these animations could be included relatively easily, but I am not sure if that is worth the effort.

Maybe we start off with a static glow for now.

from jankyborders.

FelixKratz avatar FelixKratz commented on May 24, 2024

I am not sure this can be achieved only by tweaking the window shadow properties, afaik there is no way to change the color of the shadow. I can change positioning density etc. via:

extern CGError SLSSetWindowShadowParameters(int cid, uint32_t wid, float std, float density, int x_offset, int y_offset);

and there are some other properties to be controlled via

extern CGError SLSWindowSetShadowProperties(uint32_t wid, CFDictionaryRef properties);

but I have not seen a way to change the actual shadow color.

from jankyborders.

koekeishiya avatar koekeishiya commented on May 24, 2024

How about using https://developer.apple.com/documentation/coregraphics/1455205-cgcontextsetshadowwithcolor?language=objc

from jankyborders.

Bellavene avatar Bellavene commented on May 24, 2024

Was trying to install through --HEAD, and borders broke. They render somewhere outside the window. Reinstalled last release and it works ok.

from jankyborders.

FelixKratz avatar FelixKratz commented on May 24, 2024

Should be fixed on master.

from jankyborders.

Bellavene avatar Bellavene commented on May 24, 2024

Thank you! I still believe that animation would be more interesting : )

from jankyborders.

FelixKratz avatar FelixKratz commented on May 24, 2024

I will at some point explore simple animations on window focus/unfocus, but a permanently moving glow around the border is probably not something I am personally interested in.

If someone wants to give it a go, I will gladly accept a PR.

from jankyborders.

Bellavene avatar Bellavene commented on May 24, 2024

Thanks. Nah, I don't want permanently moving glow neither.

from jankyborders.

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.