<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 solid;">
<tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="http://git.reviewboard.kde.org/r/105148/">http://git.reviewboard.kde.org/r/105148/</a>
</td>
</tr>
</table>
<br />
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('http://git.reviewboard.kde.org/media/rb/images/review_request_box_top_bg.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
<tr>
<td>
<div>Review request for Calligra, Pierre Stirnweiss and C. Boemann.</div>
<div>By Friedrich W. H. Kossebau.</div>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">With dark color schemes the previews of the text styles are usually unusable. Reason is that the usual document text colors are dark and made for a white paper background, but for the comboboxes and the listviews with the styles the UI background is used, not the one of the document. This is inconsistent with the preview area of the stylemanager, where a white background is used, not the UI one.
Another problem is that for these style previews the default text color is the one of the UI, not black. This is also inconsistent with the rendering on the document, where black is used without a given color, cmp. KoTextLayoutArea::paint(...):
if (format.foreground().style() == Qt::NoBrush) {
f.setForeground(QBrush(QColor(0, 0, 0)));
}
Attached patch fixes that, by setting the base color to white for StylesCombo and the style listviews in the manager (and the "text" color to black, used to render the popup button), as well as setting the default text color to black for the thumbnailer.
Ideally the background color would be the one of the currently selected/focussed shape/page. But I have no idea yet how to get that property and also the signals if the background color changed. Pointers welcome. That could also be used to control the background of the preview box in the stylemanager, which is currently hardcoded to white. So at least this patch makes all previews consistent.</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Tried several Qt styles (oxygen, plastique, windows) and different color schemes, always looked good/okay.</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>libs/textlayout/KoStyleThumbnailer.cpp <span style="color: grey">(a3d90fc)</span></li>
<li>plugins/textshape/dialogs/StyleManager.cpp <span style="color: grey">(a76e2cf)</span></li>
<li>plugins/textshape/dialogs/StylesCombo.cpp <span style="color: grey">(35461f6)</span></li>
</ul>
<p><a href="http://git.reviewboard.kde.org/r/105148/diff/" style="margin-left: 3em;">View Diff</a></p>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Screenshots </h1>
<div>
<a href="http://git.reviewboard.kde.org/r/105148/s/591/"><img src="http://git.reviewboard.kde.org/media/uploaded/images/2012/06/04/TextStylePreviews-Before_400x100.png" style="border: 1px black solid;" alt="Stylemanager Before" /></a>
<a href="http://git.reviewboard.kde.org/r/105148/s/592/"><img src="http://git.reviewboard.kde.org/media/uploaded/images/2012/06/04/TextStylePreviews-After_400x100.png" style="border: 1px black solid;" alt="Stylemanager After" /></a>
<a href="http://git.reviewboard.kde.org/r/105148/s/593/"><img src="http://git.reviewboard.kde.org/media/uploaded/images/2012/06/04/TextStylePreviewComboBox-Before_400x100.png" style="border: 1px black solid;" alt="Comboboxes Before" /></a>
<a href="http://git.reviewboard.kde.org/r/105148/s/594/"><img src="http://git.reviewboard.kde.org/media/uploaded/images/2012/06/04/TextStylePreviewComboBox-After_400x100.png" style="border: 1px black solid;" alt="Comboboxes After" /></a>
</div>
</td>
</tr>
</table>
</div>
</body>
</html>