summaryrefslogtreecommitdiff
path: root/apps/gui
diff options
context:
space:
mode:
authorMartin Scarratt <mmmm@rockbox.org>2006-09-12 18:26:27 +0000
committerMartin Scarratt <mmmm@rockbox.org>2006-09-12 18:26:27 +0000
commitd7fa569df60026a3f28173dafcdffbfaa99ed0fe (patch)
tree800215aca789ca87422f41cfadf8034a3a557051 /apps/gui
parent44e8233134f29f0ba88d43937409058da292ee1d (diff)
downloadrockbox-d7fa569df60026a3f28173dafcdffbfaa99ed0fe.zip
rockbox-d7fa569df60026a3f28173dafcdffbfaa99ed0fe.tar.gz
rockbox-d7fa569df60026a3f28173dafcdffbfaa99ed0fe.tar.bz2
rockbox-d7fa569df60026a3f28173dafcdffbfaa99ed0fe.tar.xz
Improved statusbar icons in recording screen by Davide Gentile
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10935 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/gui')
-rw-r--r--apps/gui/statusbar.c57
1 files changed, 34 insertions, 23 deletions
diff --git a/apps/gui/statusbar.c b/apps/gui/statusbar.c
index 72e681f..08c02fa 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 + \
- 3*ICONS_SPACING
+ 4*ICONS_SPACING - 1
#define STATUSBAR_RECFREQ_WIDTH 12
#define STATUSBAR_RECCHANNELS_X_POS STATUSBAR_X_POS + \
STATUSBAR_BATTERY_WIDTH + \
@@ -602,8 +602,11 @@ void gui_statusbar_time(struct screen * display, int hour, int minute)
#ifdef HAVE_RECORDING
void gui_statusbar_icon_recording_info(struct screen * display)
{
- int width, height;
+#if (CONFIG_CODEC != SWCODEC) || defined(SIMULATOR)
char buffer[4];
+#endif
+#if CONFIG_CODEC != SWCODEC
+ int width, height;
char* const sample_rate[12] =
{
"8",
@@ -619,22 +622,21 @@ void gui_statusbar_icon_recording_info(struct screen * display)
"88",
"96"
};
-#if CONFIG_CODEC != SWCODEC
char* const bit_rate[9] =
{
- "MQ0",
- "MQ1",
- "MQ2",
- "MQ3",
- "MQ4",
- "MQ5",
- "MQ6",
- "MQ7",
+ "Mq0",
+ "Mq1",
+ "Mq2",
+ "Mq3",
+ "Mq4",
+ "Mq5",
+ "Mq6",
+ "Mq7",
"WAV"
};
-#endif
display->setfont(FONT_SYSFIXED);
+#endif
/* Display Codec info in statusbar */
#if CONFIG_CODEC == SWCODEC
@@ -644,7 +646,8 @@ 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]);
+ snprintf(buffer, sizeof(buffer), "%s",
+ bit_rate[global_settings.rec_quality]);
display->getstringsize(buffer, &width, &height);
if (height <= STATUSBAR_HEIGHT)
{
@@ -657,9 +660,12 @@ void gui_statusbar_icon_recording_info(struct screen * display)
if (global_settings.rec_source == SOURCE_SPDIF)
{
#if (CONFIG_CODEC != MAS3587F) && !defined(SIMULATOR)
- snprintf(buffer, sizeof(buffer), "%s", sample_rate[audio_get_spdif_sample_rate()]);
+ display->mono_bitmap(bitmap_icons_12x8[audio_get_spdif_sample_rate()],
+ 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 */
+ /* Can't measure S/PDIF sample rate on Archos/Sim yet so
+ just display input type */
snprintf(buffer, sizeof(buffer), "Dg");
#endif
}
@@ -681,17 +687,22 @@ void gui_statusbar_icon_recording_info(struct screen * display)
else if (freq == 5)
freq = FREQ_16;
+#if CONFIG_CODEC == SWCODEC
+ /* samplerate icons for swcodec targets*/
+ 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->getstringsize(buffer, &width, &height);
- display->setfont(FONT_UI);
+ 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)
{