summaryrefslogtreecommitdiff
path: root/src/gui/widgets/browserbox.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/widgets/browserbox.cpp')
-rw-r--r--src/gui/widgets/browserbox.cpp31
1 files changed, 17 insertions, 14 deletions
diff --git a/src/gui/widgets/browserbox.cpp b/src/gui/widgets/browserbox.cpp
index f0a10c77c..f6f86a42d 100644
--- a/src/gui/widgets/browserbox.cpp
+++ b/src/gui/widgets/browserbox.cpp
@@ -47,6 +47,23 @@
#include "debug.h"
+namespace
+{
+ struct MouseOverLink final
+ {
+ MouseOverLink(const int x, const int y) :
+ mX(x), mY(y)
+ { }
+
+ bool operator() (const BrowserLink &link) const
+ {
+ return (mX >= link.x1 && mX < link.x2 &&
+ mY >= link.y1 && mY < link.y2);
+ }
+ int mX, mY;
+ };
+} // namespace
+
ImageSet *BrowserBox::mEmotes = nullptr;
int BrowserBox::mInstances = 0;
@@ -409,20 +426,6 @@ void BrowserBox::clearRows()
updateHeight();
}
-struct MouseOverLink
-{
- MouseOverLink(const int x, const int y) :
- mX(x), mY(y)
- { }
-
- bool operator() (const BrowserLink &link) const
- {
- return (mX >= link.x1 && mX < link.x2 &&
- mY >= link.y1 && mY < link.y2);
- }
- int mX, mY;
-};
-
void BrowserBox::mousePressed(MouseEvent &event)
{
if (!mLinkHandler)