From ef61a963e92a6b2e8a0f7f7af823289b75397a41 Mon Sep 17 00:00:00 2001 From: thankyouverycool <66646555+thankyouverycool@users.noreply.github.com> Date: Wed, 17 Feb 2021 12:25:39 -0500 Subject: [PATCH] LibGUI: Always set tree column content width to widest open node Fixes hidable horizontal scrollbars remaining visible even after collapsing their responsible nodes. Tree column width defaults to column header width if wider than current content. --- Userland/Libraries/LibGUI/TreeView.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Libraries/LibGUI/TreeView.cpp b/Userland/Libraries/LibGUI/TreeView.cpp index be91aaaf61..81c2cc07df 100644 --- a/Userland/Libraries/LibGUI/TreeView.cpp +++ b/Userland/Libraries/LibGUI/TreeView.cpp @@ -601,7 +601,7 @@ void TreeView::update_column_sizes() return IterationDecision::Continue; }); - set_column_width(tree_column, max(this->column_width(tree_column), tree_column_width)); + set_column_width(tree_column, tree_column_width); } int TreeView::tree_column_x_offset() const