mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-18 07:34:54 +00:00
Bug 594184 - Fix up glow positioning logic
We were allowing the glow allocation to go too far to the right; clean up the logic.
This commit is contained in:
parent
0a29cf6195
commit
fa5fb6b8a8
1 changed files with 5 additions and 4 deletions
|
|
@ -89,10 +89,10 @@ AppIcon.prototype = {
|
|||
let targetWidth = availWidth;
|
||||
let xPadding = 0;
|
||||
if (naturalWidth < availWidth) {
|
||||
xPadding = (availWidth - naturalWidth) / 2;
|
||||
xPadding = Math.floor((availWidth - naturalWidth) / 2);
|
||||
}
|
||||
childBox.x1 = Math.floor(xPadding);
|
||||
childBox.x2 = availWidth;
|
||||
childBox.x1 = xPadding;
|
||||
childBox.x2 = availWidth - xPadding;
|
||||
childBox.y1 = GLOW_PADDING_VERTICAL;
|
||||
childBox.y2 = availHeight - GLOW_PADDING_VERTICAL;
|
||||
this._name.allocate(childBox, flags);
|
||||
|
|
@ -101,7 +101,8 @@ AppIcon.prototype = {
|
|||
|
||||
if (this._glowBox != null) {
|
||||
let glowPaddingHoriz = Math.max(0, xPadding - GLOW_PADDING_HORIZONTAL);
|
||||
childBox.x1 = Math.floor(glowPaddingHoriz);
|
||||
glowPaddingHoriz = Math.max(GLOW_PADDING_HORIZONTAL, glowPaddingHoriz);
|
||||
childBox.x1 = glowPaddingHoriz;
|
||||
childBox.x2 = availWidth - glowPaddingHoriz;
|
||||
childBox.y1 = 0;
|
||||
childBox.y2 = availHeight;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue