diff options
Diffstat (limited to 'src/gui/widgets/browserbox.cpp')
-rw-r--r-- | src/gui/widgets/browserbox.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/gui/widgets/browserbox.cpp b/src/gui/widgets/browserbox.cpp index d12562f1..8814a995 100644 --- a/src/gui/widgets/browserbox.cpp +++ b/src/gui/widgets/browserbox.cpp @@ -70,9 +70,7 @@ BrowserBox::BrowserBox(unsigned int mode): addMouseListener(this); } -BrowserBox::~BrowserBox() -{ -} +BrowserBox::~BrowserBox() = default; void BrowserBox::addRow(const std::string &row) { @@ -177,6 +175,11 @@ void BrowserBox::mouseMoved(gcn::MouseEvent &event) updateHoveredLink(event.getX(), event.getY()); } +void BrowserBox::mouseExited(gcn::MouseEvent &event) +{ + mHoveredLink.reset(); +} + void BrowserBox::draw(gcn::Graphics *graphics) { const gcn::ClipRectangle &cr = graphics->getCurrentClipArea(); @@ -285,7 +288,7 @@ void BrowserBox::layoutTextRow(TextRow &row, LayoutContext &context) int x = 0; // Check for separator lines - if (row.text.find("---", 0) == 0) + if (startsWith(row.text, "---")) { for (x = 0; x < getWidth(); x += context.minusWidth - 1) { |