Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function initColors() {
- col.artist = RGB(255, 255, 255);
- col.info_text = RGB(255, 255, 255);
- if (!pref.darkMode) {
- col.bg = RGB(205, 205, 205);
- col.menu_bg = RGB(58, 58, 58);
- col.progress_fill = RGB(235, 59, 70);
- col.progress_bar = RGB(125, 125, 125);
- col.now_playing = RGB(0, 0, 0); // tracknumber, title, and time
- col.aa_shadow = RGBA(000, 000, 000, 64);
- } else {
- col.bg = RGB(50, 54, 57);
- col.menu_bg = RGB(23, 23, 23);
- col.progress_fill = RGB(235, 59, 70);
- col.progress_bar = RGB(23, 22, 25);
- col.now_playing = RGB(255, 255, 255); // tracknumber, title, and time
- col.aa_shadow = RGBA(128, 128, 128, 54);
- }
- col.rating = RGB(255, 170, 032);
- col.mood = RGB(000, 128, 255);
- col.hotness = RGB(192, 192, 000);
- col.playcount = RGB(000, 153, 153);
- col.dark_grey = RGB(128, 128, 128);
- col.tl_added = RGB(15, 51, 65);
- col.tl_played = RGB(44, 66, 75);
- col.tl_unplayed = RGB(126, 173, 195);
- col.tl_play = RGB(255, 255, 255); // each individual play
- // ALBUM ART DISPLAY PROPERTIES
- col.aa_border = RGBA(060, 060, 060, 128);
- }
- initColors();
- // inside onSettingsMenu (note I might have changed the index numbers... so you probably can't cut and paste this)
- _menu.AppendMenuItem(MF_STRING, 1, 'Use Dark Theme');
- _menu.CheckMenuItem(1, pref.darkMode);
- // down below in the switch statement in the same method
- case 1:
- pref.darkMode = !pref.darkMode;
- initColors();
- albumart = null;
- loadFromCache = false;
- on_playback_new_track(fb.GetNowPlaying());
- break;
- // inside globals.js in the pref.add_properties()
- darkMode: ['Use Dark Theme', true], // true: use a darker background
- // I also made some changes in themes.js, mostly inside setTheme() although this code might be refactored from what you have
- if (!pref.darkMode) {
- col.progress_bar = rgb(125,125,125);
- } else {
- col.progress_bar = rgb(23, 22, 25);
- }
- //etc...
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement