Skip to content

Commit 060f393

Browse files
author
alcomposer
committed
Stop small icon button class from being clickable on the extreme edges
1 parent 00bf74d commit 060f393

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

Source/Components/Buttons.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,14 @@ class ToolbarRadioButton final : public TextButton {
121121
class SmallIconButton : public TextButton {
122122
using TextButton::TextButton;
123123

124+
bool hitTest(int x, int y) override
125+
{
126+
if (getLocalBounds().reduced(2).contains(x, y))
127+
return true;
128+
129+
return false;
130+
}
131+
124132
void mouseEnter(MouseEvent const& e) override
125133
{
126134
repaint();

0 commit comments

Comments
 (0)