popup-menu: Use correct St.Align values
It is not St.Align.CENTER, but St.Align.MIDDLE - in contrast to St.TextAlign, where it *is* CENTER. Yay consistency!
This commit is contained in:
parent
92024b7e54
commit
361652d028
@ -313,7 +313,7 @@ PopupBaseMenuItem.prototype = {
|
||||
if (child.expand) {
|
||||
childBox.x1 = x;
|
||||
childBox.x2 = x + availWidth;
|
||||
} else if (child.align === St.Align.CENTER) {
|
||||
} else if (child.align === St.Align.MIDDLE) {
|
||||
childBox.x1 = x + Math.round(extraWidth / 2);
|
||||
childBox.x2 = childBox.x1 + naturalWidth;
|
||||
} else if (child.align === St.Align.END) {
|
||||
@ -327,7 +327,7 @@ PopupBaseMenuItem.prototype = {
|
||||
if (child.expand) {
|
||||
childBox.x1 = x - availWidth;
|
||||
childBox.x2 = x;
|
||||
} else if (child.align === St.Align.CENTER) {
|
||||
} else if (child.align === St.Align.MIDDLE) {
|
||||
childBox.x1 = x - Math.round(extraWidth / 2);
|
||||
childBox.x2 = childBox.x1 + naturalWidth;
|
||||
} else if (child.align === St.Align.END) {
|
||||
|
Loading…
Reference in New Issue
Block a user