mirror of
https://gitee.com/zlgopen/awtk.git
synced 2024-11-30 02:58:26 +08:00
improve slider
This commit is contained in:
parent
9a43d95119
commit
1dd7f5c331
@ -284,7 +284,7 @@ static ret_t slider_on_event(widget_t* widget, event_t* e) {
|
||||
double range = slider->max - slider->min;
|
||||
|
||||
if (slider->vertical) {
|
||||
value = range * p.y / (widget->h - dr->h);
|
||||
value = range - range * p.y / (widget->h - dr->h);
|
||||
} else {
|
||||
value = range * p.x / (widget->w - dr->w);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user