mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-08-21 22:04:56 -06:00
CtrlLib: Fixed chgtk3 issue for Raspbian
git-svn-id: svn://ultimatepp.org/upp/trunk@14396 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
4a941ac1e7
commit
355a401a67
1 changed files with 17 additions and 2 deletions
|
|
@ -229,6 +229,20 @@ Color GetBackgroundColor()
|
|||
return AvgColor(b);
|
||||
}
|
||||
|
||||
Color GetInkColorBk()
|
||||
{
|
||||
Color ink = GetInkColor();
|
||||
Color bk = GetBackgroundColor();
|
||||
if(Diff(ink, bk) < 100) {
|
||||
Color dk = SColorText();
|
||||
Color wh = SColorPaper();
|
||||
if(IsDark(wh))
|
||||
Swap(dk, wh);
|
||||
return IsDark(bk) ? wh : dk;
|
||||
}
|
||||
return ink;
|
||||
}
|
||||
|
||||
Image Gtk_Icon(const char *icon_name, int size)
|
||||
{
|
||||
GdkPixbuf *pixbuf = gtk_icon_theme_load_icon_for_scale(gtk_icon_theme_get_default(), icon_name,
|
||||
|
|
@ -372,10 +386,11 @@ void ChHostSkin()
|
|||
for(int i = 0; i < 4; i++) {
|
||||
Gtk_State(i);
|
||||
s.look[i] = Hot3(CairoImage());
|
||||
s.monocolor[i] = s.textcolor[i] = GetInkColor();
|
||||
Color ink = GetInkColorBk();
|
||||
s.monocolor[i] = s.textcolor[i] = ink;
|
||||
if(pass == 0) {
|
||||
button[i] = WithHotSpots(CairoImage(100, 100), DPI(4), DPI(4), 0, 0);
|
||||
text[i] = GetInkColor();
|
||||
text[i] = ink;
|
||||
}
|
||||
}
|
||||
s.ok = Gtk_IconAdjusted("gtk-ok", DPI(16));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue