diff options
author | Linus Nielsen Feltzing <linus@haxx.se> | 2005-09-01 08:04:37 +0000 |
---|---|---|
committer | Linus Nielsen Feltzing <linus@haxx.se> | 2005-09-01 08:04:37 +0000 |
commit | 6c2af7c2aa8afde380b5a5f7c606c49dd38bef18 (patch) | |
tree | b310ecf6d3f9850d322bff9fa0d4b0f8dd3107fb /apps/tree.c | |
parent | 977aa614ba4d6a5515a8b0bb8353772f7e883397 (diff) | |
download | rockbox-6c2af7c2aa8afde380b5a5f7c606c49dd38bef18.tar.gz rockbox-6c2af7c2aa8afde380b5a5f7c606c49dd38bef18.zip |
On popular demand, the arrow cursor is reintroduced
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7438 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/tree.c')
-rw-r--r-- | apps/tree.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/apps/tree.c b/apps/tree.c index e9ee881c01..e56c7a76de 100644 --- a/apps/tree.c +++ b/apps/tree.c | |||
@@ -162,7 +162,7 @@ struct tree_context* tree_get_context(void) | |||
162 | /* pixel margins */ | 162 | /* pixel margins */ |
163 | #define MARGIN_X (global_settings.scrollbar && \ | 163 | #define MARGIN_X (global_settings.scrollbar && \ |
164 | tc.filesindir > tree_max_on_screen ? SCROLLBAR_WIDTH : 0) + \ | 164 | tc.filesindir > tree_max_on_screen ? SCROLLBAR_WIDTH : 0) + \ |
165 | (global_settings.show_icons && ICON_WIDTH > 0 ? ICON_WIDTH :0) | 165 | CURSOR_WIDTH + (global_settings.show_icons && ICON_WIDTH > 0 ? ICON_WIDTH :0) |
166 | #define MARGIN_Y (global_settings.statusbar ? STATUSBAR_HEIGHT : 0) | 166 | #define MARGIN_Y (global_settings.statusbar ? STATUSBAR_HEIGHT : 0) |
167 | 167 | ||
168 | /* position the entry-list starts at */ | 168 | /* position the entry-list starts at */ |
@@ -175,6 +175,7 @@ struct tree_context* tree_get_context(void) | |||
175 | the margins, so this is the amount of lines | 175 | the margins, so this is the amount of lines |
176 | we add to the cursor Y position to position | 176 | we add to the cursor Y position to position |
177 | it on a line */ | 177 | it on a line */ |
178 | #define CURSOR_WIDTH (global_settings.invert_cursor ? 0 : 4) | ||
178 | 179 | ||
179 | #define ICON_WIDTH 6 | 180 | #define ICON_WIDTH 6 |
180 | 181 | ||
@@ -221,10 +222,11 @@ static void showfileline(int line, char* name, int attr, bool scroll) | |||
221 | if(scroll) { | 222 | if(scroll) { |
222 | #ifdef HAVE_LCD_BITMAP | 223 | #ifdef HAVE_LCD_BITMAP |
223 | lcd_setfont(FONT_UI); | 224 | lcd_setfont(FONT_UI); |
224 | lcd_puts_scroll_style(xpos, line, name, STYLE_INVERT); | 225 | if (global_settings.invert_cursor) |
225 | #else | 226 | lcd_puts_scroll_style(xpos, line, name, STYLE_INVERT); |
226 | lcd_puts_scroll(xpos, line, name); | 227 | else |
227 | #endif | 228 | #endif |
229 | lcd_puts_scroll(xpos, line, name); | ||
228 | } else | 230 | } else |
229 | lcd_puts(xpos, line, name); | 231 | lcd_puts(xpos, line, name); |
230 | 232 | ||
@@ -394,7 +396,7 @@ static int showdir(void) | |||
394 | if ( line_height > 8 ) | 396 | if ( line_height > 8 ) |
395 | offset = (line_height - 8) / 2; | 397 | offset = (line_height - 8) / 2; |
396 | lcd_mono_bitmap(icon, | 398 | lcd_mono_bitmap(icon, |
397 | CURSOR_X * 6, | 399 | CURSOR_X * 6 + CURSOR_WIDTH, |
398 | MARGIN_Y+(i-start)*line_height + offset, 6, 8); | 400 | MARGIN_Y+(i-start)*line_height + offset, 6, 8); |
399 | #else | 401 | #else |
400 | if (icon < 0 ) | 402 | if (icon < 0 ) |