Skip to content

Commit

Permalink
Stop small icon button class from being clickable on the extreme edges
Browse files Browse the repository at this point in the history
  • Loading branch information
alcomposer committed Dec 25, 2024
1 parent 00bf74d commit 060f393
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Source/Components/Buttons.h
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,14 @@ class ToolbarRadioButton final : public TextButton {
class SmallIconButton : public TextButton {
using TextButton::TextButton;

bool hitTest(int x, int y) override
{
if (getLocalBounds().reduced(2).contains(x, y))
return true;

return false;
}

void mouseEnter(MouseEvent const& e) override
{
repaint();
Expand Down

0 comments on commit 060f393

Please sign in to comment.