Fix building with -Werror, hopefully.

This commit is contained in:
Zachary Hall 2024-04-10 13:25:18 -07:00
parent b84fec3175
commit b9f624dd71
2 changed files with 6 additions and 6 deletions

View file

@ -151,4 +151,4 @@ install(TARGETS looper ${EXTRA_LIBS})
install(FILES assets/icon.svg DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor/scalable/apps/) install(FILES assets/icon.svg DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor/scalable/apps/)
install(FILES assets/com.complecwaft.Looper.desktop DESTINATION ${CMAKE_INSTALL_DATADIR}/applications) install(FILES assets/com.complecwaft.Looper.desktop DESTINATION ${CMAKE_INSTALL_DATADIR}/applications)
install(FILES assets/com.complecwaft.Looper.metainfo.xml DESTINATION ${CMAKE_INSTALL_DATADIR}/metainfo) install(FILES assets/com.complecwaft.Looper.metainfo.xml DESTINATION ${CMAKE_INSTALL_DATADIR}/metainfo)
install(DIRECTORY assets/translations/ TYPE LOCALE PATTERN "*" EXCLUDE PATTERN "looper.pot") install(DIRECTORY assets/translations/ TYPE LOCALE PATTERN "*" EXCLUDE PATTERN "looper.pot")

View file

@ -252,10 +252,10 @@ void MainLoop::GuiFunction() {
} }
} }
static string filter = ""; static string filter = "";
ImGui::Text(_TR_CTX("Preference | Theme selector | Filter label", "Filter:")); ImGui::SameLine(); ImGui::TextUnformatted(_TR_CTX("Preference | Theme selector | Filter label", "Filter:")); ImGui::SameLine();
ImGui::SetNextItemWidth(ImGui::GetWindowWidth() - ImGui::GetCursorPosX() - ImGui::GetStyle().WindowPadding.x); ImGui::SetNextItemWidth(ImGui::GetWindowWidth() - ImGui::GetCursorPosX() - ImGui::GetStyle().WindowPadding.x);
ImGui::InputText("##FilterInput", &filter); ImGui::InputText("##FilterInput", &filter);
ImGui::Text(_TR_CTX("Preferences | Theme selector | Selector label", "Select a theme...")); ImGui::TextUnformatted(_TR_CTX("Preferences | Theme selector | Selector label", "Select a theme..."));
ImVec2 ChildSize = ImVec2(ImGui::GetWindowWidth() - (ImGui::GetStyle().WindowPadding.x * 2.0f), -ImGui::GetFrameHeightWithSpacing()); ImVec2 ChildSize = ImVec2(ImGui::GetWindowWidth() - (ImGui::GetStyle().WindowPadding.x * 2.0f), -ImGui::GetFrameHeightWithSpacing());
if (ImGui::BeginChildFrame(ImGui::GetID("##ThemesContainer"), ChildSize)) { if (ImGui::BeginChildFrame(ImGui::GetID("##ThemesContainer"), ChildSize)) {
ImVec2 TableSize = ImVec2(0, 0); ImVec2 TableSize = ImVec2(0, 0);
@ -303,11 +303,11 @@ void MainLoop::GuiFunction() {
ImGui::PushFont(title); ImGui::PushFont(title);
static const string APP_NAME_STR = _TR_CTX("Application name.", "Looper"); static const string APP_NAME_STR = _TR_CTX("Application name.", "Looper");
ImGui::SetCursorPosX((ImGui::GetWindowWidth() - ImGui::GetFont()->CalcTextSizeA(ImGui::GetFontSize(), FLT_MAX, 0.0f, APP_NAME_STR.c_str()).x) / 2.0f); ImGui::SetCursorPosX((ImGui::GetWindowWidth() - ImGui::GetFont()->CalcTextSizeA(ImGui::GetFontSize(), FLT_MAX, 0.0f, APP_NAME_STR.c_str()).x) / 2.0f);
ImGui::Text(APP_NAME_STR.c_str()); ImGui::TextUnformatted(APP_NAME_STR.c_str());
ImGui::PopFont(); ImGui::PopFont();
static const string VER_STRING = _TR_CTX("Version string format specifier", "Version ") + string(TAG) + _TRS_CTX("Suffix to the version string in the about window, if needed", " "); static const string VER_STRING = _TR_CTX("Version string format specifier", "Version ") + string(TAG) + _TRS_CTX("Suffix to the version string in the about window, if needed", " ");
ImGui::SetCursorPosX((ImGui::GetWindowWidth() - ImGui::GetFont()->CalcTextSizeA(ImGui::GetFontSize(), FLT_MAX, 0.0f, VER_STRING.c_str()).x) / 2.0f); ImGui::SetCursorPosX((ImGui::GetWindowWidth() - ImGui::GetFont()->CalcTextSizeA(ImGui::GetFontSize(), FLT_MAX, 0.0f, VER_STRING.c_str()).x) / 2.0f);
ImGui::Text(VER_STRING.c_str()); ImGui::TextUnformatted(VER_STRING.c_str());
ImGui::NewLine(); ImGui::NewLine();
auto &license_data = get_license_data(); auto &license_data = get_license_data();
// Left // Left
@ -461,4 +461,4 @@ void ImGuiUIBackend::add_licenses() {
LOAD_LICENSE(libportal, lgpl_3_0); LOAD_LICENSE(libportal, lgpl_3_0);
license_data.insert(libportal); license_data.insert(libportal);
#endif #endif
} }