From 183499a2d43ebcec9a522bbcbde506f0b3c5e01d Mon Sep 17 00:00:00 2001 From: Martin Scarratt Date: Tue, 26 Sep 2006 11:56:59 +0000 Subject: Recording screen statusbar: Improved channel icon by Paul Louden and improved Q value display for Hardware codec targets git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11062 a1c6a512-1295-4272-9138-f99709370657 --- apps/gui/statusbar.c | 36 +++++++++++++----------------------- 1 file changed, 13 insertions(+), 23 deletions(-) (limited to 'apps/gui') diff --git a/apps/gui/statusbar.c b/apps/gui/statusbar.c index b5913af9be..a8b8c5061b 100644 --- a/apps/gui/statusbar.c +++ b/apps/gui/statusbar.c @@ -77,7 +77,7 @@ STATUSBAR_PLUG_WIDTH + \ STATUSBAR_VOLUME_WIDTH + \ STATUSBAR_PLAY_STATE_WIDTH + \ - 4*ICONS_SPACING - 1 + 3*ICONS_SPACING #define STATUSBAR_RECFREQ_WIDTH 12 #define STATUSBAR_RECCHANNELS_X_POS STATUSBAR_X_POS + \ STATUSBAR_BATTERY_WIDTH + \ @@ -603,7 +603,7 @@ void gui_statusbar_time(struct screen * display, int hour, int minute) void gui_statusbar_icon_recording_info(struct screen * display) { #if (CONFIG_CODEC != SWCODEC) || (defined(SIMULATOR) && defined(HAVE_SPDIF_IN)) - char buffer[4]; + char buffer[3]; #endif #if CONFIG_CODEC != SWCODEC int width, height; @@ -622,18 +622,6 @@ void gui_statusbar_icon_recording_info(struct screen * display) "88", "96" }; - static char* const bit_rate[9] = - { - "Mq0", - "Mq1", - "Mq2", - "Mq3", - "Mq4", - "Mq5", - "Mq6", - "Mq7", - "WAV" - }; display->setfont(FONT_SYSFIXED); #endif @@ -646,13 +634,15 @@ void gui_statusbar_icon_recording_info(struct screen * display) STATUSBAR_ENCODER_X_POS, STATUSBAR_Y_POS, STATUSBAR_ENCODER_WIDTH, STATUSBAR_HEIGHT); #else - snprintf(buffer, sizeof(buffer), "%s", - bit_rate[global_settings.rec_quality]); + + display->mono_bitmap(bitmap_icons_5x8[Icon_q], + STATUSBAR_ENCODER_X_POS + 8, STATUSBAR_Y_POS, + 5, STATUSBAR_HEIGHT); + + snprintf(buffer, sizeof(buffer), "%d", global_settings.rec_quality); display->getstringsize(buffer, &width, &height); if (height <= STATUSBAR_HEIGHT) - { - display->putsxy(STATUSBAR_ENCODER_X_POS, STATUSBAR_Y_POS, buffer); - } + display->putsxy(STATUSBAR_ENCODER_X_POS + 13, STATUSBAR_Y_POS, buffer); #endif /* Display Samplerate info in statusbar */ @@ -664,9 +654,8 @@ void gui_statusbar_icon_recording_info(struct screen * display) STATUSBAR_RECFREQ_X_POS, STATUSBAR_Y_POS, STATUSBAR_RECFREQ_WIDTH, STATUSBAR_HEIGHT); #else - /* Can't measure S/PDIF sample rate on Archos/Sim yet so - just display input type */ - snprintf(buffer, sizeof(buffer), "Dg"); + /* Can't measure S/PDIF sample rate on Archos/Sim yet */ + snprintf(buffer, sizeof(buffer), "--"); #endif } else @@ -692,17 +681,18 @@ void gui_statusbar_icon_recording_info(struct screen * display) display->mono_bitmap(bitmap_icons_12x8[freq], STATUSBAR_RECFREQ_X_POS, STATUSBAR_Y_POS, STATUSBAR_RECFREQ_WIDTH, STATUSBAR_HEIGHT); + } #else /* hwcodec targets have sysfont characters */ snprintf(buffer, sizeof(buffer), "%s", sample_rate[freq]); display->getstringsize(buffer, &width, &height); + } if (height <= STATUSBAR_HEIGHT) display->putsxy(STATUSBAR_RECFREQ_X_POS, STATUSBAR_Y_POS, buffer); display->setfont(FONT_UI); #endif - } /* Display Channel status in status bar */ if(global_settings.rec_channels) { -- cgit v1.2.3