1
0
mirror of synced 2024-11-24 15:50:16 +01:00

fix: Build and drawing of title bar buttons on macOS

This commit is contained in:
WerWolv 2024-06-08 00:28:17 +02:00
parent 72a3a1acab
commit bf82690c80

View File

@ -128,7 +128,7 @@ namespace hex::plugin::builtin {
} }
void drawTitleBar() { void drawTitleBar() {
auto titleBarHeight = ImGui::GetCurrentWindowRead()->MenuBarHeight; auto titleBarHeight = ImGui::GetCurrentWindowRead()->MenuBarHeight * 0.7;
auto buttonSize = ImVec2(titleBarHeight * 1.5F, titleBarHeight - 1); auto buttonSize = ImVec2(titleBarHeight * 1.5F, titleBarHeight - 1);
ImGui::PushStyleVar(ImGuiStyleVar_ItemSpacing, ImVec2(0, 0)); ImGui::PushStyleVar(ImGuiStyleVar_ItemSpacing, ImVec2(0, 0));
@ -395,7 +395,7 @@ namespace hex::plugin::builtin {
#if defined(OS_MACOS) #if defined(OS_MACOS)
if (ImHexApi::System::isBorderlessWindowModeEnabled()) { if (ImHexApi::System::isBorderlessWindowModeEnabled()) {
const auto windowSize = ImHexApi::System::getMainWindowSize(); const auto windowSize = ImHexApi::System::getMainWindowSize();
const auto menuUnderlaySize = ImVec2(windowSize.x, ImGui::GetCurrentWindowRead()->MenuBarHeight() * 1.5F); const auto menuUnderlaySize = ImVec2(windowSize.x, ImGui::GetCurrentWindowRead()->MenuBarHeight);
ImGui::SetCursorPos(ImVec2()); ImGui::SetCursorPos(ImVec2());