appDisplay: Take the viewBox into account for the contentBox of folders

The viewBox has a border applied, so when we call adaptToSize using only
the content box of the container, the width of the border is not removed
from the content box and the grid will be allocated less space than what
we told it before using adaptToSize.

Fix that by adjusting the content box for the size of the viewBox, too.
This makes sure the correct amount of columns can be shown inside a
folder, since right now we only show 3 colums even though 4 would fit.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/1011
This commit is contained in:
Jonas Dreßler 2020-02-17 14:12:47 +01:00 committed by Florian Müllner
parent bf367daaba
commit 1ec5117715

View File

@ -1902,6 +1902,7 @@ var AppFolderDialog = GObject.registerClass({
vfunc_allocate(box, flags) {
let contentBox = this.get_theme_node().get_content_box(box);
contentBox = this._viewBox.get_theme_node().get_content_box(contentBox);
let [, entryBoxHeight] = this._entryBox.get_size();
let spacing = this._viewBox.layout_manager.spacing;