From 90dbaedb382a330d7ecb85b8ee5ae59306b8d027 Mon Sep 17 00:00:00 2001 From: Rory MacQueen Date: Thu, 14 Jan 2016 11:33:20 -0200 Subject: Don't enforce a minimum size for search box Instead allow clients of this widget to set their own minimum and maximum sizes. [endlessm/eos-sdk#3974] --- overrides/endless_private/search_box.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'overrides/endless_private') diff --git a/overrides/endless_private/search_box.js b/overrides/endless_private/search_box.js index f076962..48dd96c 100644 --- a/overrides/endless_private/search_box.js +++ b/overrides/endless_private/search_box.js @@ -41,11 +41,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(); -- cgit v1.2.3