Subversion Repositories Kolibri OS

Rev

Rev 7429 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

  1. struct struct_pixie_colors {
  2.         dword color_top_panel_bg,
  3.               color_top_panel_folder_name,
  4.               color_top_panel_song_name,
  5.                   color_list_bg,
  6.               color_list_text,
  7.               color_list_active_bg,
  8.               color_list_active_text,
  9.               color_list_active_pointer,
  10.               color_list_scroller,
  11.                   color_list_border;
  12. } theme;
  13.  
  14. _ini ini;
  15.  
  16. #define WIN_W_SMALL 126
  17. #define WIN_H_SMALL 31
  18.  
  19. void LoadIniConfig()
  20. {
  21.         ini.path = GetIni(#pixie_ini_path, "app.ini");
  22.         ini.section = "Pixie";
  23.         window_mode   = ini.GetInt("window_mode", WINDOW_MODE_NORMAL);
  24.         win_x_normal  = ini.GetInt("win_x_normal", 100);
  25.         win_y_normal  = ini.GetInt("win_y_normal", 90);
  26.         win_x_small   = ini.GetInt("win_x_small", -1);
  27.         win_y_small   = ini.GetInt("win_y_small", -1);
  28.         ini.GetString("last_folder", #work_folder, sizeof(work_folder), NULL);
  29.  
  30.         Libimg_LoadImage(#skin, abspath("pixieskn.png"));
  31.         skin.w = 322;
  32.         theme.color_top_panel_bg = 0x242424;
  33.         theme.color_top_panel_folder_name = 0xEEEeee;
  34.         theme.color_top_panel_song_name = 0xBEBEBE;
  35.         theme.color_list_bg = 0x313031;
  36.         theme.color_list_text = 0xADAEAD;
  37.         theme.color_list_active_bg = 0x434343;
  38.         theme.color_list_active_text = 0x17A2CC;
  39.         theme.color_list_active_pointer = 0xD6D6D6;
  40.         theme.color_list_scroller = 0xBBBbbb;
  41.         theme.color_list_border = 0x121212;
  42.         scroll1.bckg_col = theme.color_list_bg;
  43.         scroll1.frnt_col = theme.color_list_border;
  44.         scroll1.line_col = theme.color_list_border;
  45.  
  46.         if (win_x_small==-1) win_x_small = 2000;
  47.         if (win_y_small==-1) win_y_small = GetClientHeight() - WIN_H_SMALL + 1;
  48.  
  49. }
  50.  
  51. void SaveIniConfig()
  52. {
  53.         if (window_mode == WINDOW_MODE_NORMAL)
  54.         {
  55.                 win_x_normal = Form.left;
  56.                 win_y_normal = Form.top;
  57.         }
  58.         if (window_mode == WINDOW_MODE_SMALL)
  59.         {
  60.                 win_x_small = Form.left;
  61.                 win_y_small = Form.top;
  62.         }
  63.         ini.SetInt("window_mode", window_mode);
  64.         ini.SetInt("win_x_normal", win_x_normal);
  65.         ini.SetInt("win_y_normal", win_y_normal);
  66.         ini.SetInt("win_x_small", win_x_small);
  67.         ini.SetInt("win_y_small", win_y_small);
  68.         ini.SetString("last_folder", #work_folder, strlen(#work_folder));
  69. }
  70.  
  71.