diff --git a/src/IntervalSummaryWindow.cpp b/src/IntervalSummaryWindow.cpp index dbfa3dac5..7c4c533e3 100644 --- a/src/IntervalSummaryWindow.cpp +++ b/src/IntervalSummaryWindow.cpp @@ -29,9 +29,13 @@ IntervalSummaryWindow::IntervalSummaryWindow(Context *context) : context(context) { - setWindowTitle(tr("Interval Summary")); - setReadOnly(true); + setWindowTitle(tr("Interval Summary")); + setReadOnly(true); setFrameStyle(QFrame::NoFrame); +#ifdef Q_OS_WIN + QStyle *cde = QStyleFactory::create("plastique"); + verticalScrollBar()->setStyle(cde); +#endif #ifdef Q_OS_MAC setAttribute(Qt::WA_MacShowFocusRect, 0); diff --git a/src/IntervalTreeView.cpp b/src/IntervalTreeView.cpp index 32cf34b7b..9fa99d3ec 100644 --- a/src/IntervalTreeView.cpp +++ b/src/IntervalTreeView.cpp @@ -21,6 +21,7 @@ #include "RideItem.h" #include "RideFile.h" #include "Context.h" +#include IntervalTreeView::IntervalTreeView(Context *context) : context(context) @@ -30,6 +31,10 @@ IntervalTreeView::IntervalTreeView(Context *context) : context(context) setDropIndicatorShown(true); #ifdef Q_OS_MAC setAttribute(Qt::WA_MacShowFocusRect, 0); +#endif +#ifdef Q_OS_WIN + QStyle *cde = QStyleFactory::create("plastique"); + verticalScrollBar()->setStyle(cde); #endif setStyleSheet("QTreeView::item:hover { background: lightGray; }"); setMouseTracking(true); diff --git a/src/LTMSidebar.cpp b/src/LTMSidebar.cpp index 06fdd459a..238d911ce 100644 --- a/src/LTMSidebar.cpp +++ b/src/LTMSidebar.cpp @@ -28,6 +28,7 @@ #include #include #include +#include // seasons support #include "Season.h" @@ -76,6 +77,10 @@ LTMSidebar::LTMSidebar(Context *context) : QWidget(context->mainWindow), context dateRangeTree->setContextMenuPolicy(Qt::CustomContextMenu); #ifdef Q_OS_MAC dateRangeTree->setAttribute(Qt::WA_MacShowFocusRect, 0); +#endif +#ifdef Q_OS_WIN + QStyle *cde = QStyleFactory::create("plastique"); + dateRangeTree->verticalScrollBar()->setStyle(cde); #endif seasonsWidget->addWidget(dateRangeTree); @@ -100,6 +105,10 @@ LTMSidebar::LTMSidebar(Context *context) : QWidget(context->mainWindow), context eventTree->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); #ifdef Q_OS_MAC eventTree->setAttribute(Qt::WA_MacShowFocusRect, 0); +#endif +#ifdef Q_OS_WIN + cde = QStyleFactory::create("plastique"); + eventTree->verticalScrollBar()->setStyle(cde); #endif eventsWidget->addWidget(eventTree); @@ -129,6 +138,10 @@ LTMSidebar::LTMSidebar(Context *context) : QWidget(context->mainWindow), context filterTree->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); #ifdef Q_OS_MAC filterTree->setAttribute(Qt::WA_MacShowFocusRect, 0); +#endif +#ifdef Q_OS_WIN + cde = QStyleFactory::create("plastique"); + filterTree->verticalScrollBar()->setStyle(cde); #endif // we cast the filter tree and this because we use the same constructor XXX fix this!!! filterSplitter = new GcSubSplitter(Qt::Vertical, (GcSplitterControl*)filterTree, (GcSplitter*)this, true); @@ -529,6 +542,10 @@ LTMSidebar::autoFilterChanged() tree->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); #ifdef Q_OS_MAC tree->setAttribute(Qt::WA_MacShowFocusRect, 0); +#endif +#ifdef Q_OS_WIN + QStyle *cde = QStyleFactory::create("plastique"); + tree->verticalScrollBar()->setStyle(cde); #endif item->addWidget(tree); filterSplitter->addWidget(item); diff --git a/src/RideNavigator.cpp b/src/RideNavigator.cpp index 759113a52..424edbcd5 100644 --- a/src/RideNavigator.cpp +++ b/src/RideNavigator.cpp @@ -86,6 +86,12 @@ RideNavigator::RideNavigator(Context *context, bool mainwindow) : context(contex tableView->header()->setStretchLastSection(false); tableView->header()->setMinimumSectionSize(0); tableView->header()->setFocusPolicy(Qt::NoFocus); +#ifdef Q_OS_WIN + if (mainwindow) { + QStyle *cde = QStyleFactory::create("plastique"); + tableView->verticalScrollBar()->setStyle(cde); + } +#endif #ifdef Q_OS_MAC tableView->header()->setSortIndicatorShown(false); // blue looks nasty tableView->setAttribute(Qt::WA_MacShowFocusRect, 0); diff --git a/src/TabView.cpp b/src/TabView.cpp index 844b87d26..7863bbf0a 100644 --- a/src/TabView.cpp +++ b/src/TabView.cpp @@ -115,7 +115,7 @@ TabView::setSidebar(QWidget *sidebar) void TabView::configChanged() { -#ifdef Q_OS_LINUX +#if (defined Q_OS_LINUX) || (defined Q_OS_WIN) // style that sucker if (sidebar_) { sidebar_->setStyleSheet( diff --git a/src/TrainSidebar.cpp b/src/TrainSidebar.cpp index b72b0c351..8bf5f08db 100644 --- a/src/TrainSidebar.cpp +++ b/src/TrainSidebar.cpp @@ -28,6 +28,7 @@ #include #include #include +#include // Three current realtime device types supported are: #include "RealtimeController.h" @@ -105,6 +106,10 @@ TrainSidebar::TrainSidebar(Context *context) : GcWindow(context), context(contex mediaTree->header()->setSortIndicatorShown(false); // blue looks nasty mediaTree->setAttribute(Qt::WA_MacShowFocusRect, 0); #endif +#ifdef Q_OS_WIN + QStyle *cde = QStyleFactory::create("plastique"); + mediaTree->verticalScrollBar()->setStyle(cde); +#endif #endif deviceTree = new QTreeWidget; @@ -119,6 +124,10 @@ TrainSidebar::TrainSidebar(Context *context) : GcWindow(context), context(contex deviceTree->setIndentation(5); deviceTree->expandItem(deviceTree->invisibleRootItem()); deviceTree->setContextMenuPolicy(Qt::CustomContextMenu); +#ifdef Q_OS_WIN + QStyle *xde = QStyleFactory::create("plastique"); + deviceTree->verticalScrollBar()->setStyle(xde); +#endif workoutModel = new QSqlTableModel(this, trainDB->connection()); workoutModel->setTable("workouts"); @@ -153,6 +162,10 @@ TrainSidebar::TrainSidebar(Context *context) : GcWindow(context), context(contex workoutTree->header()->setSortIndicatorShown(false); // blue looks nasty workoutTree->setAttribute(Qt::WA_MacShowFocusRect, 0); #endif +#ifdef Q_OS_WIN + xde = QStyleFactory::create("plastique"); + workoutTree->verticalScrollBar()->setStyle(xde); +#endif // TOOLBAR BUTTONS ETC QHBoxLayout *toolallbuttons=new QHBoxLayout; // on toolbar