summaryrefslogtreecommitdiff
path: root/overrides/endless_private
diff options
context:
space:
mode:
authorRory MacQueen <rorymacqueen@gmail.com>2016-01-14 11:33:20 -0200
committerRory MacQueen <rorymacqueen@gmail.com>2016-01-15 14:00:18 -0200
commit90dbaedb382a330d7ecb85b8ee5ae59306b8d027 (patch)
tree9392699a0db6f0b00f667fd4b3f70c3cd7647275 /overrides/endless_private
parent2938e3c977ab10212f5578e953a751686a068bfd (diff)
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]
Diffstat (limited to 'overrides/endless_private')
-rw-r--r--overrides/endless_private/search_box.js7
1 files changed, 5 insertions, 2 deletions
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();