diff --git a/.gitattributes b/.gitattributes index 3fdc42155..7d00e59fd 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,3 +1 @@ -lib/external/** linguist-vendored -lib/libimhex-rs/imgui-rs/** linguist-vendored -lib/libimhex-rs/imgui-sys/** linguist-vendored +lib/external/** linguist-vendored \ No newline at end of file diff --git a/lib/external/pattern_language b/lib/external/pattern_language index b2fba6296..78b4e491e 160000 --- a/lib/external/pattern_language +++ b/lib/external/pattern_language @@ -1 +1 @@ -Subproject commit b2fba629663eab215f7a9bd4f5e1e944f0c4c36e +Subproject commit 78b4e491e7c6033947e0d81e2361dc0881084e6d diff --git a/main/source/window/win_window.cpp b/main/source/window/win_window.cpp index 274e6aa04..f482872f0 100644 --- a/main/source/window/win_window.cpp +++ b/main/source/window/win_window.cpp @@ -343,6 +343,8 @@ namespace hex { void Window::drawTitleBar() { if (!ImHexApi::System::isBorderlessWindowModeEnabled()) return; + auto startX = ImGui::GetCursorPosX(); + auto buttonSize = ImVec2(g_titleBarHeight * 1.5F, g_titleBarHeight - 1); ImGui::PushStyleVar(ImGuiStyleVar_ItemSpacing, ImVec2(0, 0)); @@ -382,7 +384,7 @@ namespace hex { ImGui::PopStyleColor(5); ImGui::PopStyleVar(); - ImGui::SetCursorPosX((ImGui::GetWindowWidth() - ImGui::CalcTextSize(this->m_windowTitle.c_str()).x) / 2); + ImGui::SetCursorPosX(std::max(startX, (ImGui::GetWindowWidth() - ImGui::CalcTextSize(this->m_windowTitle.c_str()).x) / 2)); ImGui::TextUnformatted(this->m_windowTitle.c_str()); } diff --git a/main/source/window/window.cpp b/main/source/window/window.cpp index b56165423..ad77438c9 100644 --- a/main/source/window/window.cpp +++ b/main/source/window/window.cpp @@ -121,7 +121,7 @@ namespace hex { if (ImHexApi::Provider::isValid()) { auto provider = ImHexApi::Provider::get(); if (!windowTitle.empty() && provider != nullptr) { - title += " - " + windowTitle; + title += " - " + hex::limitStringLength(windowTitle, 32); if (provider->isDirty()) title += " (*)";