diff options
Diffstat (limited to 'overrides/endless_private')
-rw-r--r-- | overrides/endless_private/search_box.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/overrides/endless_private/search_box.js b/overrides/endless_private/search_box.js index afda860..e43d456 100644 --- a/overrides/endless_private/search_box.js +++ b/overrides/endless_private/search_box.js @@ -53,11 +53,14 @@ const SearchBox = new Lang.Class({ } }, - _init: function(props) { + _init: function (props={}) { + if (['width_chars', 'width-chars', 'widthChars'].every(name => + typeof props[name] === 'undefined')) { + props.width_chars = BOX_WIDTH_CHARS; + } this.parent(props); this.primary_icon_name = 'edit-find-symbolic'; - this.set_width_chars(BOX_WIDTH_CHARS); this._auto_complete = new Gtk.EntryCompletion(); |