Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
mgrojo committed Nov 13, 2017
1 parent 124b209 commit ade5627
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 16 deletions.
1 change: 1 addition & 0 deletions src/PlotDock.cpp
Expand Up @@ -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())
Expand Down
1 change: 0 additions & 1 deletion src/PlotDock.h
Expand Up @@ -57,7 +57,6 @@ public slots:
PlotColumnField = 0,
PlotColumnX = 1,
PlotColumnY = 2,
PlotColumnDummy = 3
};

Ui::PlotDock* ui;
Expand Down
22 changes: 7 additions & 15 deletions src/PlotDock.ui
Expand Up @@ -26,12 +26,18 @@
<verstretch>2</verstretch>
</sizepolicy>
</property>
<property name="alternatingRowColors">
<bool>true</bool>
</property>
<property name="columnCount">
<number>4</number>
<number>3</number>
</property>
<attribute name="headerDefaultSectionSize">
<number>100</number>
</attribute>
<attribute name="headerStretchLastSection">
<bool>false</bool>
</attribute>
<column>
<property name="text">
<string>Columns</string>
Expand All @@ -47,20 +53,6 @@
<string>Y</string>
</property>
</column>
<column>
<property name="text">
<string notr="true">_</string>
</property>
<property name="foreground">
<brush brushstyle="NoBrush">
<color alpha="0">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</property>
</column>
</widget>
<widget class="QCustomPlot" name="plotWidget" native="true">
<property name="sizePolicy">
Expand Down

0 comments on commit ade5627

Please sign in to comment.