mirror of
https://github.com/RGBCube/serenity
synced 2025-06-01 07:38:10 +00:00
Base+WindowServer: Add icon to window menu move action
This commit is contained in:
parent
10e473bf26
commit
983c784a80
2 changed files with 9 additions and 0 deletions
|
@ -74,6 +74,14 @@ static Gfx::Bitmap& pin_icon()
|
|||
return *s_icon;
|
||||
}
|
||||
|
||||
static Gfx::Bitmap& move_icon()
|
||||
{
|
||||
static RefPtr<Gfx::Bitmap> s_icon;
|
||||
if (!s_icon)
|
||||
s_icon = Gfx::Bitmap::try_load_from_file("/res/icons/16x16/move.png").release_value_but_fixme_should_propagate_errors();
|
||||
return *s_icon;
|
||||
}
|
||||
|
||||
Window::Window(Core::Object& parent, WindowType type)
|
||||
: Core::Object(&parent)
|
||||
, m_type(type)
|
||||
|
@ -795,6 +803,7 @@ void Window::ensure_window_menu()
|
|||
|
||||
auto move_item = make<MenuItem>(*m_window_menu, (unsigned)WindowMenuAction::Move, "&Move");
|
||||
m_window_menu_move_item = move_item.ptr();
|
||||
m_window_menu_move_item->set_icon(&move_icon());
|
||||
m_window_menu->add_item(move(move_item));
|
||||
|
||||
m_window_menu->add_item(make<MenuItem>(*m_window_menu, MenuItem::Type::Separator));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue