Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tables: Fix sorting order in demo->tables->sorting #3023

Closed
wants to merge 25 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
d98b226
Tables: Initial commit. [Squashed 123+5 commits from tables_wip/]
ocornut Dec 19, 2019
5df135f
Tables: Initial demo code.
ocornut Dec 19, 2019
23cd2a5
Tables: Support for multiple Tables using same id where most settings…
ocornut Dec 26, 2019
5d07efe
Tables: Columns with no policy in a scrolling table will default to W…
ocornut Dec 28, 2019
2cd8658
Tables: Handle columns clipped due to host rect
ocornut Dec 28, 2019
aedf5f5
Tables: Double-clicking on fixed column to resize. Extracted code Beg…
ocornut Dec 28, 2019
27cd228
Tables: Comments, better assert, moved some internal flags out of the…
ocornut Dec 29, 2019
0d8b507
Tables: Return false when window is Collapsed (consistent + helpful f…
ocornut Dec 29, 2019
f2ee728
Tables: Disable initial output prior to NextRow call to avoid mislead…
ocornut Dec 29, 2019
46a2ed4
Tables: Demo: Moved Columns section into Tables & Columns section und…
ocornut Dec 29, 2019
e461feb
Tables: Fix scroll when releasing resize for multi-instances. Comment…
ocornut Dec 30, 2019
bb940e8
Tables: Separating inner/outer borders flags per axis so it is possib…
ocornut Dec 30, 2019
b3321a9
Tables: Moved border colors to the Style (maybe temporarily?) instead…
ocornut Dec 30, 2019
26a4060
Tables: Clarify internal calculations of row height so that TableGetC…
ocornut Jan 2, 2020
3fc8d8d
Tables: Fix reordering across hidden columns. Fix for frozen columns …
ocornut Jan 3, 2020
955bd4f
Tables: Support for multi-line columns name. Renaming of some fields …
ocornut Jan 6, 2020
aa605a5
Tables: Fix for hiding first column (fix fcceff5c + reading PrevLineT…
ocornut Jan 6, 2020
e4a663a
Tables: Storing per-column SkipItems as a shortcut. Comments, Spacings.
ocornut Jan 9, 2020
3c2b9d4
Tables: Made only first column honor Indent by default (like Columns …
ocornut Jan 9, 2020
9957652
Tables: Honor width/weight passed to TableSetupColumn() after .ini lo…
ocornut Jan 9, 2020
2ecb9fa
Tables: TableHeader() uses provided row min header rather than increm…
ocornut Jan 20, 2020
e773d03
Tables: Fixed headers closing popups.
ocornut Jan 22, 2020
0c2b772
Tables: Fixed content size calculation creating feedback loops. Fixed…
ocornut Feb 6, 2020
35d23cc
Tables: Added ImGuiTableFlags_NoKeepColumnsVisible wip flag useful fo…
ocornut Feb 10, 2020
0560b9e
fix sorting sign in demo->tables->sorting
piotrjurga Feb 13, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Tables: Fix for hiding first column (fix fcceff5 + reading PrevLineTe…
…xtBaseOffset in EndCell of inactive column).
  • Loading branch information
ocornut committed Feb 10, 2020
commit aa605a5d4eba3f110144042294494d43b3ea9bb6
7 changes: 4 additions & 3 deletions imgui_widgets.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9109,6 +9109,7 @@ void ImGui::TableBeginRow(ImGuiTable* table)

table->RowPosY1 = table->RowPosY2 = next_y1;
table->RowTextBaseline = 0.0f;
window->DC.PrevLineTextBaseOffset = 0.0f;
window->DC.CursorMaxPos.y = next_y1;

// Making the header BG color non-transparent will allow us to overlay it multiple times when handling smooth dragging.
Expand Down Expand Up @@ -9229,6 +9230,7 @@ void ImGui::TableEndRow(ImGuiTable* table)

// [Internal] Called by TableNextRow()TableNextCell()!
// This is called a lot, so we need to be mindful of unnecessary overhead.
// FIXME-TABLE FIXME-OPT: Could probably shortcut some things for non-active or clipped columns.
void ImGui::TableBeginCell(ImGuiTable* table, int column_no)
{
table->CurrentColumn = column_no;
Expand Down Expand Up @@ -9499,7 +9501,7 @@ void ImGui::TableAutoHeaders()

// Open row
TableNextRow(ImGuiTableRowFlags_Headers, row_height);
if (window->SkipItems)
if (table->HostSkipItems) // Merely an optimization
return;

// This for loop is constructed to not make use of internal functions,
Expand Down Expand Up @@ -9539,8 +9541,7 @@ void ImGui::TableAutoHeaders()
open_context_popup = column_n;
}

// FIXME-TABLE: This is not user-land code any more...
// FIXME-TABLE: Need to explain why this is here!
// FIXME-TABLE: This is not user-land code any more + need to explain WHY this is here!
window->SkipItems = table->HostSkipItems;

// Allow opening popup from the right-most section after the last column
Expand Down