To whom it may concern:

When the panel is vertical, moving of the taskbar buttons doesn't work
properly.

The attached patch fixes this problem.



Bye
f.d.g.
190,192c190,194
<     for (int i = 0; i < droppedIndex && newPos == -1; i++)
<         if (mLayout->itemAt(i)->widget()->x() + mLayout->itemAt(i)->widget()->width() / 2 > event->pos().x())
<             newPos = i;
---
>     if (mPlugin->panel()->isHorizontal())
>     {
>         for (int i = 0; i < droppedIndex && newPos == -1; i++)
>             if (mLayout->itemAt(i)->widget()->x() + mLayout->itemAt(i)->widget()->width() / 2 > event->pos().x())
>                 newPos = i;
194,196c196,209
<     for (int i = size - 1; i > droppedIndex && newPos == -1; i--)
<         if (mLayout->itemAt(i)->widget()->x() + mLayout->itemAt(i)->widget()->width() / 2 < event->pos().x())
<             newPos = i;
---
>         for (int i = size - 1; i > droppedIndex && newPos == -1; i--)
>             if (mLayout->itemAt(i)->widget()->x() + mLayout->itemAt(i)->widget()->width() / 2 < event->pos().x())
>                 newPos = i;
>     }
>     else
>     {
>         for (int i = 0; i < droppedIndex && newPos == -1; i++)
>             if (mLayout->itemAt(i)->widget()->y() + mLayout->itemAt(i)->widget()->height() / 2 > event->pos().y())
>                 newPos = i;
> 
>         for (int i = size - 1; i > droppedIndex && newPos == -1; i--)
>             if (mLayout->itemAt(i)->widget()->y() + mLayout->itemAt(i)->widget()->height() / 2 < event->pos().y())
>                 newPos = i;
>     }
201c214
<     qDebug() << QString("Dropped button shoud go to position %1").arg(newPos);
---
>     qDebug() << QString("Dropped button should go to position %1").arg(newPos);
------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk
_______________________________________________
Lxde-list mailing list
Lxde-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxde-list

Reply via email to