The new placement is a more natural layout; the URL display is now adjacent to the minibuffer, so the connection is clear and no label is required. The input to a hints interaction will normally be short, so the usual wide minibuffer is not needed, leaving plenty of room for the URL display.
The panel was previously placed above the minibuffer, which unnecessarily obscures part of the content buffer. This change avoids that problem, fixing http://bugs.conkeror.org/issue343. --- This could be made optional, but I don't think the old layout has any advantage. --- content/minibuffer.xul | 2 +- modules/hints.js | 20 ++++++++++++-------- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/content/minibuffer.xul b/content/minibuffer.xul index 34fc442..15840dd 100644 --- a/content/minibuffer.xul +++ b/content/minibuffer.xul @@ -15,7 +15,7 @@ COPYING file. <hbox id="minibuffer" minibuffermode="message"> <label class="minibuffer" id="minibuffer-message" flex="1" crop="right" value=""/> <label class="minibuffer" id="minibuffer-prompt" crop="left" value=""/> - <textbox class="plain" id="minibuffer-input" flex="1"/> + <textbox class="plain" id="minibuffer-input" flex="1" minwidth="50pt"/> </hbox> </window> </overlay> diff --git a/modules/hints.js b/modules/hints.js index 67720d0..34d478d 100644 --- a/modules/hints.js +++ b/modules/hints.js @@ -410,14 +410,17 @@ hint_manager.prototype = { function hints_url_panel (hints, window) { var g = new dom_generator(window.document, XUL_NS); - var p = g.element("hbox", "class", "panel url", "flex", "0"); - g.element("label", p, "value", "URL:", "class", "url-panel-label"); - var url_value = g.element("label", p, "class", "url-panel-value", - "crop", "end", "flex", "1"); - window.minibuffer.insert_before(p); + var input = window.minibuffer.input_element; + input.setAttribute("flex", "0"); + input.setAttribute("width", input.getAttribute("minwidth")); + + var p = g.element("label", window.minibuffer.element, + "class", "url-panel-value", + "crop", "end", "flex", "1"); + window.minibuffer.element.insertBefore(p, null); p.update = function () { - url_value.value = ""; + p.value = ""; if (hints.manager && hints.manager.last_selected_hint) { var spec; try { @@ -425,13 +428,14 @@ function hints_url_panel (hints, window) { } catch (e) {} if (spec) { var uri = load_spec_uri_string(spec); - if (uri) url_value.value = uri; + if (uri) p.value = uri; } } }; p.destroy = function () { - this.parentNode.removeChild(this); + window.minibuffer.element.removeChild(p); + input.setAttribute("flex", "1"); }; return p; -- 1.7.5.3 _______________________________________________ Conkeror mailing list [email protected] https://www.mozdev.org/mailman/listinfo/conkeror
