mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 03:57:35 +00:00
Eyes: Add an option to show/hide the window frame
This works the same as in the Cube demo, and now allows enjoying the eyes without any obstructions :^) The window frame can now be disabled with the -h/--hide-window command-line option, or via toggle in the GUI.
This commit is contained in:
parent
21358d8a5f
commit
b609dd7348
2 changed files with 33 additions and 1 deletions
|
@ -18,6 +18,15 @@ class EyesWidget final : public GUI::Widget
|
|||
public:
|
||||
virtual ~EyesWidget() override = default;
|
||||
|
||||
Function<void(GUI::ContextMenuEvent&)> on_context_menu_request;
|
||||
|
||||
protected:
|
||||
virtual void context_menu_event(GUI::ContextMenuEvent& event) override
|
||||
{
|
||||
if (on_context_menu_request)
|
||||
on_context_menu_request(event);
|
||||
}
|
||||
|
||||
private:
|
||||
EyesWidget(int num_eyes, int full_rows, int extra)
|
||||
: m_full_rows(full_rows)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue