ErikReider / SwayNotificationCenter

A simple GTK based notification daemon for SwayWM
GNU General Public License v3.0
1.15k stars 59 forks source link

Add control center visibility class #371

Closed System64fumo closed 4 months ago

System64fumo commented 5 months ago

This addresses https://github.com/ErikReider/SwayNotificationCenter/issues/359

Animation demo:

https://github.com/ErikReider/SwayNotificationCenter/assets/72354122/f80e42ce-3126-4a6e-b7d7-62e54cff4f4c

CSS used:

.control-center {
    margin-right: -400px;
    margin-left: 400px;
}

.open .control-center {
    transition: all 0.25s ease-out;
    margin: 0px;
}
ErikReider commented 5 months ago

There should be a built-in css selector that does this? Not really sure though

System64fumo commented 5 months ago

There is :active, But i don't think it works for this case as the whole window is hidden instead of just some widget. I've tried doing something like this before but haven't gotten it working before.