popupMenu: Break separator drawing code out of PopupSeparatorMenuItem
https://bugzilla.gnome.org/show_bug.cgi?id=681797
This commit is contained in:

committed by
Jasper St. Pierre

parent
d485fcf9ec
commit
c0d3a14ac2
@ -404,9 +404,17 @@ const PopupSeparatorMenuItem = new Lang.Class({
|
||||
this.parent({ reactive: false,
|
||||
can_focus: false});
|
||||
|
||||
this._drawingArea = new St.DrawingArea({ style_class: 'popup-separator-menu-item' });
|
||||
this.addActor(this._drawingArea, { span: -1, expand: true });
|
||||
this._drawingArea.connect('repaint', Lang.bind(this, this._onRepaint));
|
||||
this._separator = new HorzSeparator({ style_class: 'popup-separator-menu-item' });
|
||||
this.addActor(this._separator.actor, { span: -1, expand: true });
|
||||
}
|
||||
});
|
||||
|
||||
const HorzSeparator = new Lang.Class({
|
||||
Name: 'HorzSeparator',
|
||||
|
||||
_init: function (params) {
|
||||
this.actor = new St.DrawingArea(params);
|
||||
this.actor.connect('repaint', Lang.bind(this, this._onRepaint));
|
||||
},
|
||||
|
||||
_onRepaint: function(area) {
|
||||
|
@ -406,8 +406,8 @@ const SearchDisplay = new Lang.Class({
|
||||
|
||||
let providerIcon;
|
||||
if (!isAppsProvider) {
|
||||
let separator = new PopupMenu.PopupSeparatorMenuItem();
|
||||
providerBox.add(separator.actor);
|
||||
let separator = new PopupMenu.HorzSeparator({ style_class: 'search-section-separator' });
|
||||
providerBox.add(separator.actor, { expand: true });
|
||||
|
||||
providerIcon = new ProviderIcon(provider);
|
||||
providerIcon.connect('launch-search', Lang.bind(this, function(providerIcon) {
|
||||
|
Reference in New Issue
Block a user