mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-19 20:38:08 +01:00
fixed bug in popupbutton scrolling
This commit is contained in:
@@ -575,8 +575,8 @@ autoScroll(void *data)
|
|||||||
int dy = 0;
|
int dy = 0;
|
||||||
|
|
||||||
|
|
||||||
if (bPtr->scrollStartY >= scrHeight-1
|
if (bPtr->scrollStartY > scrHeight-1
|
||||||
&& bPtr->menuView->pos.y+bPtr->menuView->size.height >= scrHeight-1) {
|
&& bPtr->menuView->pos.y+bPtr->menuView->size.height > scrHeight-1) {
|
||||||
repeat = 1;
|
repeat = 1;
|
||||||
|
|
||||||
if (bPtr->menuView->pos.y+bPtr->menuView->size.height-5
|
if (bPtr->menuView->pos.y+bPtr->menuView->size.height-5
|
||||||
@@ -605,6 +605,9 @@ autoScroll(void *data)
|
|||||||
bPtr->highlightedItem = (bPtr->scrollStartY - bPtr->menuView->pos.y)
|
bPtr->highlightedItem = (bPtr->scrollStartY - bPtr->menuView->pos.y)
|
||||||
/ bPtr->view->size.height;
|
/ bPtr->view->size.height;
|
||||||
|
|
||||||
|
if (bPtr->highlightedItem >= WMGetBagItemCount(bPtr->items))
|
||||||
|
bPtr->highlightedItem = WMGetBagItemCount(bPtr->items)-1;
|
||||||
|
|
||||||
if (oldItem!=bPtr->highlightedItem) {
|
if (oldItem!=bPtr->highlightedItem) {
|
||||||
WMMenuItem *item =
|
WMMenuItem *item =
|
||||||
WMGetPopUpButtonMenuItem(bPtr, bPtr->highlightedItem);
|
WMGetPopUpButtonMenuItem(bPtr, bPtr->highlightedItem);
|
||||||
|
|||||||
Reference in New Issue
Block a user