Merge pull request #510 from HardDie/master

Toggle opacity
This commit is contained in:
Alex 2019-11-28 21:05:00 +00:00 committed by GitHub
commit de0a3cb020
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -295,8 +295,10 @@ auto waybar::Bar::toggle() -> void {
visible = !visible;
if (!visible) {
window.get_style_context()->add_class("hidden");
window.set_opacity(0);
} else {
window.get_style_context()->remove_class("hidden");
window.set_opacity(1);
}
setExclusiveZone(width_, height_);
wl_surface_commit(surface);