feat: desktop - use MTK menu for desktop right-click menu
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
#include "gui/svg.hpp"
|
||||
#include "gui/window.hpp"
|
||||
#include "gui/widgets.hpp"
|
||||
#include "gui/mtk/widgets.hpp"
|
||||
#include "gui/terminal.hpp"
|
||||
#include <Api/Syscall.hpp>
|
||||
|
||||
@@ -172,8 +173,8 @@ struct DesktopState {
|
||||
int desktop_item_count;
|
||||
int desktop_item_capacity;
|
||||
|
||||
bool ctx_menu_open;
|
||||
int ctx_menu_x, ctx_menu_y;
|
||||
// Right-click menu on the desktop background (MTK context menu).
|
||||
mtk::ContextMenuState ctx_menu;
|
||||
|
||||
bool net_popup_open;
|
||||
montauk::abi::NetCfg cached_net_cfg;
|
||||
|
||||
@@ -210,8 +210,8 @@ inline void draw_context_menu(Canvas& c,
|
||||
|
||||
Rect menu = context_menu_rect(state, item_count, c.w, c.h,
|
||||
menu_w, item_h);
|
||||
c.fill_rect(menu.x + 2, menu.y + 2, menu.w, menu.h,
|
||||
Color::from_rgb(0x80, 0x80, 0x80));
|
||||
c.fill_rounded_rect(menu.x + 2, menu.y + 2, menu.w, menu.h, 4,
|
||||
Color::from_rgb(0x80, 0x80, 0x80));
|
||||
c.fill_rounded_rect(menu.x, menu.y, menu.w, menu.h, 4,
|
||||
colors::MENU_BG);
|
||||
c.rect(menu.x, menu.y, menu.w, menu.h, theme.border);
|
||||
|
||||
Reference in New Issue
Block a user