From ebd7dff4b97a2a9dd221fb114ff40785f3b08e24 Mon Sep 17 00:00:00 2001 From: stojce Date: Sat, 15 Mar 2014 22:07:29 +0100 Subject: [PATCH] QSpinBox, QDoubleSpinBox styling --- interface/resources/styles/global.qss | 49 +++++++++++++++++---------- interface/src/ui/FramelessDialog.cpp | 1 + 2 files changed, 33 insertions(+), 17 deletions(-) diff --git a/interface/resources/styles/global.qss b/interface/resources/styles/global.qss index 87e142eb00..14929d39af 100644 --- a/interface/resources/styles/global.qss +++ b/interface/resources/styles/global.qss @@ -33,33 +33,48 @@ QPushButton { padding: 10px 15px; } -QSpinBox { +QSpinBox, QDoubleSpinBox { padding: 5px; border-width: 1; - +} + +QDoubleSpinBox::up-arrow, +QSpinBox::up-arrow { + background-image: url(styles/up.svg); + background-repeat: no-repeat; + background-position: center center; +} + +QDoubleSpinBox::down-arrow, +QSpinBox::down-arrow { + background-image: url(styles/down.svg); + background-repeat: no-repeat; + background-position: center center; +} + +QDoubleSpinBox::up-button, +QSpinBox::up-button, +QDoubleSpinBox::down-button, +QSpinBox::down-button { + width: 26px; + height: 13px; + + background-color: #f2f2f2; + border-color: #ccc; + border-style: solid; + border-width: 1px; } QDoubleSpinBox::up-button, QSpinBox::up-button { - - width: 25px; - height: 18px; - background-image: url(styles/up.svg); - background-repeat: no-repeat; - border: 1px #ccc solid; - - border-top-left-radius: 2px; - border-top-right-radius: 2px; + border-top-left-radius: 4px; + border-top-right-radius: 4px; } QDoubleSpinBox::down-button, QSpinBox::down-button { - - width: 25px; - height: 18px; - background-image: url(styles/down.svg); - background-repeat: no-repeat; - border: 1px #ccc solid; + border-bottom-left-radius: 4px; + border-bottom-right-radius: 4px; } QSlider { diff --git a/interface/src/ui/FramelessDialog.cpp b/interface/src/ui/FramelessDialog.cpp index 94bb218171..2216e61b91 100644 --- a/interface/src/ui/FramelessDialog.cpp +++ b/interface/src/ui/FramelessDialog.cpp @@ -19,6 +19,7 @@ FramelessDialog::FramelessDialog(QWidget *parent, Qt::WindowFlags flags) : QDial QDir::setCurrent(Application::resourcesPath()); setStyleSheet(styleSheet.readAll()); } + setWindowOpacity(0.95); setAttribute(Qt::WA_DeleteOnClose); }