From f5020cd85db44f5d372efb6f783dfb9fdfd96982 Mon Sep 17 00:00:00 2001 From: Mark Liversedge Date: Sat, 27 Aug 2011 10:10:14 +0100 Subject: [PATCH] Use CascadingResizeSections in RideNavigator Makes resizing columns smoother and more intuitive. --- src/RideNavigator.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/RideNavigator.cpp b/src/RideNavigator.cpp index 1ed6e1606..2e9159991 100644 --- a/src/RideNavigator.cpp +++ b/src/RideNavigator.cpp @@ -64,6 +64,7 @@ RideNavigator::RideNavigator(MainWindow *parent) : main(parent), active(false), tableView->expandAll(); //XXXtableView->horizontalScrollBar()->setDisabled(true); //XXXtableView->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); + tableView->header()->setCascadingSectionResizes(true); // easier to resize this way tableView->setContextMenuPolicy(Qt::CustomContextMenu); tableView->header()->setStretchLastSection(false); tableView->header()->setMinimumSectionSize(20); @@ -837,7 +838,7 @@ void NavigatorCellDelegate::paint(QPainter *painter, const QStyleOptionViewItem //painter->drawLine(0,myOption.rect.y()+myOption.rect.height()-1,0,myOption.rect.y()+myOption.rect.height()-1); painter->drawLine(0,myOption.rect.y()+myOption.rect.height(),0,myOption.rect.y()+myOption.rect.height()); //painter->drawLine(rideNavigator->pwidth,myOption.rect.y(),rideNavigator->pwidth, myOption.rect.y()+myOption.rect.height()-1); - painter->drawLine(rideNavigator->pwidth,myOption.rect.y(),rideNavigator->pwidth, myOption.rect.y()+myOption.rect.height()); + //painter->drawLine(rideNavigator->pwidth,myOption.rect.y(),rideNavigator->pwidth, myOption.rect.y()+myOption.rect.height()); myOption.rect.setHeight(18); //added myOption.font.setWeight(QFont::Bold); drawDisplay(painter, myOption, myOption.rect, value);