This is an automatically generated e-mail. To reply, visit: http://git.reviewboard.kde.org/r/100848/

On March 13th, 2011, 1:29 p.m., Thomas Lübking wrote:

kwin/outline.cpp (Diff revision 1)
void Outline::showXOutline()
133
        QPixmap pix(m_outlineGeometry.width(), 5);
since it's just a vertical reflection, you could just keep the above pixmap in context and

for (int i = 0; i<4; ++i)
   p.drawPixmap(0,i, topPix, 0,3-i, topPix.width(), 1);

you can also keep the painter and p.begin(&pix) instead of QPainter p(&pix) - it's only buggy in Qt if you change the renderengine (ie. use it on an image and then on a pixmap)
fixing myself: 2+2=5...
for (int i = 0; i<5; ++i)
   p.drawPixmap(0,i, topPix, 0,4-i, topPix.width(), 1);

if you want to spare allocating the "large" pixmap twice in a block you could also just mirror the corners in one 5x5 tmp pixmap

- Thomas


On March 13th, 2011, 12:37 p.m., Arthur Arlt wrote:

Review request for kwin.
By Arthur Arlt.

Updated March 13, 2011, 12:37 p.m.

Description

This patch refactors the code for outlining geometries to an own class Outline. It is used by tabbox and quick tiling. There were two similar implementations for both functionalities which are now refactored to a new class Outline. This class provides the X implementation for showing and hiding an outline of a given geometry.
For the future this functionality could be replaced by an effect.

Testing

Quick Tiling and tabbox works with this implementation.

Diffs

  • kwin/CMakeLists.txt (976c831)
  • kwin/geometry.cpp (88719bf)
  • kwin/outline.h (PRE-CREATION)
  • kwin/outline.cpp (PRE-CREATION)
  • kwin/tabbox.h (1f02b1f)
  • kwin/tabbox.cpp (e2d07fe)
  • kwin/tabbox/tabboxhandler.h (96a1fc6)
  • kwin/tabbox/tabboxhandler.cpp (b178efe)
  • kwin/workspace.h (fe97c77)
  • kwin/workspace.cpp (43e3e8c)

View Diff