Skip to content

Commit c896b93

Browse files
committed
Fix various missing horizontal scroll handlers causing bleed through to widgets below
1 parent bdac91b commit c896b93

16 files changed

Lines changed: 73 additions & 1 deletion

indra/llui/llaccordionctrl.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -545,6 +545,15 @@ bool LLAccordionCtrl::handleScrollWheel(S32 x, S32 y, LLScrollDelta delta)
545545
return false;
546546
}
547547

548+
bool LLAccordionCtrl::handleScrollHWheel(S32 x, S32 y, LLScrollDelta delta)
549+
{
550+
if (LLPanel::handleScrollHWheel(x, y, delta))
551+
return true;
552+
if (mScrollbar->getVisible() && mScrollbar->handleScrollHWheel(0, 0, delta))
553+
return true;
554+
return false;
555+
}
556+
548557
bool LLAccordionCtrl::handleKeyHere(KEY key, MASK mask)
549558
{
550559
if (mScrollbar->getVisible() && mScrollbar->handleKeyHere(key, mask))

indra/llui/llaccordionctrl.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ class LLAccordionCtrl: public LLPanel
9292

9393
virtual bool handleRightMouseDown ( S32 x, S32 y, MASK mask);
9494
virtual bool handleScrollWheel ( S32 x, S32 y, LLScrollDelta delta );
95+
virtual bool handleScrollHWheel ( S32 x, S32 y, LLScrollDelta delta );
9596
virtual bool handleKeyHere (KEY key, MASK mask);
9697
virtual bool handleDragAndDrop (S32 x, S32 y, MASK mask, bool drop,
9798
EDragAndDropType cargo_type,

indra/llui/llaccordionctrltab.cpp

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1164,3 +1164,18 @@ bool LLAccordionCtrlTab::handleScrollWheel(S32 x, S32 y, LLScrollDelta delta)
11641164

11651165
return false;
11661166
}
1167+
1168+
bool LLAccordionCtrlTab::handleScrollHWheel(S32 x, S32 y, LLScrollDelta delta)
1169+
{
1170+
if (LLUICtrl::handleScrollHWheel(x, y, delta))
1171+
{
1172+
return true;
1173+
}
1174+
1175+
if (mScrollbar && mScrollbar->getVisible() && mScrollbar->handleScrollHWheel(0, 0, delta))
1176+
{
1177+
return true;
1178+
}
1179+
1180+
return false;
1181+
}

indra/llui/llaccordionctrltab.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ class LLAccordionCtrlTab : public LLUICtrl
169169

170170
virtual bool handleToolTip(S32 x, S32 y, MASK mask);
171171
virtual bool handleScrollWheel( S32 x, S32 y, LLScrollDelta delta );
172-
172+
virtual bool handleScrollHWheel(S32 x, S32 y, LLScrollDelta delta);
173173

174174
virtual bool addChild(LLView* child, S32 tab_group = 0 );
175175

indra/llui/llfloater.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1786,6 +1786,12 @@ bool LLFloater::handleScrollWheel(S32 x, S32 y, LLScrollDelta delta)
17861786
return true;//always
17871787
}
17881788

1789+
bool LLFloater::handleScrollHWheel(S32 x, S32 y, LLScrollDelta delta)
1790+
{
1791+
LLPanel::handleScrollHWheel(x, y, delta);
1792+
return true; // always
1793+
}
1794+
17891795
// virtual
17901796
bool LLFloater::handleMouseUp(S32 x, S32 y, MASK mask)
17911797
{

indra/llui/llfloater.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,7 @@ class LLFloater : public LLPanel, public LLInstanceTracker<LLFloater>
330330
virtual bool handleMiddleMouseDown(S32 x, S32 y, MASK mask);
331331

332332
virtual bool handleScrollWheel(S32 x, S32 y, LLScrollDelta delta);
333+
virtual bool handleScrollHWheel(S32 x, S32 y, LLScrollDelta delta);
333334

334335
virtual void draw();
335336
virtual void drawShadow(LLPanel* panel);

indra/llui/llmodaldialog.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,12 @@ bool LLModalDialog::handleScrollWheel(S32 x, S32 y, LLScrollDelta delta)
249249
return true;
250250
}
251251

252+
bool LLModalDialog::handleScrollHWheel(S32 x, S32 y, LLScrollDelta delta)
253+
{
254+
childrenHandleScrollHWheel(x, y, delta);
255+
return true;
256+
}
257+
252258
bool LLModalDialog::handleDoubleClick(S32 x, S32 y, MASK mask)
253259
{
254260
if (!LLFloater::handleDoubleClick(x, y, mask))

indra/llui/llmodaldialog.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ class LLModalDialog : public LLFloater
5353
/*virtual*/ bool handleMouseUp(S32 x, S32 y, MASK mask);
5454
/*virtual*/ bool handleHover(S32 x, S32 y, MASK mask);
5555
/*virtual*/ bool handleScrollWheel(S32 x, S32 y, LLScrollDelta delta);
56+
/*virtual*/ bool handleScrollHWheel(S32 x, S32 y, LLScrollDelta delta);
5657
/*virtual*/ bool handleDoubleClick(S32 x, S32 y, MASK mask);
5758
/*virtual*/ bool handleRightMouseDown(S32 x, S32 y, MASK mask);
5859
/*virtual*/ bool handleKeyHere(KEY key, MASK mask );

indra/llui/lltextbase.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1480,6 +1480,18 @@ bool LLTextBase::handleScrollWheel(S32 x, S32 y, LLScrollDelta delta)
14801480
return LLUICtrl::handleScrollWheel(x, y, delta);
14811481
}
14821482

1483+
// virtual
1484+
bool LLTextBase::handleScrollHWheel(S32 x, S32 y, LLScrollDelta delta)
1485+
{
1486+
LLTextSegmentPtr cur_segment = getSegmentAtLocalPos(x, y);
1487+
if (cur_segment && cur_segment->handleScrollHWheel(x, y, delta))
1488+
{
1489+
return true;
1490+
}
1491+
1492+
return LLUICtrl::handleScrollHWheel(x, y, delta);
1493+
}
1494+
14831495
//virtual
14841496
bool LLTextBase::handleToolTip(S32 x, S32 y, MASK mask)
14851497
{

indra/llui/lltextbase.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -392,6 +392,7 @@ class LLTextBase
392392
/*virtual*/ bool handleDoubleClick(S32 x, S32 y, MASK mask) override;
393393
/*virtual*/ bool handleHover(S32 x, S32 y, MASK mask) override;
394394
/*virtual*/ bool handleScrollWheel(S32 x, S32 y, LLScrollDelta delta) override;
395+
/*virtual*/ bool handleScrollHWheel(S32 x, S32 y, LLScrollDelta delta) override;
395396
/*virtual*/ bool handleToolTip(S32 x, S32 y, MASK mask) override;
396397

397398
// LLView interface

0 commit comments

Comments
 (0)