From 3d39771b1cb4cdd3f876a782580d0de5847105c3 Mon Sep 17 00:00:00 2001 From: Jesper Juhl Date: Fri, 29 May 2026 17:34:37 +0200 Subject: [PATCH 1/5] Reserve correct size for container when the size is known in advance --- gui-builder/include/WidgetProperties/WidgetProperties.hpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gui-builder/include/WidgetProperties/WidgetProperties.hpp b/gui-builder/include/WidgetProperties/WidgetProperties.hpp index 3bf05f440..c9505a46d 100644 --- a/gui-builder/include/WidgetProperties/WidgetProperties.hpp +++ b/gui-builder/include/WidgetProperties/WidgetProperties.hpp @@ -130,7 +130,9 @@ struct WidgetProperties if (node->propertyValuePairs["list"]) { std::vector list; - for (const auto& value : node->propertyValuePairs["list"]->valueList) + const auto& valueList = node->propertyValuePairs["list"]->valueList; + list.reserve(valueList.size()); + for (const auto& value : valueList) list.push_back(tgui::Deserializer::deserialize(tgui::ObjectConverter::Type::String, value).getString()); return list; From 6dbe65602cadd643a9dce83b6c1b503d405115b7 Mon Sep 17 00:00:00 2001 From: Jesper Juhl Date: Fri, 29 May 2026 17:53:27 +0200 Subject: [PATCH 2/5] Replace std::list with std::vector in Layout constructor The code only performs sequential iteration and does not require stable iterators or constant-time insert/erase in the middle of the sequence. std::vector provides contiguous storage, better cache locality, and avoids the per-node allocation overhead associated with std::list. --- src/Layout.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/Layout.cpp b/src/Layout.cpp index 1e541545b..ae5d8f120 100644 --- a/src/Layout.cpp +++ b/src/Layout.cpp @@ -27,8 +27,6 @@ #include #include -#include - //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// namespace @@ -151,7 +149,7 @@ namespace tgui } // The string contains an expression, so split it up in multiple layouts - std::list operands; + std::vector operands; std::vector operators; decltype(searchPos) prevSearchPos = 0; while (searchPos != String::npos) From fdbf3074c8858eb93f8135efb0e094caa008d60f Mon Sep 17 00:00:00 2001 From: Jesper Juhl Date: Fri, 29 May 2026 18:11:17 +0200 Subject: [PATCH 3/5] Fix incorrect comment for header guard --- gui-builder/include/WidgetProperties/ListViewProperties.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gui-builder/include/WidgetProperties/ListViewProperties.hpp b/gui-builder/include/WidgetProperties/ListViewProperties.hpp index b1451af06..24c819584 100644 --- a/gui-builder/include/WidgetProperties/ListViewProperties.hpp +++ b/gui-builder/include/WidgetProperties/ListViewProperties.hpp @@ -225,4 +225,4 @@ struct ListViewProperties : public WidgetProperties } }; -#endif // TGUI_GUI_BUILDER_LIST_BOX_PROPERTIES_HPP +#endif // TGUI_GUI_BUILDER_LIST_VIEW_PROPERTIES_HPP From e0fe95aa05b1dfba8e965ad23ffacd39d3e1a270 Mon Sep 17 00:00:00 2001 From: Jesper Juhl Date: Fri, 29 May 2026 18:56:18 +0200 Subject: [PATCH 4/5] Fix indentation issues in CSS files Let's try to be consistent. --- doc/custom.css | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/custom.css b/doc/custom.css index 8d9a6f74f..e62080ad3 100644 --- a/doc/custom.css +++ b/doc/custom.css @@ -1,11 +1,11 @@ @media (prefers-color-scheme: dark) { .directory .levels span { - color: #1982d2; + color: #1982d2; } address { - font-style: normal; - color: #2a4d99; + font-style: normal; + color: #2a4d99; } } @@ -18,7 +18,7 @@ body { } #body { - background-color: var(--page-background-color); + background-color: var(--page-background-color); } div { From 286e1d01ad6528fffdf00fb2c715d3663f5ff7ea Mon Sep 17 00:00:00 2001 From: Jesper Juhl Date: Fri, 29 May 2026 18:56:59 +0200 Subject: [PATCH 5/5] Simplify CSS Add a missing semicolon and simplify padding expression. --- doc/custom.css | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/doc/custom.css b/doc/custom.css index e62080ad3..1629214b8 100644 --- a/doc/custom.css +++ b/doc/custom.css @@ -22,13 +22,11 @@ body { } div { - margin-bottom: 0 + margin-bottom: 0; } #contents { - padding-left: 0; - padding-right: 0; - padding-bottom: 0; + padding: 0; margin-left: 0; margin-right: 0; max-width: 100%;