Refactor the markerline into a proper QGraphicsWidget
authorManuel Nickschas <sputnick@quassel-irc.org>
Wed, 16 Jun 2010 15:21:21 +0000 (17:21 +0200)
committerManuel Nickschas <sputnick@quassel-irc.org>
Wed, 16 Jun 2010 16:13:51 +0000 (18:13 +0200)
Unitl now, ChatLines would check if they're the one supposed to display the markerline
for every paintEvent, and the one appropriate would draw it then. Besides being inefficient,
this also caused trouble with the more flexible markerline stuff introduced recently.

Now the markerline is a proper QGraphicsWidget. It can be fully styled via a brush property:

Palette {
  marker-line: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop:0 red, stop: 0.1 transparent);
}

This lets it look identical to the "old" markerline and is hence the default now. Note that the
height of the markerline object is equal to a single line of text (so this is the area you get
to play in), unless the brush is set to a solid color, in which case it's a simple line 1px wide.
This makes it look acceptable when using an older stylesheet.

This commit also fixes a crash introduced with the markerline rewrite a few weeks ago.


No differences found