Bug 396121 - make Applications prefpane the right height on all primary platforms. r=mconnor, a1.9=mconnor

git-svn-id: svn://10.0.0.236/trunk@236479 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
rob_strong%exchangecode.com
2007-09-21 23:12:21 +00:00
parent d2f2277947
commit 340c3e3e49
4 changed files with 48 additions and 29 deletions

View File

@@ -53,7 +53,7 @@
<overlay id="ApplicationsPaneOverlay"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<prefpane id="paneApplications" onpaneload="gApplicationsPane.init();"
<prefpane id="paneApplications" onpaneload="gApplicationsPane.init();" flex="1"
helpTopic="prefs-applications" helpURI="chrome://browser/locale/help/help.rdf">
<preferences id="feedsPreferences">
@@ -78,37 +78,34 @@
<key key="&focusSearch2.key;" modifiers="accel" oncommand="gApplicationsPane.focusFilterBox();"/>
</keyset>
<vbox flex="1" class="contentPane">
<hbox align="center">
<label accesskey="&filter.accesskey;" control="filter">&filter.label;</label>
<textbox id="filter" flex="1" oninput="gApplicationsPane.onFilterInput();"
onkeypress="gApplicationsPane.onFilterKeyPress(event);"/>
<button id="clearFilter" icon="clear" label="&clear.label;" accesskey="&clear.accesskey;"
oncommand="gApplicationsPane.clearFilter();" disabled="true"/>
</hbox>
<hbox align="center">
<label accesskey="&filter.accesskey;" control="filter">&filter.label;</label>
<textbox id="filter" flex="1" oninput="gApplicationsPane.onFilterInput();"
onkeypress="gApplicationsPane.onFilterKeyPress(event);"/>
<button id="clearFilter" icon="clear" label="&clear.label;" accesskey="&clear.accesskey;"
oncommand="gApplicationsPane.clearFilter();" disabled="true"/>
</hbox>
<separator class="thin"/>
<separator class="thin"/>
<label id="filterActiveLabel" hidden="true">
&filterActive.label;
</label>
<label id="filterActiveLabel" hidden="true">
&filterActive.label;
</label>
<separator class="thin"/>
<richlistbox id="handlersView" orient="vertical" style="height: 300px"
onselect="gApplicationsPane.onSelectionChanged();"
persist="lastSelectedType">
<listheader equalsize="always" style="border: 0; padding: 0;">
<treecol id="typeColumn" label="&typeColumn.label;" value="type"
accesskey="&typeColumn.accesskey;" persist="sortDirection"
flex="1" onclick="gApplicationsPane.sort(event);"
sortDirection="ascending"/>
<treecol id="actionColumn" label="&actionColumn.label;" value="action"
accesskey="&actionColumn.accesskey;" persist="sortDirection"
flex="1" onclick="gApplicationsPane.sort(event);"/>
</listheader>
</richlistbox>
</vbox>
<separator class="thin"/>
<richlistbox id="handlersView" orient="vertical"
onselect="gApplicationsPane.onSelectionChanged();"
persist="lastSelectedType">
<listheader equalsize="always" style="border: 0; padding: 0;">
<treecol id="typeColumn" label="&typeColumn.label;" value="type"
accesskey="&typeColumn.accesskey;" persist="sortDirection"
flex="1" onclick="gApplicationsPane.sort(event);"
sortDirection="ascending"/>
<treecol id="actionColumn" label="&actionColumn.label;" value="action"
accesskey="&actionColumn.accesskey;" persist="sortDirection"
flex="1" onclick="gApplicationsPane.sort(event);"/>
</listheader>
</richlistbox>
</prefpane>
</overlay>

View File

@@ -160,6 +160,15 @@ radio[pane=paneAdvanced][selected="true"] {
/* ----- APPLICATIONS PREFPANE ----- */
#BrowserPreferences[animated="true"] #handlersView {
height: 25em;
}
#BrowserPreferences[animated="false"] #handlersView {
-moz-box-flex: 1;
}
.content-box > separator {
border: 1px solid red;
}

View File

@@ -108,6 +108,15 @@ radio[pane=paneAdvanced][selected="true"] {
background-color: -moz-Dialog;
}
/* Applications Pane */
#BrowserPreferences[animated="true"] #handlersView {
height: 25em;
}
#BrowserPreferences[animated="false"] #handlersView {
-moz-box-flex: 1;
}
/* File Field Widget */
filefield {
margin: 2px 4px;

View File

@@ -573,6 +573,7 @@
#endif
}
}
this.setAttribute("animated", this._shouldAnimate ? "true" : "false");
var panes = this.preferencePanes;
var lastPane = null;
@@ -735,6 +736,9 @@
this._paneDeck.selectedIndex = i;
if (this.type != "child") {
if (aPaneElement.hasAttribute("flex") && this._shouldAnimate &&
prefpanes.length > 1)
aPaneElement.removeAttribute("flex");
// Calling sizeToContent after the first prefpane is loaded
// will size the windows contents so style information is
// available to calculate correct sizing.