summaryrefslogtreecommitdiff
path: root/apps/gui
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2006-10-12 00:50:13 +0000
committerMichael Sevakis <jethead71@rockbox.org>2006-10-12 00:50:13 +0000
commita7c8c71dad328fcd97a42667b824d272fb46d993 (patch)
tree7ce1db1c8f7e37241d6f7639acc9831ebbdbcd39 /apps/gui
parentb5404b2ca641d3794379975670d7fbbc75872d7e (diff)
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.c22
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,
background_color = display->get_background();
}
- /* Find out if there's enought room for three slider or just
- enought to display the selected slider */
- display_three_rows = display->height >= display->char_height*4 +
- MARGIN_TOP +
- TITLE_MARGIN_BOTTOM +
- MARGIN_BOTTOM;
-
- /* Figure out widest label character in case they vary */
+ /* Find out if there's enough room for three sliders or just
+ enough to display the selected slider - calculate total height
+ of display with three sliders present */
+ display_three_rows =
+ display->height >= MARGIN_TOP +
+ display->char_height*4 + /* Title + 3 sliders */
+ TITLE_MARGIN_BOTTOM +
+ SELECTOR_TB_MARGIN*6 + /* 2 margins/slider */
+ MARGIN_BOTTOM;
+
+ /* Figure out widest label character in case they vary -
+ this function assumes labels are one character */
for (i = 0, max_label_width = 0; i < 3; i++)
{
buf[0] = str(LANG_COLOR_RGB_LABELS)[i];
@@ -232,7 +236,7 @@ static void draw_screen(struct screen *display, char *title,
set_drawinfo(display, mode, fg, bg);
- /* Draw label - assumes labels are one character */
+ /* Draw label */
buf[0] = str(LANG_COLOR_RGB_LABELS)[i];
buf[1] = '\0';
display->putsxy(slider_left - display->char_width -