Rev 7759 | Rev 7806 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 7759 | Rev 7780 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | void DrawTopPanelButton(dword _button_id, _x, _y, signed int _icon_n) |
1 | void DrawTopPanelButton(dword _button_id, _x, _y, signed int _icon_n) |
2 | { |
2 | { |
3 | #define TSZE 25 |
3 | #define TSZE 25 |
4 | static libimg_image top_icons; |
4 | static libimg_image top_icons; |
5 | static dword semi_white=0, bg_col, bg_col_light, bg_col_dark, bg_dark; |
5 | static dword semi_white=0, bg_col_light, bg_col_dark; |
6 | if (!semi_white) { |
6 | if (!semi_white) { |
7 | bg_col = system.color.work; |
- | |
8 | if (GrayScaleImage(#bg_col,1,1)<65) bg_dark=true; else bg_dark=false; |
- | |
9 | Libimg_LoadImage(#top_icons, "/sys/icons16.png"); |
7 | Libimg_LoadImage(#top_icons, "/sys/icons16.png"); |
Line 10... | Line 8... | ||
10 | 8 | ||
11 | semi_white = MixColors(system.color.work, 0xFFFfff, bg_dark*90 + 96); |
9 | semi_white = MixColors(system.color.work, 0xFFFfff, skin_is_dark()*90 + 96); |
12 | bg_col_dark = MixColors(system.color.work, system.color.work_graph, 90); |
10 | bg_col_dark = MixColors(system.color.work, system.color.work_graph, 90); |
Line 13... | Line 11... | ||
13 | bg_col_light = MixColors(semi_white, 0xFFFfff, bg_dark*90 + 10); |
11 | bg_col_light = MixColors(semi_white, 0xFFFfff, skin_is_dark()*90 + 10); |
14 | 12 | ||
15 | Libimg_ReplaceColor(top_icons.image, top_icons.w, top_icons.h, 0xffFFFfff, semi_white); |
13 | Libimg_ReplaceColor(top_icons.image, top_icons.w, top_icons.h, 0xffFFFfff, semi_white); |