From 7bce479e011e0ffd74f50c5d27a1e0b49d8e53e0 Mon Sep 17 00:00:00 2001 From: Mark Watkins Date: Thu, 17 Oct 2013 02:39:22 +1000 Subject: [PATCH] Pretty things up a bit with stylesheets --- sleepyhead/daily.ui | 320 ++++++++++--- sleepyhead/mainwindow.cpp | 14 - sleepyhead/mainwindow.ui | 933 ++++++++++++++++++++++++++++---------- 3 files changed, 960 insertions(+), 307 deletions(-) diff --git a/sleepyhead/daily.ui b/sleepyhead/daily.ui index 4b8bd7a4..4bec0b94 100644 --- a/sleepyhead/daily.ui +++ b/sleepyhead/daily.ui @@ -23,16 +23,7 @@ 0 - - 0 - - - 0 - - - 0 - - + 0 @@ -61,20 +52,17 @@ 0 - - 0 - - - 0 - - - 0 - - + 0 + + + 0 + 0 + + 0 @@ -90,6 +78,22 @@ Go to the previous day + + QToolButton { + background: transparent; + border-radius: 8px; + border: 2px solid transparent; +} + +QToolButton:hover { + border: 2px solid #456789; +} + +QToolButton:pressed { + border: 2px solid #456789; + background-color: #89abcd; +} + Prev @@ -111,7 +115,7 @@ - + 0 0 @@ -134,6 +138,23 @@ Qt::LeftToRight + + QToolButton { +border: 2px solid #dddddd; +border-radius: 10px; +background: transparent; +} + +QToolButton:hover { +border: 2px solid #456789; +border-radius: 10px; +} + +QToolButton:pressed { +border: 2px solid #456789; +border-radius: 10px; +} + ... @@ -156,6 +177,12 @@ + + + 0 + 0 + + 0 @@ -174,6 +201,22 @@ Qt::LeftToRight + + QToolButton { + background: transparent; + border-radius: 8px; + border: 2px solid transparent; +} + +QToolButton:hover { + border: 2px solid #456789; +} + +QToolButton:pressed { + border: 2px solid #456789; + background-color: #89abcd; +} + Next @@ -194,6 +237,12 @@ + + + 0 + 0 + + 0 @@ -209,6 +258,22 @@ Go to the most recent day with data records + + QToolButton { + background: transparent; + border-radius: 8px; + border: 2px solid transparent; +} + +QToolButton:hover { + border: 2px solid #456789; +} + +QToolButton:pressed { + border: 2px solid #456789; + background-color: #89abcd; +} + :/icons/arrow-end.png:/icons/arrow-end.png @@ -242,6 +307,64 @@ 0 + + #qt_calendar_nextmonth { + background: transparent; + border-radius: 8px; +} + +#qt_calendar_nextmonth:hover { + border: 2px solid #456789; +} + +#qt_calendar_nextmonth:pressed { + border: 2px solid #456789; + background: #89abcd; +} + +#qt_calendar_prevmonth { + background: transparent; + border-radius: 8px; +} + +#qt_calendar_prevmonth:hover { + border: 2px solid #456789; +} + +#qt_calendar_prevmonth:pressed { + border: 2px solid #456789; + background: #89abcd; +} + +#qt_calendar_monthbutton { + background: transparent; + border: 2px solid transparent; + border-radius: 8px; +} + +#qt_calendar_monthbutton:hover { + border: 2px solid #456789; +} + +#qt_calendar_monthbutton:pressed { + border: 2px solid #456789; + background: #89abcd; +} + +#qt_calendar_yearbutton { + background: transparent; + border-radius: 8px; +} + +#qt_calendar_yearbutton:hover { + border: 2px solid #456789; +} + +#qt_calendar_yearbutton:pressed { + border: 2px solid #456789; + background: #89abcd; +} + Qt::Monday @@ -266,7 +389,7 @@ - 0 + 1 true @@ -279,16 +402,7 @@ 0 - - 0 - - - 0 - - - 0 - - + 0 @@ -317,16 +431,7 @@ - - 4 - - - 4 - - - 4 - - + 4 @@ -383,16 +488,7 @@ 0 - - 0 - - - 0 - - - 0 - - + 0 @@ -459,6 +555,9 @@ + + color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 rgba(255, 0, 0, 255), stop:0.166 rgba(255, 255, 0, 255), stop:0.333 rgba(0, 255, 0, 255), stop:0.5 rgba(0, 255, 255, 255), stop:0.666 rgba(0, 0, 255, 255), stop:0.833 rgba(255, 0, 255, 255), stop:1 rgba(255, 0, 0, 255)) + Color @@ -466,6 +565,11 @@ + + + true + + i @@ -476,6 +580,11 @@ + + + true + + u @@ -483,6 +592,12 @@ + + + 75 + true + + B @@ -586,6 +701,25 @@ + + QSlider::groove:horizontal { + border: 1px solid #999999; + border-radius: 4px; + height: 8px; /* the groove expands to the size of the slider by default. by giving it a height, it has a fixed size */ + background: qlineargradient(x1:0, y1:0, x2:1, y2:0, stop:0 #ff6060, stop:1 #60ff60); + margin: 2px 0; + +} + +QSlider::handle:horizontal { + background: qlineargradient(x1:0, y1:0, x2:1, y2:1, stop:0 #b4b4b4, stop:1 #8f8f8f); + border: 1px solid #5c5c5c; + width: 18px; + margin: -2px 0; /* handle is placed by default on the contents rect of the groove. Expand outside the groove */ + border-radius: 3px; +} + + 10 @@ -685,8 +819,17 @@ Bookmarks + + 6 + + + 4 + + + + Add Bookmark @@ -776,6 +919,22 @@ Zoom fully out + + QToolButton { + background: transparent; + border-radius: 8px; + border: 2px solid transparent; +} + +QToolButton:hover { + border: 2px solid #456789; +} + +QToolButton:pressed { + border: 2px solid #456789; + background-color: #89abcd; +} + 100% @@ -789,12 +948,31 @@ Reset the graph heights to uniform sizes + + QToolButton { + background: transparent; + border-radius: 8px; + border: 2px solid transparent; +} + +QToolButton:hover { + border: 2px solid #456789; +} + +QToolButton:pressed { + border: 2px solid #456789; + background-color: #89abcd; +} + Reset true + + Qt::NoArrow + @@ -806,14 +984,33 @@ + + QToolButton { + background: transparent; + border-radius: 8px; + border: 2px solid transparent; +} + +QToolButton:hover { + border: 2px solid #456789; +} + +QToolButton:pressed { + border: 2px solid #456789; + background-color: #89abcd; +} + - ... + true + + Qt::ToolButtonIconOnly + - true + false Qt::DownArrow @@ -831,6 +1028,21 @@ Drop down this list to show/hide available graphs. + + + + + QComboBox::AdjustToMinimumContentsLengthWithIcon + + + + 20 + 20 + + + + false + diff --git a/sleepyhead/mainwindow.cpp b/sleepyhead/mainwindow.cpp index 7b47e5f3..06b8c8cc 100644 --- a/sleepyhead/mainwindow.cpp +++ b/sleepyhead/mainwindow.cpp @@ -177,20 +177,6 @@ MainWindow::MainWindow(QWidget *parent) : ui->summaryView->page()->setLinkDelegationPolicy(QWebPage::DelegateAllLinks); ui->webView->page()->setLinkDelegationPolicy(QWebPage::DelegateExternalLinks); ui->bookmarkView->page()->setLinkDelegationPolicy(QWebPage::DelegateAllLinks); - ui->toolBox->setStyleSheet( - "QToolBox::tab {" - "background: #6789ab;" - "color: lightGray;}" - "QToolBox { icon-size: 32px; }" - "QToolBox::tab:selected {" - "font: bold;" - "background: #9090ee;" - "color: white; }" - ); - - //"font-weight: bold; " - //"border-top-left-radius: 8px;" - //"border-top-right-radius: 8px;" QString loadingtxt="

"+tr("Loading...")+"

"; ui->summaryView->setHtml(loadingtxt); diff --git a/sleepyhead/mainwindow.ui b/sleepyhead/mainwindow.ui index aeddefa0..a5664531 100644 --- a/sleepyhead/mainwindow.ui +++ b/sleepyhead/mainwindow.ui @@ -6,8 +6,8 @@ 0 0 - 554 - 443 + 863 + 637
@@ -46,16 +46,7 @@ 4 - - 0 - - - 0 - - - 0 - - + 0 @@ -106,16 +97,7 @@ 0 - - 0 - - - 0 - - - 0 - - + 0 @@ -143,16 +125,7 @@ 3 - - 0 - - - 0 - - - 0 - - + 0 @@ -329,8 +302,8 @@ - 129 - 142 + 163 + 190 255 @@ -338,8 +311,8 @@ - 170 - 170 + 163 + 190 255 @@ -347,9 +320,9 @@ - 0 - 31 - 237 + 163 + 190 + 255 @@ -358,8 +331,8 @@ - 129 - 142 + 163 + 190 255 @@ -367,8 +340,8 @@ - 170 - 170 + 163 + 190 255 @@ -376,9 +349,9 @@ - 0 - 31 - 237 + 163 + 190 + 255 @@ -387,8 +360,8 @@ - 129 - 142 + 163 + 190 255 @@ -396,18 +369,18 @@ - 0 - 31 - 237 + 163 + 190 + 255 - 0 - 31 - 237 + 163 + 190 + 255 @@ -419,6 +392,40 @@ 12 + + QToolBox { +icon-size: 24px; +border-radius: 15px; +background: rgb(163, 190, 255) +} + +QToolBox::tab { + color: #444444; + background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, + stop: 0 #8181b1, + stop: 1.0 #8393c3); + } + +QToolBox::tab:pressed { + font: italic; + color: #ffffff; + background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, + stop: 0 #8181b1, + stop: 1.0 #8393c3); + +} + +QToolBox::tab:selected { + font: italic; + color: #ffffff; + background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, + stop: 0 #8181b1, + stop: 1.0 #8393c3); +} + + + + QFrame::Box @@ -441,9 +448,9 @@ 0 - 0 - 161 - 510 + -16 + 165 + 514 @@ -452,17 +459,17 @@ - 181 - 194 - 237 + 163 + 190 + 255 - 255 - 255 + 163 + 190 255 @@ -470,9 +477,9 @@ - 153 - 186 - 237 + 163 + 190 + 255 @@ -481,17 +488,17 @@ - 181 - 194 - 237 + 163 + 190 + 255 - 255 - 255 + 163 + 190 255 @@ -499,9 +506,9 @@ - 153 - 186 - 237 + 163 + 190 + 255 @@ -510,27 +517,27 @@ - 181 - 194 - 237 + 163 + 190 + 255 - 153 - 186 - 237 + 163 + 190 + 255 - 153 - 186 - 237 + 163 + 190 + 255 @@ -540,6 +547,9 @@ true + + background: rgb(163, 190, 255) + :/icons/bob-v3.0.png:/icons/bob-v3.0.png @@ -551,7 +561,7 @@ - + 0 0 @@ -561,6 +571,21 @@ 10 + + QToolButton { +background: transparent; +border: 2px solid transparent; border-radius: 30px; +} + +QToolButton:hover { +border: 2px solid #56789a; border-radius: 30px; +} + +QToolButton:pressed { +background-color: #8080ff; +border: 2px solid #56789a; border-radius: 30px; +} + Statistics @@ -585,7 +610,7 @@ - + 0 0 @@ -601,6 +626,21 @@ 10 + + QToolButton { +background: transparent; +border: 2px solid transparent; border-radius: 30px; +} + +QToolButton:hover { +border: 2px solid #56789a; border-radius: 30px; +} + +QToolButton:pressed { +background-color: #8080ff; +border: 2px solid #56789a; border-radius: 30px; +} + Daily @@ -625,11 +665,26 @@ - + 0 0 + + QToolButton { +background: transparent; +border: 2px solid transparent; border-radius: 30px; +} + +QToolButton:hover { +border: 2px solid #56789a; border-radius: 30px; +} + +QToolButton:pressed { +background-color: #8080ff; +border: 2px solid #56789a; border-radius: 30px; +} + Overview @@ -654,11 +709,26 @@ - + 0 0 + + QToolButton { +background: transparent; +border: 2px solid transparent; border-radius: 30px; +} + +QToolButton:hover { +border: 2px solid #56789a; border-radius: 30px; +} + +QToolButton:pressed { +background-color: #8080ff; +border: 2px solid #56789a; border-radius: 30px; +} + Oximetry @@ -683,7 +753,7 @@ - + 0 0 @@ -694,6 +764,21 @@ 0 + + QToolButton { +background: transparent; +border: 2px solid transparent; border-radius: 30px; +} + +QToolButton:hover { +border: 2px solid #56789a; border-radius: 30px; +} + +QToolButton:pressed { +background-color: #8080ff; +border: 2px solid #56789a; border-radius: 30px; +} + Import @@ -724,11 +809,26 @@ - + 0 0 + + QToolButton { +background: transparent; +border: 2px solid transparent; border-radius: 30px; +} + +QToolButton:hover { +border: 2px solid #56789a; border-radius: 30px; +} + +QToolButton:pressed { +background-color: #8080ff; +border: 2px solid #56789a; border-radius: 30px; +} + Help @@ -755,10 +855,13 @@ Qt::Vertical + + QSizePolicy::Expanding + - 20 - 40 + 0 + 0 @@ -770,8 +873,8 @@ 0 0 - 178 - 319 + 180 + 498 @@ -841,6 +944,9 @@ true + + + :/icons/bookmark.png:/icons/bookmark.png @@ -852,20 +958,17 @@ 0 - - 0 - - - 0 - - - 0 - - + 0 + + + 0 + 0 + + @@ -879,12 +982,23 @@ - - - 170 - 170 - 255 - + + + + + 125 + 125 + 255 + + + + + 200 + 200 + 255 + + + @@ -951,21 +1065,43 @@ - - - 255 - 255 - 255 - + + + + + 125 + 125 + 255 + + + + + 200 + 200 + 255 + + + - - - 170 - 170 - 255 - + + + + + 125 + 125 + 255 + + + + + 200 + 200 + 255 + + + @@ -1016,12 +1152,23 @@ - - - 170 - 170 - 255 - + + + + + 125 + 125 + 255 + + + + + 200 + 200 + 255 + + + @@ -1088,21 +1235,43 @@ - - - 255 - 255 - 255 - + + + + + 125 + 125 + 255 + + + + + 200 + 200 + 255 + + + - - - 170 - 170 - 255 - + + + + + 125 + 125 + 255 + + + + + 200 + 200 + 255 + + + @@ -1153,12 +1322,23 @@ - - - 170 - 170 - 255 - + + + + + 125 + 125 + 255 + + + + + 200 + 200 + 255 + + + @@ -1225,21 +1405,43 @@ - - - 170 - 170 - 255 - + + + + + 125 + 125 + 255 + + + + + 200 + 200 + 255 + + + - - - 170 - 170 - 255 - + + + + + 125 + 125 + 255 + + + + + 200 + 200 + 255 + + + @@ -1281,6 +1483,9 @@ + + background: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 rgba(125, 125, 255, 255), stop:1 rgba(200, 200, 255, 255)) + QFrame::Box @@ -1291,28 +1496,70 @@ 0 - - 0 - - - 0 - - - 0 - - + 0 + + + 0 + 0 + + + + + + 255 + 255 + 255 + + + + + + + 190 + 209 + 255 + + + + + + + 255 + 255 + 255 + + + + + + + 255 + 255 + 255 + + + - 170 - 170 + 190 + 209 + 255 + + + + + + + 190 + 209 255 @@ -1328,11 +1575,56 @@ + + + + 255 + 255 + 255 + + + + + + + 190 + 209 + 255 + + + + + + + 255 + 255 + 255 + + + + + + + 255 + 255 + 255 + + + - 170 - 170 + 190 + 209 + 255 + + + + + + + 190 + 209 255 @@ -1348,12 +1640,57 @@ + + + + 255 + 255 + 255 + + + + + + + 190 + 209 + 255 + + + + + + + 255 + 255 + 255 + + + + + + + 255 + 255 + 255 + + + - 0 - 31 - 237 + 190 + 209 + 255 + + + + + + + 190 + 209 + 255 @@ -1369,18 +1706,60 @@ + + + 15 + + + + QLineEdit { +border: 1px solid #6060e0; +border-radius: 20px; +color: white; +background-color: rgb(190, 209, 255); +} + +QLineEdit:selected { +background-color: rgb(190, 209, 255); + +} + + + + 0 + 0 + + + + + + 163 + 190 + 255 + + + - 170 - 170 + 163 + 190 + 255 + + + + + + + 163 + 190 255 @@ -1396,11 +1775,29 @@ + + + + 163 + 190 + 255 + + + - 170 - 170 + 163 + 190 + 255 + + + + + + + 163 + 190 255 @@ -1416,12 +1813,30 @@ + + + + 163 + 190 + 255 + + + - 0 - 31 - 237 + 163 + 190 + 255 + + + + + + + 163 + 190 + 255 @@ -1437,6 +1852,23 @@ + + QToolButton { +background: rgb(163, 190, 255); +} + +QToolButton:hover { +background: rgb(163, 190, 255); +border: 2px solid #272727; +border-radius: 10px; +} +QToolButton:pressed { +background: #6060c0; +border: 2px solid #272727; +border-radius: 10px; +} + + ... @@ -1454,43 +1886,106 @@ + + + 0 + 0 + + + + + + 163 + 190 + 255 + + + - 170 - 170 + 163 + 190 + 255 + + + + + + + 163 + 190 255 + + + + 163 + 190 + 255 + + + - 170 - 170 + 163 + 190 + 255 + + + + + + + 163 + 190 255 + + + + 163 + 190 + 255 + + + - 0 - 31 - 237 + 163 + 190 + 255 + + + + + + + 163 + 190 + 255 + + background: rgb(163, 190, 255) + about:blank @@ -1505,13 +2000,16 @@ 0 0 - 178 - 319 + 180 + 498 true + + + :/icons/trophy.png:/icons/trophy.png @@ -1523,62 +2021,19 @@ 0 - - 0 - - - 0 - - - 0 - - + 0 - - - - - - - 170 - 170 - 255 - - - - - - - - - 170 - 170 - 255 - - - - - - - - - 0 - 31 - 237 - - - - - - 10 + + background: rgb(163, 190, 255) + about:blank @@ -1598,8 +2053,8 @@ 0 0 - 554 - 21 + 863 + 22 @@ -1906,7 +2361,7 @@ QWebView QWidget -
QtWebKitWidgets/QWebView
+
QtWebKit/QWebView