[Overview] Make menu sizes relative to workspace area
Instead of setting a fixed size in the CSS which only works well with a limited range of screen resolutions, assign a relative size in the code. While this takes away some flexibility from theme authors, it is in line with most elements in the overview (workspaces area, dash). Also expose the menu panes vertical alignment, so that more-apps aligns to the workspaces area's top and more-docs to the bottom. https://bugzilla.gnome.org/show_bug.cgi?id=610872
This commit is contained in:
parent
46bce04788
commit
22bf4c8a93
@ -456,7 +456,6 @@ StTooltip {
|
|||||||
background-color: #111111;
|
background-color: #111111;
|
||||||
border: 2px solid #868686;
|
border: 2px solid #868686;
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
height: 400px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.all-app-controls-panel {
|
.all-app-controls-panel {
|
||||||
|
@ -142,7 +142,7 @@ function createPaneForDetails(dash, display) {
|
|||||||
detailPane.destroyContent();
|
detailPane.destroyContent();
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
dash._addPane(detailPane);
|
dash._addPane(detailPane, St.Align.START);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (index >= 0) {
|
if (index >= 0) {
|
||||||
@ -857,7 +857,7 @@ Dash.prototype = {
|
|||||||
this._appsSection.header.moreLink.connect('activated', Lang.bind(this, function (link) {
|
this._appsSection.header.moreLink.connect('activated', Lang.bind(this, function (link) {
|
||||||
if (this._allApps == null) {
|
if (this._allApps == null) {
|
||||||
this._allApps = new AppDisplay.AllAppDisplay();
|
this._allApps = new AppDisplay.AllAppDisplay();
|
||||||
this._addPane(this._allApps);
|
this._addPane(this._allApps, St.Align.START);
|
||||||
link.setPane(this._allApps);
|
link.setPane(this._allApps);
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
@ -885,7 +885,7 @@ Dash.prototype = {
|
|||||||
if (this._moreDocsPane == null) {
|
if (this._moreDocsPane == null) {
|
||||||
this._moreDocsPane = new ResultPane(this);
|
this._moreDocsPane = new ResultPane(this);
|
||||||
this._moreDocsPane.packResults(DOCS);
|
this._moreDocsPane.packResults(DOCS);
|
||||||
this._addPane(this._moreDocsPane);
|
this._addPane(this._moreDocsPane, St.Align.END);
|
||||||
link.setPane(this._moreDocsPane);
|
link.setPane(this._moreDocsPane);
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
@ -964,7 +964,7 @@ Dash.prototype = {
|
|||||||
this._activePane.close();
|
this._activePane.close();
|
||||||
},
|
},
|
||||||
|
|
||||||
_addPane: function(pane) {
|
_addPane: function(pane, align) {
|
||||||
pane.connect('open-state-changed', Lang.bind(this, function (pane, isOpen) {
|
pane.connect('open-state-changed', Lang.bind(this, function (pane, isOpen) {
|
||||||
if (isOpen) {
|
if (isOpen) {
|
||||||
if (pane != this._activePane && this._activePane != null) {
|
if (pane != this._activePane && this._activePane != null) {
|
||||||
@ -975,7 +975,7 @@ Dash.prototype = {
|
|||||||
this._activePane = null;
|
this._activePane = null;
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
Main.overview.addPane(pane);
|
Main.overview.addPane(pane, align);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
Signals.addSignalMethods(Dash.prototype);
|
Signals.addSignalMethods(Dash.prototype);
|
||||||
|
@ -357,8 +357,11 @@ Overview.prototype = {
|
|||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
addPane: function (pane) {
|
addPane: function (pane, align) {
|
||||||
this._paneContainer.add(pane.actor, { expand: true, y_fill: false, y_align: St.Align.START });
|
pane.actor.height = .9 * this._workspacesHeight;
|
||||||
|
this._paneContainer.add(pane.actor, { expand: true,
|
||||||
|
y_fill: false,
|
||||||
|
y_align: align });
|
||||||
// When a pane is displayed, we raise the transparent background to the top
|
// When a pane is displayed, we raise the transparent background to the top
|
||||||
// and connect to button-release-event on it, then raise the pane above that.
|
// and connect to button-release-event on it, then raise the pane above that.
|
||||||
// The idea here is that clicking anywhere outside the pane should close it.
|
// The idea here is that clicking anywhere outside the pane should close it.
|
||||||
|
Loading…
Reference in New Issue
Block a user