diff options
author | Michael Sevakis <jethead71@rockbox.org> | 2006-10-12 00:50:13 +0000 |
---|---|---|
committer | Michael Sevakis <jethead71@rockbox.org> | 2006-10-12 00:50:13 +0000 |
commit | a7c8c71dad328fcd97a42667b824d272fb46d993 (patch) | |
tree | 7ce1db1c8f7e37241d6f7639acc9831ebbdbcd39 /apps/gui | |
parent | b5404b2ca641d3794379975670d7fbbc75872d7e (diff) | |
download | rockbox-a7c8c71dad328fcd97a42667b824d272fb46d993.tar.gz rockbox-a7c8c71dad328fcd97a42667b824d272fb46d993.zip |
Corrected the calculation to determine to display three sliders or one in the colorpicker. Same wonderment as before...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11197 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/gui')
-rw-r--r-- | apps/gui/color_picker.c | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/apps/gui/color_picker.c b/apps/gui/color_picker.c index 76c47fe376..719112df87 100644 --- a/apps/gui/color_picker.c +++ b/apps/gui/color_picker.c | |||
@@ -145,14 +145,18 @@ static void draw_screen(struct screen *display, char *title, | |||
145 | background_color = display->get_background(); | 145 | background_color = display->get_background(); |
146 | } | 146 | } |
147 | 147 | ||
148 | /* Find out if there's enought room for three slider or just | 148 | /* Find out if there's enough room for three sliders or just |
149 | enought to display the selected slider */ | 149 | enough to display the selected slider - calculate total height |
150 | display_three_rows = display->height >= display->char_height*4 + | 150 | of display with three sliders present */ |
151 | MARGIN_TOP + | 151 | display_three_rows = |
152 | TITLE_MARGIN_BOTTOM + | 152 | display->height >= MARGIN_TOP + |
153 | MARGIN_BOTTOM; | 153 | display->char_height*4 + /* Title + 3 sliders */ |
154 | 154 | TITLE_MARGIN_BOTTOM + | |
155 | /* Figure out widest label character in case they vary */ | 155 | SELECTOR_TB_MARGIN*6 + /* 2 margins/slider */ |
156 | MARGIN_BOTTOM; | ||
157 | |||
158 | /* Figure out widest label character in case they vary - | ||
159 | this function assumes labels are one character */ | ||
156 | for (i = 0, max_label_width = 0; i < 3; i++) | 160 | for (i = 0, max_label_width = 0; i < 3; i++) |
157 | { | 161 | { |
158 | buf[0] = str(LANG_COLOR_RGB_LABELS)[i]; | 162 | buf[0] = str(LANG_COLOR_RGB_LABELS)[i]; |
@@ -232,7 +236,7 @@ static void draw_screen(struct screen *display, char *title, | |||
232 | 236 | ||
233 | set_drawinfo(display, mode, fg, bg); | 237 | set_drawinfo(display, mode, fg, bg); |
234 | 238 | ||
235 | /* Draw label - assumes labels are one character */ | 239 | /* Draw label */ |
236 | buf[0] = str(LANG_COLOR_RGB_LABELS)[i]; | 240 | buf[0] = str(LANG_COLOR_RGB_LABELS)[i]; |
237 | buf[1] = '\0'; | 241 | buf[1] = '\0'; |
238 | display->putsxy(slider_left - display->char_width - | 242 | display->putsxy(slider_left - display->char_width - |