当通知托盘中的通知高度发生变化时更新 ScrollView

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

所以关于我的 , 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. 我正在查看 gnome-shell 代码和我能找到的任何文档,但我还没有找到任何更新 ScrollView 的方法。将 vscrollbar 策略设置为 St.PolicyType.ALWAYS 时,滚动条仍然根本不滚动。这也可能是由于通知主体已根据当前列表中的通知数量进行了修复。

有没有人对此有更深入的了解?

我想通了。更改通知的高度会更改它的可见高度,而不是父级布局管理器识别的高度。将父级的布局管理器更改为 class LabelExpanderLayout(),更改展开时的高度然后更新布局可以解决此问题。