fix: magiclamp effect wrong direction.
if the dock is on the top,and the dock is not close together with screen edge. for example,the dock is 10 pixels taller then sceen edge,the "position" will be "Bottom". Autually,the dock is on the top of screen.
This commit is contained in:
parent
fe6c296073
commit
44b2a3f872
1 changed files with 2 additions and 2 deletions
|
@ -140,13 +140,13 @@ void MagicLampEffect::paintWindow(EffectWindow* w, int mask, QRegion region, Win
|
|||
QRect panelScreen = effects->clientArea(ScreenArea, panel);
|
||||
if (panel->width() >= panel->height()) {
|
||||
// horizontal panel
|
||||
if (panel->y() == panelScreen.y())
|
||||
if (panel->y() <= panelScreen.height()/2)
|
||||
position = Top;
|
||||
else
|
||||
position = Bottom;
|
||||
} else {
|
||||
// vertical panel
|
||||
if (panel->x() == panelScreen.x())
|
||||
if (panel->x() <= panelScreen.width()/2)
|
||||
position = Left;
|
||||
else
|
||||
position = Right;
|
||||
|
|
Loading…
Reference in a new issue