This commit is contained in:
e2002
2022-10-18 10:08:42 +03:00
parent aac04b6a9e
commit bfb6cd822a
7 changed files with 55 additions and 33 deletions

View File

@@ -299,6 +299,10 @@ Work is in progress...
--- ---
## Version history ## Version history
#### v0.8.02b
- fixed artifacts when displaying the volume level
- changes in mytheme.h . Added colors COLOR_PL_CURRENT, COLOR_PL_CURRENT_BG, COLOR_PL_CURRENT_FILL. Details in [exsamples/mytheme.h](exsamples/mytheme.h)
#### v0.8.01b #### v0.8.01b
- fix INITR_MINI160x80 compiling error - fix INITR_MINI160x80 compiling error
- fix ENC_INTERNALPULLUP descriotion in exsamples/myoptions.h - fix ENC_INTERNALPULLUP descriotion in exsamples/myoptions.h

View File

@@ -19,7 +19,7 @@
//#define COLOR_BACKGROUND 255, 255, 0 /* background */ //#define COLOR_BACKGROUND 255, 255, 0 /* background */
//#define COLOR_STATION_NAME 0, 0, 0 /* station name */ //#define COLOR_STATION_NAME 0, 0, 0 /* station name */
//#define COLOR_STATION_BG 91, 118, 255 /* station name background */ //#define COLOR_STATION_BG 91, 118, 255 /* station name background */
//#define COLOR_STATION_FILL 231, 211, 90 /* station name fill background */ //#define COLOR_STATION_FILL 91, 118, 255 /* station name fill background */
//#define COLOR_SNG_TITLE_1 255, 0, 0 /* first title */ //#define COLOR_SNG_TITLE_1 255, 0, 0 /* first title */
//#define COLOR_SNG_TITLE_2 0, 0, 0 /* second title */ //#define COLOR_SNG_TITLE_2 0, 0, 0 /* second title */
//#define COLOR_WEATHER 255, 0, 216 /* weather string */ //#define COLOR_WEATHER 255, 0, 216 /* weather string */
@@ -39,6 +39,9 @@
//#define COLOR_DIGITS 100, 100, 255 /* volume / station number */ //#define COLOR_DIGITS 100, 100, 255 /* volume / station number */
//#define COLOR_DIVIDER 0, 255, 0 /* divider color (DSP_ST7789, DSP_ILI9341, DSP_ILI9225) */ //#define COLOR_DIVIDER 0, 255, 0 /* divider color (DSP_ST7789, DSP_ILI9341, DSP_ILI9225) */
//#define COLOR_BITRATE 231, 211, 90 /* bitrate */ //#define COLOR_BITRATE 231, 211, 90 /* bitrate */
//#define COLOR_PL_CURRENT 0, 0, 0 /* playlist current item */
//#define COLOR_PL_CURRENT_BG 91, 118, 255 /* playlist current item background */
//#define COLOR_PL_CURRENT_FILL 91, 118, 255 /* playlist current item fill background */
//#define COLOR_PLAYLIST_0 255, 0, 0 /* playlist string 0 */ //#define COLOR_PLAYLIST_0 255, 0, 0 /* playlist string 0 */
//#define COLOR_PLAYLIST_1 0, 255, 0 /* playlist string 1 */ //#define COLOR_PLAYLIST_1 0, 255, 0 /* playlist string 1 */
//#define COLOR_PLAYLIST_2 255, 0, 255 /* playlist string 2 */ //#define COLOR_PLAYLIST_2 255, 0, 255 /* playlist string 2 */

View File

@@ -72,6 +72,9 @@ void Config::loadTheme(){
theme.bitrate = color565(COLOR_BITRATE); theme.bitrate = color565(COLOR_BITRATE);
theme.volbarout = color565(COLOR_VOLBAR_OUT); theme.volbarout = color565(COLOR_VOLBAR_OUT);
theme.volbarin = color565(COLOR_VOLBAR_IN); theme.volbarin = color565(COLOR_VOLBAR_IN);
theme.plcurrent = color565(COLOR_PL_CURRENT);
theme.plcurrentbg = color565(COLOR_PL_CURRENT_BG);
theme.plcurrentfill = color565(COLOR_PL_CURRENT_FILL);
theme.playlist[0] = color565(COLOR_PLAYLIST_0); theme.playlist[0] = color565(COLOR_PLAYLIST_0);
theme.playlist[1] = color565(COLOR_PLAYLIST_1); theme.playlist[1] = color565(COLOR_PLAYLIST_1);
theme.playlist[2] = color565(COLOR_PLAYLIST_2); theme.playlist[2] = color565(COLOR_PLAYLIST_2);

View File

@@ -48,6 +48,9 @@ struct theme_t {
uint16_t bitrate; uint16_t bitrate;
uint16_t volbarout; uint16_t volbarout;
uint16_t volbarin; uint16_t volbarin;
uint16_t plcurrent;
uint16_t plcurrentbg;
uint16_t plcurrentfill;
uint16_t playlist[5]; uint16_t playlist[5];
}; };
struct config_t struct config_t

View File

@@ -78,13 +78,13 @@ void Display::_buildPager(){
#if DSP_MODEL==DSP_NOKIA5110 #if DSP_MODEL==DSP_NOKIA5110
_plcurrent.init("*", playlistConf, 0, 1); _plcurrent.init("*", playlistConf, 0, 1);
#else #else
_plcurrent.init("*", playlistConf, config.theme.meta, config.theme.metabg); _plcurrent.init("*", playlistConf, config.theme.plcurrent, config.theme.plcurrentbg);
#endif #endif
#ifndef HIDE_TITLE2 #ifndef HIDE_TITLE2
_title2 = new ScrollWidget("*", title2Conf, config.theme.title2, config.theme.background); _title2 = new ScrollWidget("*", title2Conf, config.theme.title2, config.theme.background);
#endif #endif
#if !defined(DSP_LCD) && DSP_MODEL!=DSP_NOKIA5110 #if !defined(DSP_LCD) && DSP_MODEL!=DSP_NOKIA5110
_plbackground = new FillWidget(playlBGConf, config.theme.metafill); _plbackground = new FillWidget(playlBGConf, config.theme.plcurrentfill);
_metabackground = new FillWidget(metaBGConf, config.theme.metafill); _metabackground = new FillWidget(metaBGConf, config.theme.metafill);
#endif #endif
#if DSP_MODEL==DSP_NOKIA5110 #if DSP_MODEL==DSP_NOKIA5110

View File

@@ -1,7 +1,7 @@
#ifndef options_h #ifndef options_h
#define options_h #define options_h
#define VERSION "0.8.01b" #define VERSION "0.8.02b"
/******************************************************* /*******************************************************
DO NOT EDIT THIS FILE. DO NOT EDIT THIS FILE.
@@ -307,6 +307,15 @@ The connection tables are located here https://github.com/e2002/yoradio#connecti
#ifndef COLOR_DIVIDER #ifndef COLOR_DIVIDER
#define COLOR_DIVIDER 165, 162, 132 #define COLOR_DIVIDER 165, 162, 132
#endif #endif
#ifndef COLOR_PL_CURRENT
#define COLOR_PL_CURRENT 0, 0, 0
#endif
#ifndef COLOR_PL_CURRENT_BG
#define COLOR_PL_CURRENT_BG 231, 211, 90
#endif
#ifndef COLOR_PL_CURRENT_FILL
#define COLOR_PL_CURRENT_FILL 231, 211, 90
#endif
#ifndef COLOR_PLAYLIST_0 #ifndef COLOR_PLAYLIST_0
#define COLOR_PLAYLIST_0 115, 115, 115 #define COLOR_PLAYLIST_0 115, 115, 115
#endif #endif

View File

@@ -258,7 +258,7 @@ void SliderWidget::_draw() {
} }
void SliderWidget::_clear() { void SliderWidget::_clear() {
_oldvalwidth = 0; // _oldvalwidth = 0;
dsp.fillRect(_config.left, _config.top, _width, _height, _bgcolor); dsp.fillRect(_config.left, _config.top, _width, _height, _bgcolor);
} }
/************************ /************************