st: Add StPolicyType enum
In order to replace GTK+'s GtkPolicyType. It's bit-compatible with it, too. All callers have been updated to use it. This is a purely accessory change in terms of X11 Display usage cleanup, but helps see better what is left. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/317
This commit is contained in:
@ -101,7 +101,7 @@ var NotificationsBox = class {
|
||||
style_class: 'screen-shield-notifications-container' });
|
||||
|
||||
this._scrollView = new St.ScrollView({ x_fill: false, x_align: St.Align.START,
|
||||
hscrollbar_policy: Gtk.PolicyType.NEVER });
|
||||
hscrollbar_policy: St.PolicyType.NEVER });
|
||||
this._notificationBox = new St.BoxLayout({ vertical: true,
|
||||
style_class: 'screen-shield-notifications-container' });
|
||||
this._scrollView.add_actor(this._notificationBox);
|
||||
@ -258,7 +258,7 @@ var NotificationsBox = class {
|
||||
// block scrollbars while animating, if they're not needed now
|
||||
let boxHeight = this._notificationBox.height;
|
||||
if (this._scrollView.height >= boxHeight)
|
||||
this._scrollView.vscrollbar_policy = Gtk.PolicyType.NEVER;
|
||||
this._scrollView.vscrollbar_policy = St.PolicyType.NEVER;
|
||||
|
||||
let widget = obj.sourceBox;
|
||||
let [, natHeight] = widget.get_preferred_height(-1);
|
||||
@ -268,7 +268,7 @@ var NotificationsBox = class {
|
||||
transition: 'easeOutQuad',
|
||||
time: 0.25,
|
||||
onComplete() {
|
||||
this._scrollView.vscrollbar_policy = Gtk.PolicyType.AUTOMATIC;
|
||||
this._scrollView.vscrollbar_policy = St.PolicyType.AUTOMATIC;
|
||||
widget.set_height(-1);
|
||||
},
|
||||
onCompleteScope: this
|
||||
|
Reference in New Issue
Block a user