View Single Post
Old 06-12-2019, 11:52 AM   #45
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,906
Karma: 6120478
Join Date: Nov 2009
Device: many
Looking more closely the alternating colours are all in Tables/TreeViews, etc.

From snooping in the Sigil code, I see the following:
Code:
Kevins-MacBook-Pro:Sigil kbhend$ grep setAlternatingRowColors `find ./ -name "*.cpp"`
.//src/Dialogs/ClipEditor.cpp:    ui.ClipEditorTree->setAlternatingRowColors(true);
.//src/Dialogs/DeleteFiles.cpp:    ui.Table->setAlternatingRowColors(true);
.//src/Dialogs/DeleteStyles.cpp:    ui.Table->setAlternatingRowColors(true);
.//src/Dialogs/IndexEditor.cpp:    ui.IndexEditorTree->setAlternatingRowColors(true);
.//src/Dialogs/PreferenceWidgets/SpellCheckWidget.cpp:    ui.userDictList->setAlternatingRowColors(true);
.//src/Dialogs/SearchEditor.cpp:    ui.SearchEditorTree->setAlternatingRowColors(true);
.//src/Dialogs/SpellcheckEditor.cpp:    ui.SpellcheckEditorTree->setAlternatingRowColors(true);
This is not new. The Sigil code has always used these settings.

In a stylesheet you should look to change or add the "alternate-background-color" property for QTableView, QTableWidget, QTreeView, and QTreeWidget.

See https://doc.qt.io/qt-5/stylesheet-reference.html for more details.

Hope this helps.

KevinH

Quote:
Originally Posted by KevinH View Post
Thanks for the feedback and image! Yes, I agree with you about the stripy-ness. I do believe that different highlighting for alternate lines is controllable in the code. I will look into it.
KevinH is offline   Reply With Quote