refactor: Streamline entire view system

This commit is contained in:
WerWolv
2023-11-21 13:47:50 +01:00
parent fc23efdb25
commit c89a870fe9
57 changed files with 2643 additions and 2644 deletions

View File

@@ -5,7 +5,7 @@
namespace hex::plugin::builtin {
ViewCommandPalette::ViewCommandPalette() : View("hex.builtin.view.command_palette.name") {
ViewCommandPalette::ViewCommandPalette() : View::Special("hex.builtin.view.command_palette.name") {
// Add global shortcut to open the command palette
ShortcutManager::addGlobalShortcut(CTRLCMD + SHIFT + Keys::P, "hex.builtin.view.command_palette.name", [this] {
EventManager::post<RequestOpenPopup>("hex.builtin.view.command_palette.name"_lang);
@@ -20,7 +20,7 @@ namespace hex::plugin::builtin {
});
}
void ViewCommandPalette::drawContent() {
void ViewCommandPalette::drawAlwaysVisibleContent() {
// If the command palette is hidden, don't draw it
if (!this->m_commandPaletteOpen) return;