summaryrefslogtreecommitdiff
path: root/apps/gui/skin_engine
diff options
context:
space:
mode:
Diffstat (limited to 'apps/gui/skin_engine')
-rw-r--r--apps/gui/skin_engine/skin_touchsupport.c21
1 files changed, 15 insertions, 6 deletions
diff --git a/apps/gui/skin_engine/skin_touchsupport.c b/apps/gui/skin_engine/skin_touchsupport.c
index 7a03e83c36..b92fd1e83e 100644
--- a/apps/gui/skin_engine/skin_touchsupport.c
+++ b/apps/gui/skin_engine/skin_touchsupport.c
@@ -109,12 +109,21 @@ int skin_get_touchaction(struct wps_data *data, int* edge_offset,
109 { 109 {
110 struct progressbar *bar = 110 struct progressbar *bar =
111 SKINOFFSETTOPTR(skin_buffer, r->bar); 111 SKINOFFSETTOPTR(skin_buffer, r->bar);
112 if(r->width > r->height) 112 if(r->width > r->height) {
113 *edge_offset = vx*100/r->width; 113 if(r->width > 1)
114 else /* vertical bars are bottom-up by default */ 114 *edge_offset = vx*1000/(r->width - 1);
115 *edge_offset = 100 - vy*100/r->height; 115 else
116 *edge_offset = 0;
117 } else {
118 /* vertical bars are bottom-up by default */
119 if(r->height > 1)
120 *edge_offset = 1000 - vy*1000/(r->height - 1);
121 else
122 *edge_offset = 0;
123 }
124
116 if (r->reverse_bar || (bar && bar->invert_fill_direction)) 125 if (r->reverse_bar || (bar && bar->invert_fill_direction))
117 *edge_offset = 100 - *edge_offset; 126 *edge_offset = 1000 - *edge_offset;
118 } 127 }
119 temp = r; 128 temp = r;
120 returncode = r->action; 129 returncode = r->action;
@@ -294,7 +303,7 @@ int skin_get_touchaction(struct wps_data *data, int* edge_offset,
294 { 303 {
295 int val, count; 304 int val, count;
296 get_setting_info_for_bar(bar->setting_id, &count, &val); 305 get_setting_info_for_bar(bar->setting_id, &count, &val);
297 val = *edge_offset * count / 100; 306 val = *edge_offset * count / 1000;
298 update_setting_value_from_touch(bar->setting_id, val); 307 update_setting_value_from_touch(bar->setting_id, val);
299 } 308 }
300 } 309 }