summaryrefslogtreecommitdiff
path: root/src/gui/widgets
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-08-25 02:44:09 +0300
committerAndrei Karas <akaras@inbox.ru>2017-08-25 02:44:09 +0300
commit82e3927dd6a1e7c035cda8c88a1287834367b95f (patch)
treedc97d094853bbeeabe74e696eca8238199d03258 /src/gui/widgets
parent07011b04bb619663d41ea0cc2bb9960157c3b846 (diff)
downloadmv-82e3927dd6a1e7c035cda8c88a1287834367b95f.tar.gz
mv-82e3927dd6a1e7c035cda8c88a1287834367b95f.tar.bz2
mv-82e3927dd6a1e7c035cda8c88a1287834367b95f.tar.xz
mv-82e3927dd6a1e7c035cda8c88a1287834367b95f.zip
Fix selection elements in extendedlistbox is padding > 0.
Diffstat (limited to 'src/gui/widgets')
-rw-r--r--src/gui/widgets/extendedlistbox.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/widgets/extendedlistbox.cpp b/src/gui/widgets/extendedlistbox.cpp
index 01967712c..271160726 100644
--- a/src/gui/widgets/extendedlistbox.cpp
+++ b/src/gui/widgets/extendedlistbox.cpp
@@ -240,7 +240,7 @@ int ExtendedListBox::getSelectionByMouse(const int y) const
for (size_t f = 0; f < itemsSz; f ++)
{
const ExtendedListBoxItem &item = mListItems[f];
- const int y2 = item.y;
+ const int y2 = item.y + mPadding;
if (y2 <= y && y2 + height > y)
return item.row;
}
@@ -249,7 +249,7 @@ int ExtendedListBox::getSelectionByMouse(const int y) const
for (size_t f = 0; f < selSz; f ++)
{
const ExtendedListBoxItem &item = mSelectedItems[f];
- const int y2 = item.y;
+ const int y2 = item.y + mPadding;
if (y2 <= y && y2 + height > y)
return item.row;
}