Advertisement
Guest User

Untitled

a guest
May 20th, 2019
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function initColors() {
  2.     col.artist = RGB(255, 255, 255);
  3.     col.info_text = RGB(255, 255, 255);
  4.  
  5.     if (!pref.darkMode) {
  6.         col.bg = RGB(205, 205, 205);
  7.         col.menu_bg = RGB(58, 58, 58);
  8.         col.progress_fill = RGB(235, 59, 70);
  9.         col.progress_bar = RGB(125, 125, 125);
  10.         col.now_playing = RGB(0, 0, 0); // tracknumber, title, and time
  11.         col.aa_shadow = RGBA(000, 000, 000, 64);
  12.     } else {
  13.         col.bg = RGB(50, 54, 57);
  14.         col.menu_bg = RGB(23, 23, 23);
  15.         col.progress_fill = RGB(235, 59, 70);
  16.         col.progress_bar = RGB(23, 22, 25);
  17.         col.now_playing = RGB(255, 255, 255); // tracknumber, title, and time
  18.         col.aa_shadow = RGBA(128, 128, 128, 54);
  19.     }
  20.  
  21.     col.rating = RGB(255, 170, 032);
  22.     col.mood = RGB(000, 128, 255);
  23.     col.hotness = RGB(192, 192, 000);
  24.  
  25.     col.playcount = RGB(000, 153, 153);
  26.     col.dark_grey = RGB(128, 128, 128);
  27.  
  28.     col.tl_added = RGB(15, 51, 65);
  29.     col.tl_played = RGB(44, 66, 75);
  30.     col.tl_unplayed = RGB(126, 173, 195);
  31.     col.tl_play = RGB(255, 255, 255); // each individual play
  32.  
  33.     // ALBUM ART DISPLAY PROPERTIES
  34.     col.aa_border = RGBA(060, 060, 060, 128);
  35. }
  36. initColors();
  37.  
  38. // inside onSettingsMenu (note I might have changed the index numbers... so you probably can't cut and paste this)
  39.  
  40.     _menu.AppendMenuItem(MF_STRING, 1, 'Use Dark Theme');
  41.     _menu.CheckMenuItem(1, pref.darkMode);
  42.  
  43. // down below in the switch statement in the same method
  44.  
  45.         case 1:
  46.             pref.darkMode = !pref.darkMode;
  47.             initColors();
  48.             albumart = null;
  49.             loadFromCache = false;
  50.             on_playback_new_track(fb.GetNowPlaying());
  51.             break;
  52.  
  53. // inside globals.js in the pref.add_properties()
  54.  
  55.     darkMode: ['Use Dark Theme', true], // true: use a darker background
  56.  
  57. // I also made some changes in themes.js, mostly inside setTheme() although this code might be refactored from what you have
  58.  
  59.     if (!pref.darkMode) {
  60.         col.progress_bar = rgb(125,125,125);
  61.     } else {
  62.         col.progress_bar = rgb(23, 22, 25);
  63.     }
  64.  
  65. //etc...
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement