-
-
Notifications
You must be signed in to change notification settings - Fork 110
Open
Description
#include "TGUI/Widgets/Button.hpp"
#include "TGUI/Widgets/HorizontalLayout.hpp"
#include <algorithm>
#include <functional>
#include <GLFW/glfw3.h>
#include <TGUI/Backend/GLFW-OpenGL3.hpp>
#include <TGUI/TGUI.hpp>
auto main (int,char**) -> int
{
glfwInit();
auto window = glfwCreateWindow(1000,300,"Bug",nullptr,nullptr);
glfwMakeContextCurrent(window);
tgui::Gui gui(window);
const auto horizontal_layout = tgui::HorizontalLayout::create();
horizontal_layout->setOrigin(.5f,.5f);
horizontal_layout->setPosition("50%","50%");
horizontal_layout->getRenderer()->setSpaceBetweenWidgets(20);
horizontal_layout->setSize("90%", 40);
std::array<tgui::Button::Ptr,10> buttons;
std::ranges::generate(buttons,std::bind(tgui::Button::create,"Hello"));
std::ranges::for_each(buttons,[&horizontal_layout](const auto &b){horizontal_layout->add(b);});
gui.add(horizontal_layout);
gui.mainLoop();
glfwDestroyWindow(window);
}Made this simple snippet to explain the bug. As you slowly resize the app you can see the borders start to flash and if you stop just at the right moment you can see that the borders are not rendered properly. Resulting in a cheap looking output. This happens more frequently if you have more complex layout on the window.
- OS: Linux
- Backend: tried with glfw and SDL, The bug persists.
Observed behavior

Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels