summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2020-12-08 01:10:30 +0100
committerSlávek Banko <slavek.banko@axis.cz>2020-12-08 01:10:30 +0100
commit005d3c6f2b7d45c97fd23aee664e672f1c49c52c (patch)
treed91ac7e1905381f76f6e87e8b1c8fdad5b22f446
parent7c9b3ae44b5d876d4208f2e80d02cb919e56175e (diff)
downloadtde-style-domino-005d3c6f2b7d45c97fd23aee664e672f1c49c52c.tar.gz
tde-style-domino-005d3c6f2b7d45c97fd23aee664e672f1c49c52c.zip
Avoid rendering plain text tooltips as rich text.
Rendering plain text tooltips as rich text can cause an unwanted change in line breaks - for example, in the KOrn status tooltip. Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
-rw-r--r--domino/eventfilter.cpp21
1 files changed, 16 insertions, 5 deletions
diff --git a/domino/eventfilter.cpp b/domino/eventfilter.cpp
index 16f7c2e..fc67414 100644
--- a/domino/eventfilter.cpp
+++ b/domino/eventfilter.cpp
@@ -1676,21 +1676,32 @@ bool DominoStyle::objectEventHandler( const TQStyleControlElementData &ceData,
p.setClipping(false);
TQColor tabContour2 = tqApp->palette().active().background().dark(150);
+
+ p.save();
p.setPen(tabContour2);
p.drawLine(x+7,y, w-8,y); // top
p.drawLine(x+7,h-1, w-8,h-1); // bottom
p.drawLine(x,y+7, x,h-8); // left
p.drawLine(w-1,y+7, w-1,h-8); // right
-
+ p.restore();
+
bitBlt(label, x, y, border1, 0, 0, 7, 7);
bitBlt(label, w-7, y, border1, 7, 0, 7, 7);
bitBlt(label, x, h-7, border1, 0, 7, 7, 7);
bitBlt(label, w-7, h-7, border1, 7, 7, 7, 7);
- TQSimpleRichText* srt = new TQSimpleRichText(label->text(), label->font());
- srt->setWidth(r.width()-5);
- srt->draw(&p, r.x()+4, r.y(), r, tqApp->palette().active(),0);
- delete srt;
+ if(TQStyleSheet::mightBeRichText(label->text()))
+ {
+ TQSimpleRichText* srt = new TQSimpleRichText(label->text(), label->font());
+ srt->setWidth(r.width()-5);
+ srt->draw(&p, r.x()+4, r.y(), r, tqApp->palette().active(), 0);
+ delete srt;
+ }
+ else
+ {
+ r.addCoords(2, 3, 0, 0);
+ p.drawText(r, AlignAuto + AlignTop, label->text());
+ }
}
return true;
}