UI Nits: Ride navigator contents margins

When adjusting column widths take into account the
contents margins. Also shows sort indicator on the
columns when not on a mac (this was changed as part
of the recent Mac native polish commits).
This commit is contained in:
Mark Liversedge
2012-11-23 22:27:46 +00:00
parent 6e4a58542e
commit eb30dd9f0e

View File

@@ -89,9 +89,9 @@ RideNavigator::RideNavigator(MainWindow *parent, bool mainwindow) : main(parent)
tableView->header()->setStretchLastSection(false);
tableView->header()->setMinimumSectionSize(0);
tableView->header()->setFocusPolicy(Qt::NoFocus);
tableView->header()->setSortIndicatorShown(false);
//tableView->header()->setHighlightSections(false);
#ifdef Q_OS_MAC
tableView->header()->setSortIndicatorShown(false); // blue looks nasty
tableView->setAttribute(Qt::WA_MacShowFocusRect, 0);
#endif
//tableView->setUniformRowHeights(true);
@@ -282,6 +282,9 @@ void RideNavigator::setWidth(int x)
x -= tableView->verticalScrollBar()->width()
+ 0 ; // !! no longer account for content margins of 3,3,3,3 was + 6
// take the margins into accopunt top
x -= mainLayout->contentsMargins().left() + mainLayout->contentsMargins().right();
// ** NOTE **
// When iterating over the section headings we
// always use the tableview not the sortmodel