1
0
mirror of synced 2025-01-22 11:33:46 +01:00

impr: Make icon context menu use MenuItemEx for its icons

This commit is contained in:
WerWolv 2025-01-20 21:24:49 +01:00
parent 07e29f2030
commit 721de39dbb

View File

@ -399,18 +399,18 @@ namespace hex::plugin::builtin {
bool maximized = glfwGetWindowAttrib(window, GLFW_MAXIMIZED);
ImGui::BeginDisabled(!maximized);
if (ImGui::MenuItem(ICON_VS_CHROME_RESTORE " Restore")) glfwRestoreWindow(window);
if (ImGui::MenuItemEx("Restore", ICON_VS_CHROME_RESTORE)) glfwRestoreWindow(window);
ImGui::EndDisabled();
if (ImGui::MenuItem(ICON_VS_CHROME_MINIMIZE " Minimize")) glfwIconifyWindow(window);
if (ImGui::MenuItemEx("Minimize", ICON_VS_CHROME_MINIMIZE)) glfwIconifyWindow(window);
ImGui::BeginDisabled(maximized);
if (ImGui::MenuItem(ICON_VS_CHROME_MAXIMIZE " Maximize")) glfwMaximizeWindow(window);
if (ImGui::MenuItemEx("Maximize", ICON_VS_CHROME_MAXIMIZE)) glfwMaximizeWindow(window);
ImGui::EndDisabled();
ImGui::Separator();
if (ImGui::MenuItem(ICON_VS_CHROME_CLOSE " Close")) ImHexApi::System::closeImHex();
if (ImGui::MenuItemEx("Close", ICON_VS_CHROME_CLOSE)) ImHexApi::System::closeImHex();
ImGui::EndPopup();
}