mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-11-11 04:23:29 -08:00
Restore the native split host button on non-macOS styles
The merged quick-host control composed a QPushButton and a separate autoRaise arrow QToolButton, which Fusion draws as two adjacent controls. Version one of the quick-host branch used a single QToolButton with MenuButtonPopup, which every style draws as one native split button. Use that split button on every style that can draw one, and keep the plain primary + settings button pair as the native macOS fallback.
This commit is contained in:
parent
59db732abd
commit
83e451959f
2 changed files with 41 additions and 55 deletions
|
|
@ -164,10 +164,9 @@ private:
|
|||
|
||||
QPushButton *filterButton; /**< Button to open the filter dialog. */
|
||||
QPushButton *clearFilterButton; /**< Button to clear active filters. */
|
||||
QPushButton *hostGameButton = nullptr; /**< Host button, in the same family as the join buttons. */
|
||||
QToolButton *hostGameSplitButton = nullptr; /**< Split host button, on every style that can draw one. */
|
||||
QPushButton *hostGameButton = nullptr; /**< Primary quick-host button, on the native macOS style only. */
|
||||
QPushButton *hostGameSettingsButton = nullptr; /**< Opens the host form; a sibling button on macOS. */
|
||||
QToolButton *hostGameMenuButton = nullptr; /**< Split arrow that opens the host menu (non-macOS styles only). */
|
||||
QWidget *hostGameButtonWidget = nullptr; /**< Container that keeps the split button and its arrow together. */
|
||||
QMenu *hostGameMenu = nullptr; /**< Menu behind the split arrow (non-macOS styles only). */
|
||||
QAction *hostGameAction = nullptr; /**< Quick-host action, carrying the keyboard shortcut. */
|
||||
QAction *gameSettingsAction = nullptr; /**< Opens the host form with the current settings. */
|
||||
|
|
@ -193,9 +192,9 @@ private:
|
|||
/**
|
||||
* @brief Rebuilds the host control for the active style.
|
||||
*
|
||||
* The primary button always quick-hosts. Every other style gets the split button,
|
||||
* whose arrow opens the menu; the native macOS style has no split control, so it
|
||||
* gets a plain sibling button for the secondary action instead.
|
||||
* The primary button always quick-hosts. Every style that can draw a split control
|
||||
* gets one, whose arrow opens the menu; the native macOS style has no split control,
|
||||
* so it gets a plain sibling button for the secondary action instead.
|
||||
*/
|
||||
void applyHostGameStyle();
|
||||
/** @brief Marks a quick-host command as in flight or finished, then updates the host controls. */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue