Comments (4)
You have a feedback loop using “ imgui::SetNextItemWidth(ImGui::GetContentRegionAvail().x);” which uses the column width for the framed part of the combo, and the column itself measuring its contents to set its width proportional to contents to both columns. Unfortunately one of those parameters would need to be altered.
from imgui.
Hi Omar, thanks for getting back to me. What you say makes perfect sense, though unfortunately this issue occurs even without the second row with SetNextItemWidth
.
ImGui::Begin("window");
ImGui::BeginTable("table_broken", 2, ImGuiTableFlags_SizingStretchProp);
ImGui::TableNextRow();
ImGui::TableSetColumnIndex(0);
ImGui::Text("broken");
ImGui::TableSetColumnIndex(1);
if (ImGui::BeginCombo("##combo", "this table jitters"))
ImGui::EndCombo();
ImGui::EndTable();
ImGui::BeginTable("table_working", 2, ImGuiTableFlags_SizingStretchProp);
ImGui::TableNextRow();
ImGui::TableSetColumnIndex(0);
ImGui::Text("working");
ImGui::TableSetColumnIndex(1);
ImGui::Text("but this table is fine");
ImGui::EndTable();
ImGui::End();
This is the same code as above, just without the second row. I get the following happening:
simplescreenrecorder-2024-03-28_22.30.40.mp4
It's happening to a lesser extent, but it's particularly noticeable when the width is increased.
from imgui.
Actually it's pretty noticeable when I extend the window further:
The right extent of the Combo moves smoothly, it's entirely the left extent that is shifting every 2nd or so frame, resulting in the jittering effect.
simplescreenrecorder-2024-03-28_22.39.05.mp4
from imgui.
I can confirm it happens on Windows as well. On my 165Hz monitor it's a lot smoother but it still happens.
arc_IEa2KMBRTG.mp4
from imgui.
Related Issues (20)
- How to assign different window paddings in one window? HOT 1
- OpenGL Polygon Mode warning in Windows Opengl ES 3.0 HOT 4
- Image buttons - loop - no response - always false HOT 2
- Work around for peristent Centos/RHEL GLFW mouse offset issue? HOT 1
- ProgressBar with fraction == NaN leads to gigantic allocation HOT 1
- Resizing Widgets with SDL and Ogre HOT 1
- ImGui resizes itself to git content when setting size to 0. HOT 3
- How to set the clipboard functions to default ImGui implementation? HOT 5
- More than one BeginTabItem()s crashes program HOT 1
- Tracing back to the original pushed element ID HOT 5
- Font descriptor set of the backend is always null
- ImGui Windows being weird HOT 1
- Displaying Directory/Path Tree HOT 2
- Freeing memory from the SDL_Renderer HOT 4
- main.exe is not compatible with mi pc HOT 1
- Window Freeze using Multi Viewport and hidding main window
- Difference between backends? HOT 2
- Text rendering character advancing adds visual space for Unicode VARIATION_SELECTOR-16 codepoint HOT 2
- Creating checkboxes from a list of values HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from imgui.