feat: partially hide waybar on toggle

This commit is contained in:
Alex
2019-04-15 11:11:00 +02:00
parent 316b948d86
commit ecc5f48dd7
2 changed files with 9 additions and 0 deletions

View File

@ -266,6 +266,11 @@ auto waybar::Bar::toggle() -> void
{
visible = !visible;
auto zone = visible ? height_ : 0;
if (!visible) {
window.get_style_context()->add_class("hidded");
} else {
window.get_style_context()->remove_class("hidded");
}
zwlr_layer_surface_v1_set_exclusive_zone(layer_surface, zone);
wl_surface_commit(surface);
}