|
|
@ -1256,7 +1256,7 @@ void ImGui::TableUpdateBorders(ImGuiTable* table) |
|
|
|
// really problematic (whereas the actual visual will be displayed in EndTable() and using the current frame height).
|
|
|
|
// Actual columns highlight/render will be performed in EndTable() and not be affected.
|
|
|
|
ImGuiTableInstanceData* table_instance = TableGetInstanceData(table, table->InstanceCurrent); |
|
|
|
const float hit_half_width = ImTrunc(TABLE_RESIZE_SEPARATOR_HALF_THICKNESS * g.DpiScale); |
|
|
|
const float hit_half_width = ImTrunc(TABLE_RESIZE_SEPARATOR_HALF_THICKNESS * g.CurrentDpiScale); |
|
|
|
const float hit_y1 = (table->FreezeRowsCount >= 1 ? table->OuterRect.Min.y : table->WorkRect.Min.y) + table->AngledHeadersHeight; |
|
|
|
const float hit_y2_body = ImMax(table->OuterRect.Max.y, hit_y1 + table_instance->LastOuterHeight - table->AngledHeadersHeight); |
|
|
|
const float hit_y2_head = hit_y1 + table_instance->LastTopHeadersRowHeight; |
|
|
@ -1433,7 +1433,7 @@ void ImGui::EndTable() |
|
|
|
if (table->ResizedColumn != -1 && table->InstanceCurrent == table->InstanceInteracted) |
|
|
|
{ |
|
|
|
ImGuiTableColumn* column = &table->Columns[table->ResizedColumn]; |
|
|
|
const float new_x2 = (g.IO.MousePos.x - g.ActiveIdClickOffset.x + ImTrunc(TABLE_RESIZE_SEPARATOR_HALF_THICKNESS * g.DpiScale)); |
|
|
|
const float new_x2 = (g.IO.MousePos.x - g.ActiveIdClickOffset.x + ImTrunc(TABLE_RESIZE_SEPARATOR_HALF_THICKNESS * g.CurrentDpiScale)); |
|
|
|
const float new_width = ImTrunc(new_x2 - column->MinX - table->CellSpacingX1 - table->CellPaddingX * 2.0f); |
|
|
|
table->ResizedColumnNextWidth = new_width; |
|
|
|
} |
|
|
@ -4052,7 +4052,7 @@ static float GetDraggedColumnOffset(ImGuiOldColumns* columns, int column_index) |
|
|
|
IM_ASSERT(column_index > 0); // We are not supposed to drag column 0.
|
|
|
|
IM_ASSERT(g.ActiveId == columns->ID + ImGuiID(column_index)); |
|
|
|
|
|
|
|
float x = g.IO.MousePos.x - g.ActiveIdClickOffset.x + ImTrunc(COLUMNS_HIT_RECT_HALF_THICKNESS * g.DpiScale) - window->Pos.x; |
|
|
|
float x = g.IO.MousePos.x - g.ActiveIdClickOffset.x + ImTrunc(COLUMNS_HIT_RECT_HALF_THICKNESS * g.CurrentDpiScale) - window->Pos.x; |
|
|
|
x = ImMax(x, ImGui::GetColumnOffset(column_index - 1) + g.Style.ColumnsMinSpacing); |
|
|
|
if ((columns->Flags & ImGuiOldColumnFlags_NoPreserveWidths)) |
|
|
|
x = ImMin(x, ImGui::GetColumnOffset(column_index + 1) - g.Style.ColumnsMinSpacing); |
|
|
@ -4367,7 +4367,7 @@ void ImGui::EndColumns() |
|
|
|
ImGuiOldColumnData* column = &columns->Columns[n]; |
|
|
|
float x = window->Pos.x + GetColumnOffset(n); |
|
|
|
const ImGuiID column_id = columns->ID + ImGuiID(n); |
|
|
|
const float column_hit_hw = ImTrunc(COLUMNS_HIT_RECT_HALF_THICKNESS * g.DpiScale); |
|
|
|
const float column_hit_hw = ImTrunc(COLUMNS_HIT_RECT_HALF_THICKNESS * g.CurrentDpiScale); |
|
|
|
const ImRect column_hit_rect(ImVec2(x - column_hit_hw, y1), ImVec2(x + column_hit_hw, y2)); |
|
|
|
if (!ItemAdd(column_hit_rect, column_id, NULL, ImGuiItemFlags_NoNav)) |
|
|
|
continue; |
|
|
|