feat: desktop - use MTK menu for desktop right-click menu
This commit is contained in:
@@ -8,8 +8,35 @@
|
||||
|
||||
#include "apps/apps_common.hpp"
|
||||
#include "wallpaper.hpp"
|
||||
#include <gui/mtk.hpp>
|
||||
#include <montauk/toml.h>
|
||||
|
||||
// ============================================================================
|
||||
// Desktop Background Context Menu
|
||||
// ============================================================================
|
||||
|
||||
enum DesktopCtxItem : int {
|
||||
DESKTOP_CTX_TERMINAL = 0,
|
||||
DESKTOP_CTX_FILES,
|
||||
DESKTOP_CTX_SETTINGS,
|
||||
DESKTOP_CTX_SLEEP,
|
||||
DESKTOP_CTX_REBOOT,
|
||||
DESKTOP_CTX_SHUTDOWN,
|
||||
DESKTOP_CTX_COUNT,
|
||||
};
|
||||
|
||||
static constexpr int DESKTOP_CTX_MENU_W = 160;
|
||||
static constexpr int DESKTOP_CTX_ITEM_H = 28;
|
||||
|
||||
inline void desktop_ctx_menu_items(gui::mtk::ContextMenuItem items[DESKTOP_CTX_COUNT]) {
|
||||
items[DESKTOP_CTX_TERMINAL] = {"Terminal", DESKTOP_CTX_TERMINAL, true};
|
||||
items[DESKTOP_CTX_FILES] = {"Files", DESKTOP_CTX_FILES, true};
|
||||
items[DESKTOP_CTX_SETTINGS] = {"Settings", DESKTOP_CTX_SETTINGS, true};
|
||||
items[DESKTOP_CTX_SLEEP] = {"Sleep", DESKTOP_CTX_SLEEP, true};
|
||||
items[DESKTOP_CTX_REBOOT] = {"Reboot", DESKTOP_CTX_REBOOT, true};
|
||||
items[DESKTOP_CTX_SHUTDOWN] = {"Shutdown", DESKTOP_CTX_SHUTDOWN, true};
|
||||
}
|
||||
|
||||
// ============================================================================
|
||||
// App Menu Data (dynamic — built at startup from embedded + external apps)
|
||||
// ============================================================================
|
||||
|
||||
Reference in New Issue
Block a user