Off-by-one fix for resizebar.
Hide resizebar when window is fixed size. svn path=/trunk/kdebase/kwin/; revision=91783icc-effect-5.14.5
parent
2cac00359f
commit
352086d08b
|
@ -128,7 +128,10 @@ Manager::Manager(
|
|||
midLayout->addWidget(windowWrapper());
|
||||
midLayout->addSpacing(1);
|
||||
|
||||
if (isResizable())
|
||||
l->addSpacing(Static::instance()->resizeHeight());
|
||||
else
|
||||
l->addSpacing(1);
|
||||
|
||||
connect(options, SIGNAL(resetClients()), this, SLOT(slotReset()));
|
||||
}
|
||||
|
@ -172,6 +175,8 @@ Manager::paintEvent(QPaintEvent * e)
|
|||
|
||||
// Resize bar.
|
||||
|
||||
if (isResizable())
|
||||
{
|
||||
int rbt = height() - Static::instance()->resizeHeight(); // Resize bar top.
|
||||
|
||||
bitBlt(this, 0, rbt, &(s->resize(active)));
|
||||
|
@ -188,6 +193,11 @@ Manager::paintEvent(QPaintEvent * e)
|
|||
bitBlt(this, width() - 32, rbt, &(s->resizeMidRight(active)));
|
||||
bitBlt(this, width() - 30, rbt, &(s->resize(active)));
|
||||
}
|
||||
else
|
||||
{
|
||||
p.drawLine(1, height() - 1, width() - 2, height() - 1);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
Manager::resizeEvent(QResizeEvent * e)
|
||||
|
@ -297,8 +307,14 @@ Manager::mousePosition(const QPoint & p) const
|
|||
{
|
||||
MousePosition m = Center;
|
||||
|
||||
if (p.y() > (height() - Static::instance()->resizeHeight())) {
|
||||
// Off-by-one here ?
|
||||
|
||||
if (isResizable())
|
||||
{
|
||||
if (p.y() > (height() - (Static::instance()->resizeHeight() + 1)))
|
||||
{
|
||||
// Keep order !
|
||||
|
||||
if (p.x() >= (width() - 30))
|
||||
m = BottomRight;
|
||||
else if (p.x() <= 30)
|
||||
|
@ -306,6 +322,7 @@ Manager::mousePosition(const QPoint & p) const
|
|||
else
|
||||
m = Bottom;
|
||||
}
|
||||
}
|
||||
|
||||
return m;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue