| 223 | } |
| 224 | |
| 225 | void ButtonWidget::setPressed(bool pressed) { |
| 226 | if (m_pressed != pressed) { |
| 227 | // Button action is triggered when the button is released after being pressed |
| 228 | if (m_pressed) { |
| 229 | check(); |
| 230 | if (m_callback) { |
| 231 | auto unlocker = Input::singleton().unlockClipboard(); |
| 232 | m_callback(this); |
| 233 | } |
| 234 | } |
| 235 | m_pressed = pressed; |
| 236 | } |
| 237 | } |
| 238 | |
| 239 | bool ButtonWidget::isCheckable() const { |
| 240 | return m_checkable; |
nothing calls this directly
no test coverage detected