diff options
-rw-r--r-- | apps/recorder/icons.c | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/apps/recorder/icons.c b/apps/recorder/icons.c index acd6d6de4b..c8fe622d6a 100644 --- a/apps/recorder/icons.c +++ b/apps/recorder/icons.c | |||
@@ -153,46 +153,46 @@ void statusbar_icon_battery(int percent, bool charging) | |||
153 | { | 153 | { |
154 | int i; | 154 | int i; |
155 | int fill; | 155 | int fill; |
156 | char buffer[5]; | 156 | char buffer[5]; |
157 | unsigned int width, height; | 157 | unsigned int width, height; |
158 | 158 | ||
159 | /* fill battery */ | 159 | /* fill battery */ |
160 | fill=percent; | 160 | fill=percent; |
161 | if (fill < 0) | 161 | if (fill < 0) |
162 | fill = 0; | 162 | fill = 0; |
163 | if (fill > 100) | 163 | if (fill > 100) |
164 | fill = 100; | 164 | fill = 100; |
165 | 165 | ||
166 | #ifdef SIMULATOR | 166 | #ifdef SIMULATOR |
167 | if (global_settings.battery_type) { | 167 | if (global_settings.battery_type) { |
168 | #else | 168 | #else |
169 | #ifdef HAVE_CHARGE_CTRL /* Recorder */ | 169 | #ifdef HAVE_CHARGE_CTRL /* Recorder */ |
170 | /* show graphical animation when charging instead of numbers */ | 170 | /* show graphical animation when charging instead of numbers */ |
171 | if ((global_settings.battery_type) && (charge_state != 1)) { | 171 | if ((global_settings.battery_type) && (charge_state != 1)) { |
172 | #else /* FM */ | 172 | #else /* FM */ |
173 | if (global_settings.battery_type) { | 173 | if (global_settings.battery_type) { |
174 | #endif /* HAVE_CHARGE_CTRL */ | 174 | #endif /* HAVE_CHARGE_CTRL */ |
175 | #endif | 175 | #endif |
176 | /* Numeric display */ | 176 | /* Numeric display */ |
177 | snprintf(buffer, sizeof(buffer), "%3d", percent); | 177 | snprintf(buffer, sizeof(buffer), "%3d", percent); |
178 | lcd_setfont(FONT_SYSFIXED); | 178 | lcd_setfont(FONT_SYSFIXED); |
179 | lcd_getstringsize(buffer, &width, &height); | 179 | lcd_getstringsize(buffer, &width, &height); |
180 | if (height <= STATUSBAR_HEIGHT) | 180 | if (height <= STATUSBAR_HEIGHT) |
181 | lcd_putsxy(ICON_BATTERY_X_POS + ICON_BATTERY_WIDTH / 2 - | 181 | lcd_putsxy(ICON_BATTERY_X_POS + ICON_BATTERY_WIDTH / 2 - |
182 | width/2, STATUSBAR_Y_POS, buffer); | 182 | width/2, STATUSBAR_Y_POS, buffer); |
183 | lcd_setfont(FONT_UI); | 183 | lcd_setfont(FONT_UI); |
184 | 184 | ||
185 | } else { | 185 | } |
186 | 186 | else { | |
187 | /* draw battery */ | 187 | /* draw battery */ |
188 | lcd_drawrect(ICON_BATTERY_X_POS, STATUSBAR_Y_POS, 17, 7); | 188 | lcd_drawrect(ICON_BATTERY_X_POS, STATUSBAR_Y_POS, 17, 7); |
189 | for (i=2; i < 5; i++) | 189 | for (i=2; i < 5; i++) |
190 | lcd_drawpixel(ICON_BATTERY_X_POS + 17, STATUSBAR_Y_POS + i); | 190 | lcd_drawpixel(ICON_BATTERY_X_POS + 17, STATUSBAR_Y_POS + i); |
191 | 191 | ||
192 | fill = fill * 15 / 100; | 192 | fill = fill * 15 / 100; |
193 | 193 | ||
194 | lcd_fillrect(ICON_BATTERY_X_POS + 1, STATUSBAR_Y_POS + 1, fill, 5); | 194 | lcd_fillrect(ICON_BATTERY_X_POS + 1, STATUSBAR_Y_POS + 1, fill, 5); |
195 | } | 195 | } |
196 | 196 | ||
197 | /* draw power plug if charging */ | 197 | /* draw power plug if charging */ |
198 | if (charging) | 198 | if (charging) |
@@ -234,9 +234,9 @@ void statusbar_icon_volume(int percent) | |||
234 | } | 234 | } |
235 | 235 | ||
236 | /* display volume level numerical? */ | 236 | /* display volume level numerical? */ |
237 | if (global_settings.volume_type || | 237 | if (global_settings.volume_type || |
238 | TIME_BEFORE(current_tick,switch_tick)) | 238 | TIME_BEFORE(current_tick,switch_tick)) |
239 | { | 239 | { |
240 | snprintf(buffer, sizeof(buffer), "%2d", percent); | 240 | snprintf(buffer, sizeof(buffer), "%2d", percent); |
241 | lcd_setfont(FONT_SYSFIXED); | 241 | lcd_setfont(FONT_SYSFIXED); |
242 | lcd_getstringsize(buffer, &width, &height); | 242 | lcd_getstringsize(buffer, &width, &height); |