diff --git a/include/mainwindow.hxx b/include/mainwindow.hxx index 03923664..47f7e207 100644 --- a/include/mainwindow.hxx +++ b/include/mainwindow.hxx @@ -5,6 +5,7 @@ #include #include #include +#include #include struct Star diff --git a/src/app.cxx b/src/app.cxx index 29914a09..a6dd7d20 100644 --- a/src/app.cxx +++ b/src/app.cxx @@ -120,11 +120,13 @@ int imgui_main(int argc, char* argv[]) ImFontConfig config; config.MergeMode = true; config.GlyphMinAdvanceX = small_size; + config.GlyphOffset.y = small_size / 4; io.Fonts->AddFontFromMemoryCompressedTTF(MaterialIcons_compressed_data, MaterialIcons_compressed_size, small_size, &config, icon_ranges); config.GlyphMinAdvanceX = big_size; + config.GlyphOffset.y = big_size / 4; big_font = io.Fonts->AddFontFromMemoryCompressedTTF(CourierPrime_compressed_data, CourierPrime_compressed_size, big_size); io.Fonts->AddFontFromMemoryCompressedTTF(MaterialIcons_compressed_data, @@ -350,10 +352,11 @@ void Settings::ReinitCoresFrontend() int widget_id = 0; for (const auto& [category, widget_list] : widgets) { - if (category != "#__root__") + std::string category_string = category; + if (category_string != "#__root__") { - core_functions.push_back([category]() { - ImGui::Text("%s", category.c_str()); + core_functions.push_back([category_string]() { + ImGui::Text("%s", category_string.c_str()); ImGui::Separator(); ImGui::Indent(); }); diff --git a/src/mainwindow.cxx b/src/mainwindow.cxx index 1595d24b..a9c43b29 100644 --- a/src/mainwindow.cxx +++ b/src/mainwindow.cxx @@ -260,6 +260,8 @@ void MainWindow::draw_about() {} void MainWindow::draw_settings() { ImGui::Text(ICON_MD_SETTINGS " Settings"); + ImGui::BeginChild("##settings", ImVec2(0, 0), ImGuiChildFlags_Border, + ImGuiWindowFlags_NoScrollbar); if (ImGui::Checkbox("Enable fancy GUI", &fancy_gui)) { Settings::Set("fancy_gui", fancy_gui ? "true" : "false"); @@ -301,6 +303,7 @@ void MainWindow::draw_settings() ImGui::PopID(); } open_core_settings = -1; + ImGui::EndChild(); } void MainWindow::draw_stars(ImVec2 center, float radius) diff --git a/vendored/toml11/toml/exception.hpp b/vendored/toml11/toml/exception.hpp index 81c6401c..537fa7e0 100644 --- a/vendored/toml11/toml/exception.hpp +++ b/vendored/toml11/toml/exception.hpp @@ -41,8 +41,8 @@ inline std::string str_error(int errnum) constexpr std::size_t bufsize = 256; std::array buf; buf.fill('\0'); - const char* result = strerror_r(errnum, buf.data(), bufsize); - return std::string(result); + // const char* result = strerror_r(errnum, buf.data(), bufsize); + return std::string("toml11 error - hydra patch"); #elif (defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 200112L) || (defined(_XOPEN_SOURCE) && _XOPEN_SOURCE >= 600) || ( defined(__DARWIN_C_LEVEL) && __DARWIN_C_LEVEL >= 200112L ) // macOS constexpr std::size_t bufsize = 256; std::array buf;