MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / mouseDoubleClickEvent

Method mouseDoubleClickEvent

app/src/Platform/CSD.cpp:720–738  ·  view source on GitHub ↗

* @brief Toggles the window maximized state on double-click. */

Source from the content-addressed store, hash-verified

718 * @brief Toggles the window maximized state on double-click.
719 */
720void Titlebar::mouseDoubleClickEvent(QMouseEvent* event)
721{
722 if (buttonAt(event->position()) == Button::None && window()) {
723 m_dragging = false;
724 m_pressedButton = Button::None;
725 m_hoveredButton = Button::None;
726
727 if (shouldShowButton(Button::Maximize)) {
728 if (isMaximized())
729 window()->showNormal();
730 else
731 window()->showMaximized();
732
733 update();
734 }
735 }
736
737 event->accept();
738}
739
740/**
741 * @brief Handles hover move events to update button hover states.

Callers

nothing calls this directly

Calls 2

updateFunction · 0.85
acceptMethod · 0.80

Tested by

no test coverage detected