From ade562769a06e4f010f15e88ddba2946747f6528 Mon Sep 17 00:00:00 2001 From: mgr Date: Mon, 13 Nov 2017 23:59:36 +0100 Subject: [PATCH] Minor improvements in Plot Dock columns The Column Field is resized to the content. The dummy column has been removed and the header no longer stretches the last section property. The table has alternating row colors for easy following of the field checks. --- src/PlotDock.cpp | 1 + src/PlotDock.h | 1 - src/PlotDock.ui | 22 +++++++--------------- 3 files changed, 8 insertions(+), 16 deletions(-) diff --git a/src/PlotDock.cpp b/src/PlotDock.cpp index 20494310..01be3eef 100644 --- a/src/PlotDock.cpp +++ b/src/PlotDock.cpp @@ -117,6 +117,7 @@ void PlotDock::updatePlot(SqliteTableModel* model, BrowseDataTableSettings* sett columnitem->setCheckState(PlotColumnX, Qt::Unchecked); } } + ui->treePlotColumns->resizeColumnToContents(PlotColumnField); // Add a row number column at the beginning of the column list, but only when there were (other) columns added if(ui->treePlotColumns->topLevelItemCount()) diff --git a/src/PlotDock.h b/src/PlotDock.h index 88b4df28..b2fbae23 100644 --- a/src/PlotDock.h +++ b/src/PlotDock.h @@ -57,7 +57,6 @@ private: PlotColumnField = 0, PlotColumnX = 1, PlotColumnY = 2, - PlotColumnDummy = 3 }; Ui::PlotDock* ui; diff --git a/src/PlotDock.ui b/src/PlotDock.ui index 389ec6a3..e4496b4c 100644 --- a/src/PlotDock.ui +++ b/src/PlotDock.ui @@ -26,12 +26,18 @@ 2 + + true + - 4 + 3 100 + + false + Columns @@ -47,20 +53,6 @@ Y - - - _ - - - - - 0 - 0 - 0 - - - -