diff options
Diffstat (limited to 'apps/gui/color_picker.c')
| -rw-r--r-- | apps/gui/color_picker.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/apps/gui/color_picker.c b/apps/gui/color_picker.c index 239a8b4..4ac4fa7 100644 --- a/apps/gui/color_picker.c +++ b/apps/gui/color_picker.c @@ -158,11 +158,11 @@ static void draw_screen(struct screen *display, char *title, 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; + display->getheight() >= 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 */ @@ -178,13 +178,13 @@ static void draw_screen(struct screen *display, char *title, /* Draw title string */ set_drawinfo(display, DRMODE_SOLID, text_color, background_color); display->getstringsize(title, &x, &y); - display->putsxy((display->width - x) / 2, MARGIN_TOP, title); + display->putsxy((display->getwidth() - x) / 2, MARGIN_TOP, title); /* Get slider positions and top starting position */ text_top = MARGIN_TOP + y + TITLE_MARGIN_BOTTOM + SELECTOR_TB_MARGIN; slider_left = MARGIN_LEFT + SELECTOR_WIDTH + SELECTOR_LR_MARGIN + max_label_width + SLIDER_MARGIN_LEFT; - slider_width = display->width - slider_left - SLIDER_MARGIN_RIGHT - + slider_width = display->getwidth() - slider_left - SLIDER_MARGIN_RIGHT - display->char_width*2 - SELECTOR_LR_MARGIN - SELECTOR_WIDTH - MARGIN_RIGHT; @@ -208,7 +208,7 @@ static void draw_screen(struct screen *display, char *title, /* Draw solid bar selection bar */ display->fillrect(0, text_top - SELECTOR_TB_MARGIN, - display->width, + display->getwidth(), display->char_height + SELECTOR_TB_MARGIN*2); @@ -225,8 +225,8 @@ static void draw_screen(struct screen *display, char *title, SELECTOR_HEIGHT) / 2; screen_put_iconxy(display, MARGIN_LEFT, top, Icon_Cursor); screen_put_iconxy(display, - display->width - MARGIN_RIGHT - - get_icon_width(display->screen_type), + display->getwidth() - MARGIN_RIGHT - + get_icon_width(display->screen_type), top, Icon_Cursor); } @@ -282,9 +282,9 @@ static void draw_screen(struct screen *display, char *title, /* Display color swatch on color screens only */ int left = MARGIN_LEFT + SELECTOR_WIDTH + SELECTOR_LR_MARGIN; int top = text_top + SWATCH_TOP_MARGIN; - int width = display->width - left - SELECTOR_LR_MARGIN - + int width = display->getwidth() - left - SELECTOR_LR_MARGIN - SELECTOR_WIDTH - MARGIN_RIGHT; - int height = display->height - top - MARGIN_BOTTOM; + int height = display->getheight() - top - MARGIN_BOTTOM; /* Only draw if room */ if (height >= display->char_height + 2) @@ -314,11 +314,11 @@ static void draw_screen(struct screen *display, char *title, display->getstringsize(buf, &x, &y); i = text_top + SWATCH_TOP_MARGIN; - if (i + y <= display->height - MARGIN_BOTTOM) + if (i + y <= display->getheight() - MARGIN_BOTTOM) { set_drawinfo(display, DRMODE_SOLID, text_color, background_color); - x = (display->width - x) / 2; - y = (i + display->height - MARGIN_BOTTOM - y) / 2; + x = (display->getwidth() - x) / 2; + y = (i + display->getheight() - MARGIN_BOTTOM - y) / 2; display->putsxy(x, y, buf); } } |