Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » RichText,QTF,RTF... » Bugfix: Report header/footer looks good in dark mode, not dark
Bugfix: Report header/footer looks good in dark mode, not dark [message #56759] Mon, 12 April 2021 03:02 Go to next message
zsolt is currently offline  zsolt
Messages: 693
Registered: December 2005
Location: Budapest, Hungary
Contributor
-------------------------- uppsrc/Report/Report.cpp ---------------------------
index 7cd2cd679..f46905e9f 100644
@@ -51,7 +51,9 @@ Rect Report::GetPageRect()
 void Report::PaintHF(Draw& w, int y, const char *qtf, int i)
 {
 	RichText txt = ParseQTF(FormatHF(qtf, i));
-	txt.Paint(w, 0, y, GetSize().cx);
+	PaintInfo pi;
+	pi.highlightpara = false;
+	txt.Paint(w, 0, y, GetSize().cx, pi);
 }
 
Re: Bugfix: Report header/footer looks good in dark mode, not dark [message #56815 is a reply to message #56759] Sat, 17 April 2021 17:08 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Setting highlightpara is not necessarry and does not make sense. What the fix needs is darktheme = false, which is default, just Paint without PaintInfo sets it to true. So in fact, the correct fix seems to be

void Report::PaintHF(Draw& w, int y, const char *qtf, int i)
{
	RichText txt = ParseQTF(FormatHF(qtf, i));
	PaintInfo pi; // need pi so that darktheme is false
	txt.Paint(w, 0, y, GetSize().cx, pi);
}

[Updated on: Sat, 17 April 2021 17:12]

Report message to a moderator

Re: Bugfix: Report header/footer looks good in dark mode, not dark [message #56818 is a reply to message #56815] Sat, 17 April 2021 19:39 Go to previous message
zsolt is currently offline  zsolt
Messages: 693
Registered: December 2005
Location: Budapest, Hungary
Contributor
Yes, I understand. Thanks!
Previous Topic: Text wrapping in QTF Table
Next Topic: QTF Centered in ArrayCtrl header
Goto Forum:
  


Current Time: Thu Mar 28 13:09:54 CET 2024

Total time taken to generate the page: 0.01988 seconds