diff options
| author | Thomas Martitz <kugel@rockbox.org> | 2013-12-20 23:34:28 +0100 |
|---|---|---|
| committer | Thomas Martitz <kugel@rockbox.org> | 2014-01-07 11:36:00 +0100 |
| commit | bc9a45b05f2b16e3413e53db5a33515c68933738 (patch) | |
| tree | 99aa1f6defcd0bdd8b842c896b8715f0df481719 /apps/gui/bitmap | |
| parent | 76476751d7500da813be85829ad740962b8cee79 (diff) | |
| download | rockbox-bc9a45b05f2b16e3413e53db5a33515c68933738.zip rockbox-bc9a45b05f2b16e3413e53db5a33515c68933738.tar.gz rockbox-bc9a45b05f2b16e3413e53db5a33515c68933738.tar.bz2 rockbox-bc9a45b05f2b16e3413e53db5a33515c68933738.tar.xz | |
icons: Remove automatic left padding if x == 0.
Since x is viewport-relative the icon isn't necessarily placed at the physical
display boundaries so that the padding isn't always useful. In fact it does
more harm if one wants to place an icon exactly at 0 of a (non-default)
viewport.
Calling code looks still mostly fine. I've only modified list drawer to include
the padding in the call-site.
Change-Id: I6b16b3d4377c3553234667b79837adde10e0edf2
Diffstat (limited to 'apps/gui/bitmap')
| -rw-r--r-- | apps/gui/bitmap/list.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/gui/bitmap/list.c b/apps/gui/bitmap/list.c index 79eec60..b1fd474 100644 --- a/apps/gui/bitmap/list.c +++ b/apps/gui/bitmap/list.c @@ -124,7 +124,7 @@ static bool draw_title(struct screen *display, struct gui_synclist *list) title_text_vp->width -= title_icon.width; display->set_viewport(&title_icon); - screen_put_iconxy(display, 0, 0, list->title_icon); + screen_put_iconxy(display, ICON_PADDING, 0, list->title_icon); } #ifdef HAVE_LCD_COLOR if (list->title_color >= 0) @@ -368,7 +368,7 @@ void list_draw(struct screen *display, struct gui_synclist *list) display->set_viewport(&list_icons); if (list->callback_get_item_icon != NULL) { - int xoff = show_cursor ? list_icon_width(screen) : 0; + int xoff = show_cursor ? list_icon_width(screen) : ICON_PADDING; screen_put_iconxy(display, xoff, line*line_height + draw_offset + icon_yoffset, list->callback_get_item_icon(i, list->data)); @@ -377,7 +377,7 @@ void list_draw(struct screen *display, struct gui_synclist *list) if (show_cursor && i >= list->selected_item && i < list->selected_item + list->selected_size) { - screen_put_iconxy(display, 0, + screen_put_iconxy(display, ICON_PADDING, line*line_height + draw_offset + icon_yoffset, Icon_Cursor); } |