mirror of
https://github.com/ocornut/imgui.git
synced 2026-04-20 06:20:58 +00:00
Selectable: Fixed horizontal label alignment with SelectableTextAlign.x > 0 and specifying a selectable size. (#8338)
Regression from ed7551c1d
This commit is contained in:
@@ -47,7 +47,6 @@ Breaking changes:
|
||||
Note that it was also added to ImGui_ImplVulkan_InitInfo but for the later it is optional.
|
||||
(#8326, #8365, #8400)
|
||||
|
||||
|
||||
Other changes:
|
||||
|
||||
- Fixed IsItemDeactivatedAfterEdit() signal being broken for Checkbox(),
|
||||
@@ -71,6 +70,8 @@ Other changes:
|
||||
- Tables: tamed some .ini settings optimizations to more accurately allow
|
||||
overwriting/hot-reloading settings in more situations. (#7934)
|
||||
- Tables, Error Handling: Recovery from invalid index in TableSetColumnIndex(). (#1651)
|
||||
- Selectable: Fixed horizontal label alignment with SelectableTextAlign.x > 0 and
|
||||
specifying a selectable size. (#8338)
|
||||
- Styles, Tabs: made the Close Button of selected tabs always visible by default,
|
||||
without requiring to hover the tab. (#8387)
|
||||
- Added style.TabCloseButtonMinWidthSelected/TabCloseButtonMinWidthUnselected settings
|
||||
|
||||
@@ -7101,7 +7101,7 @@ bool ImGui::Selectable(const char* label, bool selected, ImGuiSelectableFlags fl
|
||||
|
||||
// Text stays at the submission position. Alignment/clipping extents ignore SpanAllColumns.
|
||||
if (is_visible)
|
||||
RenderTextClipped(pos, ImVec2(window->WorkRect.Max.x, pos.y + size.y), label, NULL, &label_size, style.SelectableTextAlign, &bb);
|
||||
RenderTextClipped(pos, ImVec2(ImMin(pos.x + size.x, window->WorkRect.Max.x), pos.y + size.y), label, NULL, &label_size, style.SelectableTextAlign, &bb);
|
||||
|
||||
// Automatically close popups
|
||||
if (pressed && (window->Flags & ImGuiWindowFlags_Popup) && !(flags & ImGuiSelectableFlags_NoAutoClosePopups) && (g.LastItemData.ItemFlags & ImGuiItemFlags_AutoClosePopups))
|
||||
|
||||
Reference in New Issue
Block a user