popupMenu: round spacing to an integer

StThemeNode.get_length() doesn't necessarily return an integer pixel
value, and our code produces non-integer positions in that case. So
round the spacing.

https://bugzilla.gnome.org/show_bug.cgi?id=645647
This commit is contained in:
Owen W. Taylor 2011-03-25 18:40:38 -04:00 committed by Dan Winship
parent 00fc4a2eb7
commit 3bbdecc6b3

View File

@ -61,7 +61,7 @@ PopupBaseMenuItem.prototype = {
}, },
_onStyleChanged: function (actor) { _onStyleChanged: function (actor) {
this._spacing = actor.get_theme_node().get_length('spacing'); this._spacing = Math.round(actor.get_theme_node().get_length('spacing'));
}, },
_onButtonReleaseEvent: function (actor, event) { _onButtonReleaseEvent: function (actor, event) {