-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add transparency feature #164
base: master
Are you sure you want to change the base?
Conversation
Why is this PR not merged? |
I would prefer a more complete approach. If we enable transparency it would have its own slider from 0 to 100. Maybe 50% for you would not mean transparent for other users. |
src/application.c
Outdated
@@ -119,6 +126,7 @@ static void action_update_color_state(struct swappy_state *state, double r, | |||
state->settings.g = g; | |||
state->settings.b = b; | |||
state->settings.a = a; | |||
if (state->config->transparent) state->settings.a *= 0.5; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is just too much "magic number". Transparency, once enabled, should be configurable by the user.
58b4330
to
eb6cfd9
Compare
It is sometimes better if the drawing is not fully covering the picture but is semi-transparent. This patch adds a simple button to enable transparency. When this button is enabled, everything will be drawn with 50% alpha channel.
eb6cfd9
to
d64e183
Compare
This commit adds UI elements and config option for configuring the transparency value. The default value is 50% but it can be changed in the 5% - 95% range in 10% steps.
d64e183
to
f2b703c
Compare
It is sometimes better if the drawing is not fully covering the picture but is semi-transparent. This patch adds a simple button to enable transparency. When this button is enabled, everything will be drawn with 50% alpha channel.