CtrlLib: Improved tooltip colors in gtk3 (thanks klugier)

git-svn-id: svn://ultimatepp.org/upp/trunk@15608 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2020-12-18 15:52:25 +00:00
parent 21a64f02e3
commit 8e7c430344

View file

@ -299,14 +299,18 @@ void ChHostSkin()
SColorHighlightText_Write(GetInkColor());
Gtk_New("label.view");
SColorLabel_Write(GetInkColor());
#if 0
Gtk_New("tooltip.background");
SColorInfo_Write(GetBackgroundColor());
SColorInfoText_Write(GetInkColor());
#else
SColorInfo_Write(IsDark(SColorText()) ? LtYellow() : GrayColor(79));
SColorInfoText_Write(SColorText());
#endif
Color tooltip_ink, tooltip_paper;
Gtk_New("tooltip.background");
tooltip_paper = GetBackgroundColor();
Gtk_New("tooltip.color");
tooltip_ink = GetInkColor();
if(Diff(tooltip_paper, tooltip_ink) < 100) { // ink color too close to background color, fix it
tooltip_paper = IsDark(SColorText()) ? LtYellow() : GrayColor(79);
tooltip_ink = SColorText();;
}
SColorInfo_Write(tooltip_paper);
SColorInfoText_Write(tooltip_ink);
ChBaseSkin();