gnome-shellgnome-shell-extensionsgjs

Update ScrollView when height of a notification in the notification tray changes


So in regards to my last question, I am currently struggling with expanded notifications clogging up the notification tray. The problem is, that the vertical ScrollBar of the notification tray does not show up when it needs to when e.g. too many notifications are expanded. My current solution changes the height of the notification in order to display the full content of the notification. Here is a picture showing the overflow. I am looking through the gnome-shell code and any documentations I can find, but I have not found any way to update the ScrollView. When setting the vscrollbar policy to St.PolicyType.ALWAYS, then still the scrollbar does not scroll at all. This might also be due to the notification bodies being fixed according to how many notifications are in the list currently.

Does anyone have any deeper knowledge on this?


Solution

  • I have figured it out. Changing the height of the notification changes it's visible height, not the one recognized by the parent's layout manager. Changing the parent's layout manager to class LabelExpanderLayout(), changing it's height on expand then updating the layout solves this problem.