BoxPointer: account for border width when requesting size
We must reduce the forWidth in the call to get_preferred_height() with the border width, otherwise we might request a smaller height that we actually need and overflow. https://bugzilla.gnome.org/show_bug.cgi?id=696564
This commit is contained in:
parent
740dca8afc
commit
e426f8ac47
@ -185,7 +185,9 @@ const BoxPointer = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
_getPreferredHeight: function(actor, forWidth, alloc) {
|
_getPreferredHeight: function(actor, forWidth, alloc) {
|
||||||
let [minSize, naturalSize] = this.bin.get_preferred_height(forWidth);
|
let themeNode = this.actor.get_theme_node();
|
||||||
|
let borderWidth = themeNode.get_length('-arrow-border-width');
|
||||||
|
let [minSize, naturalSize] = this.bin.get_preferred_height(forWidth - 2 * borderWidth);
|
||||||
alloc.min_size = minSize;
|
alloc.min_size = minSize;
|
||||||
alloc.natural_size = naturalSize;
|
alloc.natural_size = naturalSize;
|
||||||
this._adjustAllocationForArrow(false, alloc);
|
this._adjustAllocationForArrow(false, alloc);
|
||||||
|
Loading…
Reference in New Issue
Block a user