summaryrefslogtreecommitdiff
path: root/apps/gui/icon.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/gui/icon.c')
-rw-r--r--apps/gui/icon.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/apps/gui/icon.c b/apps/gui/icon.c
index c171da5b44..4c006f947a 100644
--- a/apps/gui/icon.c
+++ b/apps/gui/icon.c
@@ -109,14 +109,11 @@ void screen_put_icon_with_offset(struct screen * display,
109void screen_put_iconxy(struct screen * display, 109void screen_put_iconxy(struct screen * display,
110 int xpos, int ypos, enum themable_icons icon) 110 int xpos, int ypos, enum themable_icons icon)
111{ 111{
112 const void *data;
113 const int screen = display->screen_type; 112 const int screen = display->screen_type;
114 const int width = ICON_WIDTH(screen); 113 const int width = ICON_WIDTH(screen);
115 const int height = ICON_HEIGHT(screen); 114 const int height = ICON_HEIGHT(screen);
116 const int is_rtl = lang_is_rtl(); 115 const int is_rtl = lang_is_rtl();
117 int stride;
118 const struct bitmap *iconset; 116 const struct bitmap *iconset;
119 screen_bitmap_part_func *draw_func = NULL;
120 117
121 if (icon == Icon_NOICON) 118 if (icon == Icon_NOICON)
122 { 119 {
@@ -145,9 +142,6 @@ void screen_put_iconxy(struct screen * display,
145 { 142 {
146 iconset = &inbuilt_iconset[screen]; 143 iconset = &inbuilt_iconset[screen];
147 } 144 }
148 data = iconset->data;
149 stride = STRIDE(display->screen_type, iconset->width, iconset->height);
150
151 /* add some left padding to the icons if they are on the edge */ 145 /* add some left padding to the icons if they are on the edge */
152 if (xpos == 0) 146 if (xpos == 0)
153 xpos++; 147 xpos++;
@@ -155,14 +149,8 @@ void screen_put_iconxy(struct screen * display,
155 if (is_rtl) 149 if (is_rtl)
156 xpos = display->getwidth() - xpos - width; 150 xpos = display->getwidth() - xpos - width;
157 151
158#if (LCD_DEPTH == 16) || defined(LCD_REMOTE_DEPTH) && (LCD_REMOTE_DEPTH == 16)
159 if (display->depth == 16)
160 draw_func = display->transparent_bitmap_part;
161 else
162#endif
163 draw_func = display->bitmap_part;
164 152
165 draw_func(data, 0, height * icon, stride, xpos, ypos, width, height); 153 display->bmp_part(iconset, 0, height * icon, xpos, ypos, width, height);
166} 154}
167 155
168void screen_put_cursorxy(struct screen * display, int x, int y, bool on) 156void screen_put_cursorxy(struct screen * display, int x, int y, bool on)