dbusServices/extensions: Stop stacking frames

We currently use separate frames for the details expander and the
expanded details. That layout works as long as frames are boxy (as
in the default GTK3 style), but breaks down with rounded corners
(as in the default GTK4 style).

In order to work with either style, adapt the layout to use a single
surrounding frame and appropriate borders as separator.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1495>
This commit is contained in:
Florian Müllner
2020-11-13 02:36:08 +01:00
committed by Marge Bot
parent 9bb91ca875
commit 99a796e426
3 changed files with 16 additions and 14 deletions

View File

@ -192,7 +192,10 @@ var ExtensionPrefsDialog = GObject.registerClass({
this._expanderArrow.icon_name = this._revealer.reveal_child
? 'pan-down-symbolic'
: 'pan-end-symbolic';
this._syncExpandedStyle();
});
this._revealer.connect('notify::child-revealed',
() => this._syncExpandedStyle());
try {
ExtensionUtils.installImporter(extension);
@ -211,6 +214,13 @@ var ExtensionPrefsDialog = GObject.registerClass({
}
}
_syncExpandedStyle() {
if (this._revealer.reveal_child)
this._expander.get_style_context().add_class('expanded');
else if (!this._revealer.child_revealed)
this._expander.get_style_context().remove_class('expanded');
}
_setError(exc) {
this._errorView.buffer.text = `${exc}\n\nStack trace:\n`;
// Indent stack trace.