Review Request: Update the location of the desktop toolbox based on overlapping containments.

Dan Meltzer parallelgrapefruit at gmail.com
Mon Feb 25 18:45:00 CET 2008


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://mattr.info/r/221/
-----------------------------------------------------------

Review request for Plasma.


Summary
-------

This patch seeks to move the toolbox when it is obstructed by another containment.  The patch makes the assumption that the toolbox should only appears on a desktop containment, which may not be desired in the future.  In this case we would probably want to add a virtual bool hasToolbox() or something along those lines.

It currently has a bug where the config needs to be "applied" twice in order for the toolbox to move to the correct position.. I"m not sure where this is coming from, if it's due to the panel taking longer to move than the reposition or if its something I'm just missing:  The following debug output is relevant:

After Clicking apply the first time, moving from top->right:

 plasma(2306)/libplasma Plasma::Containment::Private::toolboxPosition: "Desktop"  is at the:  0
plasma(2306)/libplasma Plasma::Containment::Private::toolboxPosition: "Panel"  is at the:  6
plasma(2306)/libplasma Plasma::Containment::Private::toolboxPosition: Moving to:  QPointF(-100, 0)
plasma(2306) PanelView::updatePanelGeometry: New panel geometry is QRectF(0,0 1440x900)
plasma(2306) PanelView::updatePanelGeometry: PanelView(0x82ff828) thinks its panel is at  QRect(0,0 1440x900)
plasma(2306) PanelView::updatePanelGeometry: New panel geometry is QRectF(0,0 32x900)
plasma(2306) PanelView::updatePanelGeometry: PanelView(0x82ff828) thinks its panel is at  QRect(1408,0 32x900)
plasma(2306) PanelView::updatePanelGeometry: New panel geometry is QRectF(1408,0 32x900)
plasma(2306) PanelView::updatePanelGeometry: PanelView(0x82ff828) thinks its panel is at  QRect(1408,0 32x900)
plasma(2306) PanelView::updatePanelGeometry: New panel geometry is QRectF(1408,0 39x900)
plasma(2306) PanelView::updatePanelGeometry: PanelView(0x82ff828) thinks its panel is at  QRect(1401,0 39x900)
plasma(2306) PanelView::updatePanelGeometry: New panel geometry is QRectF(1401,0 39x900)
plasma(2306) PanelView::updatePanelGeometry: PanelView(0x82ff828) thinks its panel is at  QRect(1401,0 39x900)

After clicking apply again, after the panel is on the right:

plasma(2306)/libplasma Plasma::Containment::Private::toolboxPosition: "Desktop"  is at the:  0
plasma(2306)/libplasma Plasma::Containment::Private::toolboxPosition: "Panel"  is at the:  6
plasma(2306)/libplasma Plasma::Containment::Private::toolboxPosition: Moving to:  QPointF(1301, 0)


I've left the debug output in the patch to allow people to match this previous text up with where it occurs.  It will be removed before committing.


This addresses bug 158405.


Diffs
-----

  trunk/KDE/kdebase/workspace/libs/plasma/containment.h
  trunk/KDE/kdebase/workspace/libs/plasma/containment.cpp
  trunk/KDE/kdebase/workspace/libs/plasma/corona.h
  trunk/KDE/kdebase/workspace/libs/plasma/corona.cpp
  trunk/KDE/kdebase/workspace/plasma/containments/panel/panel.cpp

Diff: http://mattr.info/r/221/diff


Testing
-------

Have run plasma with this patch and moved the panel around.  Other than the problem described above it is working nicely.


Thanks,

Dan



More information about the Panel-devel mailing list