ErikReider / SwayNotificationCenter

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

[Bug] .control-center-list not showing #351

Closed System64fumo closed 9 months ago

System64fumo commented 9 months ago

Describe the bug .control-center-list shows up when you first start swaync but .control-center-list-placeholder does not (As if there is an invisible notification) But if you receive a notification and close out of it the placeholder shows up but the list doesn't.

Ideally i would like for the placeholder to be shown when there are no notifications and for the list to be visible at all times (I'm using min-height) to get a dynamically sized notification center.

To Reproduce Steps to reproduce the behavior:

  1. start swaync from a terminal with GTK_DEBU=interactive
  2. Toggle the notification center (swaync-client -t)
  3. Observe that the placeholder is not visible but list is visible
  4. Send notification (notify-send "Test")
  5. Close the test notification
  6. Observe that the list is now gone and that the placeholder is visible
  7. In the GTK inspector, Navigate and hide the placeholder (visible FALSE)
  8. Observe the list magically coming back!

Expected behavior Placeholder would be visible when there are no active notifications List to be visible at all times (As it currently is despite this bug)

Screenshots ss0 ss1 ss2

Desktop (please complete the following information):

Additional context Red is the list (min-height: 5px) Green is the placeholder

ErikReider commented 9 months ago

Thanks! Fixed :)

System64fumo commented 9 months ago

The place holder is now working as intended but the list is now only shown when there are notifications? Could you please make the list visible at all times? (I'm using it to make my notif center dynamically sized with min-height)

ErikReider commented 9 months ago

Isn't possible with the placeholder visible. Can't you set min-height to the parent "stack" widget?

System64fumo commented 9 months ago

I'm afraid not, The stack widget cannot be dynamically sized. Could we perhaps have a config to "show-placeholder-when-empty"?

Ok technically all of this is just a workaround for a different issue https://github.com/ErikReider/SwayNotificationCenter/issues/330#issue-1955634576 If we had the control center elements inside of another main box (.control-center > box > box (modules)) it would be better That or the ability to have the main control center box have a minimum and maximum size config and for it to dynamically increase in height as more widgets get added instead of having a fixed size