Skip to content

Commit

Permalink
fix: Fixed HiDPI rendering on Wayland
Browse files Browse the repository at this point in the history
  • Loading branch information
mfep committed Dec 11, 2024
1 parent f046879 commit bba6f78
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 31 deletions.
28 changes: 14 additions & 14 deletions po/hu.po
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ msgid ""
msgstr ""
"Project-Id-Version: midiconn\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-12-11 19:57+0100\n"
"POT-Creation-Date: 2024-12-11 21:49+0100\n"
"PO-Revision-Date: 2024-06-17 12:09+0200\n"
"Last-Translator: <>\n"
"Language-Team: Hungarian\n"
Expand Down Expand Up @@ -114,7 +114,7 @@ msgid "Open logfile"
msgstr "Logfájl megnyitása"

#. Translators: Menu entry to open the project's website with the browser
#: src/Application.cpp:323 src/Application.cpp:398
#: src/Application.cpp:323 src/Application.cpp:399
msgid "Visit website"
msgstr "Weboldal felkeresése"

Expand All @@ -124,72 +124,72 @@ msgid "About"
msgstr "Névjegy"

#. Translators: Welcome message in the welcome window
#: src/Application.cpp:358
#: src/Application.cpp:359
#, c-format
msgid "Welcome to %s"
msgstr "Üdvözli a %s"

#. Translators: Message in the welcome window while downloading the
#. latest version number
#: src/Application.cpp:370
#: src/Application.cpp:371
#, c-format
msgid "Fetching latest %s version number..."
msgstr "Legutóbbi %s verziószám lekérése..."

#. Translators: Message in the welcome window, when an error occurred
#. while fetching the version number from the web
#: src/Application.cpp:376
#: src/Application.cpp:377
#, c-format
msgid "Error fetching latest %s version number"
msgstr "Hiba a legutóbbi %s verziószám lekérésénél"

#. Translators: Message in the welcome window, when the downloaded
#. latest version is the same as the current application's version
#: src/Application.cpp:386
#: src/Application.cpp:387
#, c-format
msgid "Congratulations! You are using the latest version of %s"
msgstr "Gratulálunk! A %s legújabb verzióját használja"

#. Translators: Message in the welcome window, when the downloaded
#. latest version is newer than the current application's version
#: src/Application.cpp:394
#: src/Application.cpp:395
#, c-format
msgid "A new version of %s is available: %s"
msgstr "Egy új %s verzió elérhető: %s"

#. Translators: Checkbox on the welcome window
#: src/Application.cpp:409
#: src/Application.cpp:410
msgid "Show this window on application startup"
msgstr "Ablak megjelenítése indításkor"

#. Translators: Button on the welcome window to create a new empty preset
#: src/Application.cpp:414
#: src/Application.cpp:415
msgid "New preset - empty"
msgstr "Új konfiguráció - üres"

#. Translators: Button on the welcome window to create a new preset filled with all
#. available devices
#: src/Application.cpp:422
#: src/Application.cpp:423
msgid "New preset - add all MIDI devices"
msgstr "Új konfiguráció - az összes MIDI eszközzel"

#. Translators: Button on the welcome window to browse the filesystem for a preset to load
#: src/Application.cpp:429
#: src/Application.cpp:430
msgid "Browse preset"
msgstr "Konfiguráció tallózása"

#. Translators: Button on the welcome window to open the last opened preset
#: src/Application.cpp:438
#: src/Application.cpp:439
msgid "Open last preset"
msgstr "Legutóbbi konfiguráció megnyitása"

#. Translators: Button on the welcome window to show the 3rd party library licenses
#: src/Application.cpp:450
#: src/Application.cpp:451
msgid "Open source licenses"
msgstr "Licencinformációk"

#. Translators: The message on the popup window when attempting to close the program
#: src/Application.cpp:471
#: src/Application.cpp:472
msgid "Do you want to save changes?"
msgstr "Menti a módosításokat?"

Expand Down
28 changes: 14 additions & 14 deletions po/midiconn.pot
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-12-11 20:13+0100\n"
"POT-Creation-Date: 2024-12-11 21:49+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
Expand Down Expand Up @@ -115,7 +115,7 @@ msgid "Open logfile"
msgstr ""

#. Translators: Menu entry to open the project's website with the browser
#: src/Application.cpp:323 src/Application.cpp:398
#: src/Application.cpp:323 src/Application.cpp:399
msgid "Visit website"
msgstr ""

Expand All @@ -125,72 +125,72 @@ msgid "About"
msgstr ""

#. Translators: Welcome message in the welcome window
#: src/Application.cpp:358
#: src/Application.cpp:359
#, c-format
msgid "Welcome to %s"
msgstr ""

#. Translators: Message in the welcome window while downloading the
#. latest version number
#: src/Application.cpp:370
#: src/Application.cpp:371
#, c-format
msgid "Fetching latest %s version number..."
msgstr ""

#. Translators: Message in the welcome window, when an error occurred
#. while fetching the version number from the web
#: src/Application.cpp:376
#: src/Application.cpp:377
#, c-format
msgid "Error fetching latest %s version number"
msgstr ""

#. Translators: Message in the welcome window, when the downloaded
#. latest version is the same as the current application's version
#: src/Application.cpp:386
#: src/Application.cpp:387
#, c-format
msgid "Congratulations! You are using the latest version of %s"
msgstr ""

#. Translators: Message in the welcome window, when the downloaded
#. latest version is newer than the current application's version
#: src/Application.cpp:394
#: src/Application.cpp:395
#, c-format
msgid "A new version of %s is available: %s"
msgstr ""

#. Translators: Checkbox on the welcome window
#: src/Application.cpp:409
#: src/Application.cpp:410
msgid "Show this window on application startup"
msgstr ""

#. Translators: Button on the welcome window to create a new empty preset
#: src/Application.cpp:414
#: src/Application.cpp:415
msgid "New preset - empty"
msgstr ""

#. Translators: Button on the welcome window to create a new preset filled with all
#. available devices
#: src/Application.cpp:422
#: src/Application.cpp:423
msgid "New preset - add all MIDI devices"
msgstr ""

#. Translators: Button on the welcome window to browse the filesystem for a preset to load
#: src/Application.cpp:429
#: src/Application.cpp:430
msgid "Browse preset"
msgstr ""

#. Translators: Button on the welcome window to open the last opened preset
#: src/Application.cpp:438
#: src/Application.cpp:439
msgid "Open last preset"
msgstr ""

#. Translators: Button on the welcome window to show the 3rd party library licenses
#: src/Application.cpp:450
#: src/Application.cpp:451
msgid "Open source licenses"
msgstr ""

#. Translators: The message on the popup window when attempting to close the program
#: src/Application.cpp:471
#: src/Application.cpp:472
msgid "Do you want to save changes?"
msgstr ""

Expand Down
3 changes: 2 additions & 1 deletion src/Application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,8 @@ void Application::render_welcome_window()
ImGui::SetNextWindowSizeConstraints({600 * scale, 0}, {600 * scale, 400 * scale});
if (ImGui::BeginPopup("Welcome", ImGuiWindowFlags_AlwaysAutoResize))
{
ImGui::Image(m_logo_texture.m_texture, ImVec2{96 * scale, 96 * scale});
ImGui::Image(reinterpret_cast<ImTextureID>(m_logo_texture.m_texture),
ImVec2{96 * scale, 96 * scale});
ImGui::SameLine();
ImGui::BeginGroup();
// Translators: Welcome message in the welcome window
Expand Down
3 changes: 1 addition & 2 deletions src/NodeEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -262,8 +262,7 @@ void NodeEditor::renderHelpText()

void NodeEditor::handleDelete()
{
if (ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_Delete)) ||
ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_Backspace)))
if (ImGui::IsKeyPressed(ImGuiKey_Delete) || ImGui::IsKeyPressed(ImGuiKey_Backspace))
{
std::vector<int> selected_ids;
selected_ids.resize(ImNodes::NumSelectedNodes());
Expand Down
2 changes: 2 additions & 0 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,8 @@ MC_MAIN

// Rendering
ImGui::Render();
SDL_RenderSetScale(
renderer, io.DisplayFramebufferScale.x, io.DisplayFramebufferScale.y);
SDL_RenderClear(renderer);
ImGui_ImplSDLRenderer2_RenderDrawData(ImGui::GetDrawData(), renderer);
SDL_RenderPresent(renderer);
Expand Down

0 comments on commit bba6f78

Please sign in to comment.