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

Review request for Calligra, Pierre Stirnweiss and C. Boemann.


Description
-------

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.


Diffs
-----

  libs/textlayout/KoStyleThumbnailer.cpp a3d90fc 
  plugins/textshape/dialogs/StyleManager.cpp a76e2cf 
  plugins/textshape/dialogs/StylesCombo.cpp 35461f6 

Diff: http://git.reviewboard.kde.org/r/105148/diff/


Testing
-------

Tried several Qt styles (oxygen, plastique, windows) and different color 
schemes, always looked good/okay.


Screenshots
-----------

Stylemanager Before
  http://git.reviewboard.kde.org/r/105148/s/591/
Stylemanager After
  http://git.reviewboard.kde.org/r/105148/s/592/
Comboboxes Before
  http://git.reviewboard.kde.org/r/105148/s/593/
Comboboxes After
  http://git.reviewboard.kde.org/r/105148/s/594/


Thanks,

Friedrich W. H. Kossebau

_______________________________________________
calligra-devel mailing list
[email protected]
https://mail.kde.org/mailman/listinfo/calligra-devel

Reply via email to