Index: src/apps/plugins/pictureflow/pictureflow.c =================================================================== --- src/apps/plugins/pictureflow/pictureflow.c (revision 26735) +++ src/apps/plugins/pictureflow/pictureflow.c (working copy) @@ -222,6 +222,12 @@ #define DISPLAY_LEFT_R (PFREAL_HALF - LCD_WIDTH * PFREAL_HALF) #define MAXSLIDE_LEFT_R (PFREAL_HALF - DISPLAY_WIDTH * PFREAL_HALF) +#if LCD_HEIGHT > 100 +#define NO_REFLECT_HEIGHT LCD_HEIGHT/2 +#else +#define NO_REFLECT_HEIGHT (LCD_HEIGHT-DISPLAY_OFFS) +#endif + #define SLIDE_CACHE_SIZE 64 /* probably more than can be loaded */ #define MAX_SLIDES_COUNT 10 @@ -320,6 +326,7 @@ static int cache_version = 0; static int show_album_name = (LCD_HEIGHT > 100) ? album_name_top : album_name_bottom; +static bool show_reflection = true; static struct configdata config[] = { @@ -337,7 +344,8 @@ show_album_name_conf }, { TYPE_INT, 0, 2, { .int_p = &auto_wps }, "auto wps", NULL }, { TYPE_INT, 0, 999999, { .int_p = &last_album }, "last album", NULL }, - { TYPE_INT, 0, 1, { .int_p = &backlight_mode }, "backlight", NULL } + { TYPE_INT, 0, 1, { .int_p = &backlight_mode }, "backlight", NULL }, + { TYPE_BOOL, 0, 1, { .bool_p = &show_reflection }, "show reflection", NULL } }; #define CONFIG_NUM_ITEMS (sizeof(config) / sizeof(struct configdata)) @@ -1789,7 +1797,7 @@ int p = (bmp->height-1-DISPLAY_OFFS) * PFREAL_ONE; int plim = MAX(0, p - (LCD_HEIGHT/2-1) * dy); - pix_t *pixel = LCDADDR(x, (LCD_HEIGHT/2)-1 ); + pix_t *pixel = LCDADDR(x, show_reflection ? (LCD_HEIGHT/2)-1 : NO_REFLECT_HEIGHT-1); if (alpha == 256) { while (p >= plim) { @@ -1811,7 +1819,7 @@ plim = MIN(sh * PFREAL_ONE, p + (LCD_HEIGHT/2) * dy); int plim2 = MIN(MIN(sh + REFLECT_HEIGHT, sh * 2) * PFREAL_ONE, p + (LCD_HEIGHT/2) * dy); - pixel = LCDADDR(x, (LCD_HEIGHT/2) ); + pixel = LCDADDR(x, show_reflection ? LCD_HEIGHT/2 : NO_REFLECT_HEIGHT); if (alpha == 256) { while (p < plim) { @@ -1826,7 +1834,8 @@ pixel += PIXELSTEP_Y; } } - while (p < plim2) { + if(show_reflection) + while (p < plim2) { int ty = (((unsigned)p) >> PFREAL_SHIFT) - sh; int lalpha = reftab[ty]; *pixel = fade_color(ptr[sh - 1 - ty], lalpha); @@ -2123,7 +2132,7 @@ MENUITEM_STRINGLIST(settings_menu, "PictureFlow Settings", NULL, "Show FPS", "Spacing", "Centre margin", "Number of slides", "Zoom", "Show album title", "Resize Covers", "Rebuild cache", - "WPS Integration", "Backlight"); + "WPS Integration", "Backlight", "Reflection"); static const struct opt_items album_name_options[] = { { "Hide album title", -1 }, @@ -2201,6 +2210,9 @@ case 9: rb->set_option("Backlight", &backlight_mode, INT, backlight_options, 2, NULL); break; + case 10: + rb->set_bool("Reflection", &show_reflection); + break; case MENU_ATTACHED_USB: return PLUGIN_USB_CONNECTED; @@ -2321,13 +2333,18 @@ inc = (100 << 8) / h; c = 0; selected_track_pulse = (selected_track_pulse+1) % 10; + +#if defined(HAVE_LCD_COLOR) || defined(HAVE_USEFUL_GREYLIB) int c2 = selected_track_pulse - 5; +#endif for (r=0; r> 9), c2+100-(c >> 9), c2+250-(c >> 8))); +#elif defined(HAVE_USEFUL_GREYLIB) + mylcd_set_foreground(G_BRIGHT(c2+160-(c >> 8))); #else - mylcd_set_foreground(G_BRIGHT(c2+160-(c >> 8))); + mylcd_set_foreground(G_BRIGHT(255)); #endif mylcd_hline(0, LCD_WIDTH, r+y); if ( r > h/2 ) @@ -2390,7 +2407,7 @@ create_track_index(center_slide.slide_index); reset_track_list(); } - static int titletxt_w, titletxt_x, color, titletxt_h; + static int titletxt_w, titletxt_x, titletxt_h; titletxt_h = rb->screens[SCREEN_MAIN]->getcharheight(); int titletxt_y = track_list_y; @@ -2403,7 +2420,11 @@ titletxt_x = (LCD_WIDTH-titletxt_w)/2; if ( track_i == selected_track ) { draw_gradient(titletxt_y, titletxt_h); +#if defined(HAVE_LCD_COLOR) || defined(HAVE_USEFUL_GREYLIB) mylcd_set_foreground(G_BRIGHT(255)); +#else + mylcd_set_foreground(G_BRIGHT(0)); +#endif if (titletxt_w > LCD_WIDTH ) { if ( titletxt_w + track_scroll_index <= LCD_WIDTH ) track_scroll_dir = 1; @@ -2414,8 +2435,11 @@ mylcd_putsxy(titletxt_x,titletxt_y,get_track_name(track_i)); } else { - color = 250 - (abs(selected_track - track_i) * 200 / track_count); - mylcd_set_foreground(G_BRIGHT(color)); +#if defined(HAVE_LCD_COLOR) || defined(HAVE_USEFUL_GREYLIB) + mylcd_set_foreground(G_BRIGHT(250 - (abs(selected_track - track_i) * 200 / track_count))); +#else + mylcd_set_foreground(G_BRIGHT(255)); +#endif mylcd_putsxy(titletxt_x,titletxt_y,get_track_name(track_i)); } titletxt_y += titletxt_h; Index: src/firmware/export/config.h =================================================================== --- src/firmware/export/config.h (revision 26735) +++ src/firmware/export/config.h (working copy) @@ -944,4 +944,12 @@ #define HAVE_IO_PRIORITY #endif +#if defined(HAVE_TAGCACHE) && defined(HAVE_LCD_BITMAP) +#define HAVE_PICTUREFLOW +#endif + +#if defined(HAVE_LCD_BITMAP) && (LCD_DEPTH < 4) && (CONFIG_LCD != LCD_SSD1303) +#define HAVE_USEFUL_GREYLIB +#endif + #endif /* __CONFIG_H__ */