Skip to content

Commit a3e6fc1

Browse files
committed
Fix Bitrate Plot popup text white on white blending issue
setDefaultStyleSheet must be called before setHtml, otherwise the text color style is never applied. The popup had white text (#FFFFFF intended for dark backgrounds) on a semi-transparent white background, making it unreadable.
1 parent a72eb34 commit a3e6fc1

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

YUViewLib/src/ui/views/PlotViewWidget.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -808,8 +808,8 @@ void PlotViewWidget::drawInfoBox(QPainter &painter) const
808808

809809
// Create a QTextDocument. This object can tell us the size of the rendered text.
810810
QTextDocument textDocument;
811+
textDocument.setDefaultStyleSheet("* { color: #000000 }");
811812
textDocument.setHtml(infoString);
812-
textDocument.setDefaultStyleSheet("* { color: #FFFFFF }");
813813
textDocument.setTextWidth(textDocument.size().width());
814814

815815
// Translate to the position where the text box shall be
@@ -865,8 +865,8 @@ void PlotViewWidget::drawDebugBox(QPainter &painter) const
865865

866866
// Create a QTextDocument. This object can tell us the size of the rendered text.
867867
QTextDocument textDocument;
868+
textDocument.setDefaultStyleSheet("* { color: #000000 }");
868869
textDocument.setHtml(infoString);
869-
textDocument.setDefaultStyleSheet("* { color: #FFFFFF }");
870870
textDocument.setTextWidth(textDocument.size().width());
871871

872872
// Translate to the position where the text box shall be

YUViewLib/src/ui/views/SplitViewWidget.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -732,7 +732,7 @@ void splitViewWidget::paintZoomBox(int view,
732732

733733
// Create a QTextDocument. This object can tell us the size of the rendered text.
734734
QTextDocument textDocument;
735-
textDocument.setDefaultStyleSheet("* { color: #FFFFFF }");
735+
textDocument.setDefaultStyleSheet("* { color: #000000 }");
736736
textDocument.setHtml(pixelInfoString);
737737
textDocument.setTextWidth(textDocument.size().width());
738738

0 commit comments

Comments
 (0)