View Single Post
Old 06-11-2019, 10:49 AM   #8
BeckyEbook
Guru
BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.
 
BeckyEbook's Avatar
 
Posts: 876
Karma: 3501146
Join Date: Jan 2017
Location: Poland
Device: Various
Quote:
Originally Posted by Doitsu View Post
Is it possible to change the non-breaking space replacement characters by applying a Qt stylesheet or source code modifications?
QSS IMHO will not work.

The non-breaking space is a space, so you can really apply just underlining. For me default thin underlining seems too delicate.

File: Misc\XHTMLHighlighter.cpp [here]

Original code:
Spoiler:
Code:
    special_space_format  .setUnderlineColor(m_codeViewAppearance.xhtml_entity_color);
    special_space_format  .setUnderlineStyle(QTextCharFormat::DashUnderline);


My idea:
Spoiler:
Code:
    QPen outline(special_space_format.textOutline());
    outline.setBrush(m_codeViewAppearance.xhtml_entity_color);
    outline.setWidthF(1.0);
    outline.setStyle(Qt::SolidLine);
    special_space_format.setTextOutline(outline);
    special_space_format.setUnderlineColor(m_codeViewAppearance.xhtml_entity_color);
    special_space_format.setUnderlineStyle(QTextCharFormat::SingleUnderline);
Attached Thumbnails
Click image for larger version

Name:	sigil_0_9_14_entites_underline.png
Views:	376
Size:	40.6 KB
ID:	171874  
BeckyEbook is offline   Reply With Quote