mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-09-09 03:24:59 -06:00
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:
parent
21a64f02e3
commit
8e7c430344
1 changed files with 12 additions and 8 deletions
|
|
@ -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();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue