Columns: Separator: Fixed a bug where non-visible separators within columns would alter the next row position differently than visible ones.

Fixed rounding issues also leading to change of ScrollMax depending on visible items (in particular negative coordinate would be rounded differently)
This commit is contained in:
omar
2019-09-16 19:03:20 +02:00
parent b05f6f6f50
commit 3dcf323c35
3 changed files with 7 additions and 2 deletions

View File

@ -1451,7 +1451,7 @@ static void ShowDemoWindowWidgets()
ImGui::PushID("set2");
static float values2[4] = { 0.20f, 0.80f, 0.40f, 0.25f };
const int rows = 3;
const ImVec2 small_slider_size(18, (160.0f-(rows-1)*spacing)/rows);
const ImVec2 small_slider_size(18, (float)(int)((160.0f - (rows - 1) * spacing) / rows));
for (int nx = 0; nx < 4; nx++)
{
if (nx > 0) ImGui::SameLine();