Subversion Repositories Kolibri OS

Rev

Rev 7780 | Rev 7866 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

  1.  
  2. void DrawTopPanelButton(dword _button_id, _x, _y, signed int _icon_n)
  3. {
  4.         #define TSZE 25
  5.         static libimg_image top_icons;
  6.         static dword semi_white=0, bg_col_light, bg_col_dark;
  7.         if (!semi_white) {
  8.                 Libimg_LoadImage(#top_icons, "/sys/icons16.png");
  9.  
  10.                 semi_white = MixColors(sc.work, 0xFFFfff, skin_is_dark()*90 + 96);
  11.                 bg_col_dark = MixColors(sc.work, sc.work_graph, 90);
  12.                 bg_col_light = MixColors(semi_white, 0xFFFfff, skin_is_dark()*90 + 10);
  13.  
  14.                 Libimg_ReplaceColor(top_icons.image, top_icons.w, top_icons.h, 0xffFFFfff, semi_white);
  15.                 Libimg_ReplaceColor(top_icons.image, top_icons.w, top_icons.h, 0xffCACBD6, MixColors(semi_white, 0, 220));
  16.         }
  17.  
  18.         DrawWideRectangle(_x+1, _y+1, TSZE, TSZE, 5, semi_white);
  19.         DrawOvalBorder(_x, _y, TSZE, TSZE, bg_col_light, bg_col_dark, semi_white, sc.work);
  20.  
  21.         DefineHiddenButton(_x, _y, TSZE+1, TSZE+1, _button_id);
  22.         if (_icon_n==-1) {
  23.                 DrawBar(_x+6, _y+5, 16, 16, semi_white);
  24.         } else {
  25.                 img_draw stdcall(top_icons.image, _x+6, _y+5, 16, 16, 0, _icon_n*16);
  26.         }
  27. }