2
0
Эх сурвалжийг харах

Fixed alignment of ColorEdit4() label

ocornut 10 жил өмнө
parent
commit
a3e368a477
1 өөрчлөгдсөн 5 нэмэгдсэн , 1 устгасан
  1. 5 1
      imgui.cpp

+ 5 - 1
imgui.cpp

@@ -5448,9 +5448,13 @@ bool ImGui::ColorEdit4(const char* label, float col[4], bool alpha)
             // Don't set local copy of 'edit_mode' right away!
             g.ColorEditModeStorage.SetInt(id, (edit_mode + 1) % 3);
         }
+        ImGui::SameLine();
+    }
+    else
+    {
+        ImGui::SameLine(0, (int)style.ItemInnerSpacing.x);
     }
 
-    ImGui::SameLine();
     ImGui::TextUnformatted(label, FindTextDisplayEnd(label));
 
     // Convert back