diff --git a/CHANGELOG.md b/CHANGELOG.md index fe6fce80a3..c57854409c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -238,6 +238,7 @@ Feature #7953: Allow to change SVG icons colors depending on color scheme Feature #7964: Add Lua read access to MW Dialogue records Feature #7971: Make save's Time Played value display hours instead of days + Feature #7985: Support dark mode on Windows Task #5896: Do not use deprecated MyGUI properties Task #6085: Replace boost::filesystem with std::filesystem Task #6149: Dehardcode Lua API_REVISION diff --git a/apps/launcher/CMakeLists.txt b/apps/launcher/CMakeLists.txt index 91b985948d..967373de0c 100644 --- a/apps/launcher/CMakeLists.txt +++ b/apps/launcher/CMakeLists.txt @@ -47,13 +47,16 @@ source_group(launcher FILES ${LAUNCHER} ${LAUNCHER_HEADER}) set(QT_USE_QTGUI 1) +set (LAUNCHER_RES ${CMAKE_SOURCE_DIR}/files/launcher/launcher.qrc) + # Set some platform specific settings if(WIN32) + set(LAUNCHER_RES ${LAUNCHER_RES} ${CMAKE_SOURCE_DIR}/files/windows/QWindowsVistaDark/dark.qrc) set(GUI_TYPE WIN32) set(QT_USE_QTMAIN TRUE) endif(WIN32) -QT_ADD_RESOURCES(RCC_SRCS ${CMAKE_SOURCE_DIR}/files/launcher/launcher.qrc) +QT_ADD_RESOURCES(RCC_SRCS ${LAUNCHER_RES}) QT_WRAP_UI(UI_HDRS ${LAUNCHER_UI}) include_directories(${CMAKE_CURRENT_BINARY_DIR}) diff --git a/apps/launcher/main.cpp b/apps/launcher/main.cpp index 7fdcac77ab..0fdf6c304a 100644 --- a/apps/launcher/main.cpp +++ b/apps/launcher/main.cpp @@ -9,6 +9,7 @@ #include #include #include +#include #include #ifdef MAC_OS_X_VERSION_MIN_REQUIRED @@ -33,7 +34,7 @@ int runLauncher(int argc, char* argv[]) try { - QApplication app(argc, argv); + Platform::Application app(argc, argv); QString resourcesPath("."); if (!variables["resources"].empty()) diff --git a/apps/opencs/CMakeLists.txt b/apps/opencs/CMakeLists.txt index d6af64b33b..d10882e0ae 100644 --- a/apps/opencs/CMakeLists.txt +++ b/apps/opencs/CMakeLists.txt @@ -144,6 +144,7 @@ set (OPENCS_UI source_group (openmw-cs FILES main.cpp ${OPENCS_SRC} ${OPENCS_HDR}) if(WIN32) + set(OPENCS_RES ${OPENCS_RES} ${CMAKE_SOURCE_DIR}/files/windows/QWindowsVistaDark/dark.qrc) set(QT_USE_QTMAIN TRUE) set(OPENCS_RC_FILE ${CMAKE_SOURCE_DIR}/files/windows/opencs.rc) else(WIN32) diff --git a/apps/opencs/main.cpp b/apps/opencs/main.cpp index b3fd60b657..fbdcb4e689 100644 --- a/apps/opencs/main.cpp +++ b/apps/opencs/main.cpp @@ -3,15 +3,13 @@ #include #include -#include #include #include #include #include -#include -#include +#include #include #include "model/doc/messages.hpp" @@ -26,33 +24,6 @@ Q_DECLARE_METATYPE(std::string) class QEvent; class QObject; -class Application : public QApplication -{ -private: - bool notify(QObject* receiver, QEvent* event) override - { - try - { - if (event->type() == QEvent::ThemeChange || event->type() == QEvent::PaletteChange) - Misc::ScalableIcon::updateAllIcons(); - - return QApplication::notify(receiver, event); - } - catch (const std::exception& exception) - { - Log(Debug::Error) << "An exception has been caught: " << exception.what(); - } - - return false; - } - -public: - Application(int& argc, char* argv[]) - : QApplication(argc, argv) - { - } -}; - void setQSurfaceFormat() { osg::DisplaySettings* ds = osg::DisplaySettings::instance().get(); @@ -76,6 +47,10 @@ int runApplication(int argc, char* argv[]) Q_INIT_RESOURCE(resources); +#ifdef WIN32 + Q_INIT_RESOURCE(dark); +#endif + qRegisterMetaType("std::string"); qRegisterMetaType("CSMWorld::UniversalId"); qRegisterMetaType("CSMDoc::Message"); @@ -83,7 +58,7 @@ int runApplication(int argc, char* argv[]) setQSurfaceFormat(); QCoreApplication::setAttribute(Qt::AA_ShareOpenGLContexts); - Application application(argc, argv); + Platform::Application application(argc, argv); application.setWindowIcon(QIcon(":openmw-cs")); diff --git a/apps/wizard/CMakeLists.txt b/apps/wizard/CMakeLists.txt index 444290f3a6..0bacde6575 100644 --- a/apps/wizard/CMakeLists.txt +++ b/apps/wizard/CMakeLists.txt @@ -56,13 +56,16 @@ source_group(wizard FILES ${WIZARD} ${WIZARD_HEADER}) set(QT_USE_QTGUI 1) +set (WIZARD_RES ${CMAKE_SOURCE_DIR}/files/wizard/wizard.qrc) + # Set some platform specific settings if(WIN32) + set(WIZARD_RES ${WIZARD_RES} ${CMAKE_SOURCE_DIR}/files/windows/QWindowsVistaDark/dark.qrc) set(GUI_TYPE WIN32) set(QT_USE_QTMAIN TRUE) endif(WIN32) -QT_ADD_RESOURCES(RCC_SRCS ${CMAKE_SOURCE_DIR}/files/wizard/wizard.qrc) +QT_ADD_RESOURCES(RCC_SRCS ${WIZARD_RES}) QT_WRAP_UI(UI_HDRS ${WIZARD_UI}) include_directories(${CMAKE_CURRENT_BINARY_DIR}) diff --git a/apps/wizard/main.cpp b/apps/wizard/main.cpp index e740f06015..09a34994e4 100644 --- a/apps/wizard/main.cpp +++ b/apps/wizard/main.cpp @@ -1,4 +1,3 @@ -#include #include #include @@ -6,6 +5,7 @@ #include #include +#include #include "mainwizard.hpp" @@ -23,7 +23,7 @@ int main(int argc, char* argv[]) configurationManager.addCommonOptions(description); configurationManager.readConfiguration(variables, description, true); - QApplication app(argc, argv); + Platform::Application app(argc, argv); // Now we make sure the current dir is set to application path QDir dir(QCoreApplication::applicationDirPath()); diff --git a/components/CMakeLists.txt b/components/CMakeLists.txt index a0695b9a5b..7380fdad68 100644 --- a/components/CMakeLists.txt +++ b/components/CMakeLists.txt @@ -546,6 +546,10 @@ if (USE_QT) qtconfigpath ) + add_component_qt_dir (platform + application + ) + QT_WRAP_UI(ESM_UI_HDR ${ESM_UI}) endif() diff --git a/components/platform/application.cpp b/components/platform/application.cpp new file mode 100644 index 0000000000..f60c689b98 --- /dev/null +++ b/components/platform/application.cpp @@ -0,0 +1,98 @@ +#include "application.hpp" + +#include +#include +#include + +#include +#include + +namespace Platform +{ + Application::Application(int& argc, char* argv[]) + : QApplication(argc, argv) + { +#if defined(WIN32) && QT_VERSION >= QT_VERSION_CHECK(6, 5, 0) + init(); + } + + void Application::init() + { + connect(this, &Application::darkModeChanged, this, &Application::updateStyle); + + const auto* hints = QGuiApplication::styleHints(); + const auto currentStyle = QApplication::style()->objectName(); + mInitialStyle = currentStyle.toStdString(); + mCurrentStyle = currentStyle.toStdString(); + if (hints->colorScheme() == Qt::ColorScheme::Dark) + { + mDarkMode = true; + if (currentStyle == "windowsvista") + { + mCurrentStyle = "windows"; + setStyle("windows"); + + QFile file(":/dark/dark.qss"); + file.open(QIODevice::ReadOnly); + setStyleSheet(file.readAll()); + } + } + } + + void Application::updateStyle(bool isDark) + { + if (mInitialStyle != "windowsvista") + return; + + if (isDark) + { + mCurrentStyle = "windows"; + setStyle("windows"); + + QFile file(":/dark/dark.qss"); + file.open(QIODevice::ReadOnly); + setStyleSheet(file.readAll()); + } + else + { + mCurrentStyle = mInitialStyle; + setStyleSheet(""); + setStyle(mInitialStyle.c_str()); + } +#endif + } + + bool Application::notify(QObject* receiver, QEvent* event) + { + try + { + if (event->type() == QEvent::ThemeChange || event->type() == QEvent::PaletteChange) + { +#if defined(WIN32) && QT_VERSION >= QT_VERSION_CHECK(6, 5, 0) + const auto* hints = QGuiApplication::styleHints(); + const auto currentStyle = QApplication::style()->objectName(); + bool isDark = hints->colorScheme() == Qt::ColorScheme::Dark; + if (isDark != mDarkMode) + { + mDarkMode = isDark; + + bool result = QApplication::notify(receiver, event); + + emit darkModeChanged(isDark); + + return result; + } +#endif + Misc::ScalableIcon::updateAllIcons(); + } + + return QApplication::notify(receiver, event); + } + catch (const std::exception& exception) + { + Log(Debug::Error) << "An exception has been caught: " << exception.what(); + } + + return false; + } +} diff --git a/components/platform/application.hpp b/components/platform/application.hpp new file mode 100644 index 0000000000..66954664d1 --- /dev/null +++ b/components/platform/application.hpp @@ -0,0 +1,30 @@ +#include +#include + +namespace Platform +{ + class Application : public QApplication + { + Q_OBJECT + + public: + Application(int& argc, char* argv[]); + +#if defined(WIN32) && QT_VERSION >= QT_VERSION_CHECK(6, 5, 0) + void init(); + + private slots: + void updateStyle(bool isDark); +#endif + + signals: + void darkModeChanged(bool); + + private: + bool notify(QObject* receiver, QEvent* event) override; + + std::string mCurrentStyle{}; + std::string mInitialStyle{}; + bool mDarkMode{ false }; + }; +} diff --git a/files/opencs/menu-close.svg b/files/opencs/menu-close.svg index 6bd1e9f275..fe2057dea9 100644 --- a/files/opencs/menu-close.svg +++ b/files/opencs/menu-close.svg @@ -21,7 +21,7 @@ @@ -194,9 +194,8 @@ id="path2014" d="m 11.1125,67.733337 a 1.5875,1.5875 0 0 1 -1.5875004,1.5875 1.5875,1.5875 0 0 1 -1.5875,-1.5875 1.5875,1.5875 0 0 1 1.5875,-1.5875 1.5875,1.5875 0 0 1 1.5875004,1.5875 z" /> + d="m 8.7312489,66.939571 0.5681496,0.793757 -0.5667706,0.793743 h 0.4505184 l 0.3418591,-0.477482 0.3418593,0.477482 H 10.31737 L 9.7505997,67.733328 10.318749,66.939571 H 9.8661687 l -0.3411633,0.477497 -0.341176,-0.477497 z" + style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-variant-east-asian:normal;font-feature-settings:normal;font-variation-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;shape-margin:0;inline-size:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.374994px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate;stop-color:#000000" + id="path1-5" /> diff --git a/files/opencs/menu-exit.svg b/files/opencs/menu-exit.svg index e1256eab72..147da511a1 100644 --- a/files/opencs/menu-exit.svg +++ b/files/opencs/menu-exit.svg @@ -21,7 +21,7 @@ diff --git a/files/opencs/qt.svg b/files/opencs/qt.svg index cc84a363e5..26cccc69d8 100644 --- a/files/opencs/qt.svg +++ b/files/opencs/qt.svg @@ -110,7 +110,7 @@ id="Green" gradientTransform="scale(3.7795276)"> diff --git a/files/windows/QWindowsVistaDark/checkbox-checked-disabled.svg b/files/windows/QWindowsVistaDark/checkbox-checked-disabled.svg new file mode 100644 index 0000000000..2c630f0b8a --- /dev/null +++ b/files/windows/QWindowsVistaDark/checkbox-checked-disabled.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/files/windows/QWindowsVistaDark/checkbox-checked.svg b/files/windows/QWindowsVistaDark/checkbox-checked.svg new file mode 100644 index 0000000000..a9164e1c72 --- /dev/null +++ b/files/windows/QWindowsVistaDark/checkbox-checked.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/files/windows/QWindowsVistaDark/checkbox-empty-disabled.svg b/files/windows/QWindowsVistaDark/checkbox-empty-disabled.svg new file mode 100644 index 0000000000..5e4660fd8a --- /dev/null +++ b/files/windows/QWindowsVistaDark/checkbox-empty-disabled.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/files/windows/QWindowsVistaDark/checkbox-empty.svg b/files/windows/QWindowsVistaDark/checkbox-empty.svg new file mode 100644 index 0000000000..43dd3887ce --- /dev/null +++ b/files/windows/QWindowsVistaDark/checkbox-empty.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/files/windows/QWindowsVistaDark/checkbox-half-disabled.svg b/files/windows/QWindowsVistaDark/checkbox-half-disabled.svg new file mode 100644 index 0000000000..ade83d8df5 --- /dev/null +++ b/files/windows/QWindowsVistaDark/checkbox-half-disabled.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/files/windows/QWindowsVistaDark/checkbox-half.svg b/files/windows/QWindowsVistaDark/checkbox-half.svg new file mode 100644 index 0000000000..4f6aa9a032 --- /dev/null +++ b/files/windows/QWindowsVistaDark/checkbox-half.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/files/windows/QWindowsVistaDark/dark.qrc b/files/windows/QWindowsVistaDark/dark.qrc new file mode 100644 index 0000000000..37ab88d265 --- /dev/null +++ b/files/windows/QWindowsVistaDark/dark.qrc @@ -0,0 +1,31 @@ + + + dark.qss + checkbox-checked.svg + checkbox-checked-disabled.svg + checkbox-empty.svg + checkbox-empty-disabled.svg + checkbox-half.svg + checkbox-half-disabled.svg + dockwidget-close.svg + dockwidget-undock.svg + down-triangle.svg + down-triangle-spinbox.svg + dropdown-arrow.svg + left-triangle-tabbar.svg + radiobutton-checked.svg + radiobutton-checked-disabled.svg + radiobutton-empty.svg + radiobutton-empty-disabled.svg + right-triangle-tabbar.svg + scrollbar-arrow-down.svg + scrollbar-arrow-left.svg + scrollbar-arrow-right.svg + scrollbar-arrow-up.svg + size-grip.svg + table-header-sort-arrow-down.svg + table-header-sort-arrow-up.svg + up-triangle.svg + up-triangle-spinbox.svg + + diff --git a/files/windows/QWindowsVistaDark/dark.qss b/files/windows/QWindowsVistaDark/dark.qss new file mode 100644 index 0000000000..f3ec5537c5 --- /dev/null +++ b/files/windows/QWindowsVistaDark/dark.qss @@ -0,0 +1,618 @@ +QMenu +{ + border: 1px solid #4e4e4e; +} +QMenuBar +{ + background-color: #232323; + color: #dcdcdc; + border: 0px; +} +QMenu, QMessageBox +{ + background-color: #232323; + color: #dcdcdc; + border: 1px solid #4e4e4e; +} +QScrollArea +{ + border: 1px solid #4e4e4e; +} +QMenuBar::item +{ + background-color: #232323; + color: #dcdcdc; +} +QMenuBar +{ + border-color: #404040; +} +QMenuBar::item:hover, QMenuBar::item:selected, QMenu::item:hover, QMenu::item:selected +{ + background-color: #404040; + color: #dcdcdc; +} +QMenuBar::item:disabled, QMenu::item:disabled +{ + color: #919191; +} +QMenu::separator +{ + height: 1px; + background-color: #4e4e4e; + margin-left: 2px; + margin-right: 2px; + margin-top: 5px; + margin-bottom: 5px; +} + +QToolTip, QColumnView, QListView, QTableView, QTableWidget, QTreeView +{ + background-color: #232323; + alternate-background-color: #282828; + border: 1px solid #4e4e4e; + selection-background-color: #505050; + gridline-color: #606060; +} + +QHeaderView::section +{ + background-color: #232323; + border: 0px; + border-right: 1px solid #4e4e4e; +} +QHeaderView::section:hover, QHeaderView::section:checked +{ + background-color: #202020; +} +QHeaderView::down-arrow +{ + subcontrol-origin: content; + subcontrol-position: right; + image: url(:/dark/table-header-sort-arrow-down.svg); + width: 10px; + height: 7px; + background: transparent; + left: -5px; +} +QHeaderView::up-arrow +{ + subcontrol-origin: content; + subcontrol-position: right; + image: url(:/dark/table-header-sort-arrow-up.svg); + width: 10px; + height: 7px; + background: transparent; + left: -5px; +} + +QTabWidget::pane +{ + border: 1px solid #4e4e4e; + top: -1px; +} +QTabBar +{ + outline: 0px; +} +QTabBar::tab +{ + background-color: #232323; + border-left: 1px solid #4e4e4e; + border-right: 1px solid #4e4e4e; + border-top: 1px solid #4e4e4e; + border-bottom: 1px solid #4e4e4e; + padding-top: 2px; + padding-bottom: 2px; + padding-left: 9px; + padding-right: 10px; + margin-right: -1px; +} +QTabBar::tab:only-one +{ + margin-right: 0px; +} +QTabBar::tab:last +{ + margin-right: 0px; +} +QTabBar::tab:hover +{ + background-color: #404040; +} +QTabBar::tab:selected +{ + border-bottom: 0px; + background-color: #1e1e1e; + padding-bottom: 4px; +} +QTabBar::tab:!selected +{ + margin-top: 2px; +} + +QProgressBar +{ + background-color: #1e1e1e; + border: 1px solid #4e4e4e; + color: #dfe1e2; + text-align: center; +} +QProgressBar:disabled +{ + background-color: #1e1e1e; + border: 1px solid #4e4e4e; + color: #788d9c; + text-align: center; +} +QProgressBar::chunk +{ + background-color: #0e651e; + color: #19232D; +} +QProgressBar::chunk:disabled +{ + background-color: #404040; + color: #788D9C; +} + +QSizeGrip +{ + image: url(:/dark/size-grip.svg); +} + +QDockWidget +{ + background-color: #232323; + titlebar-close-icon: url(:/dark/dockwidget-close.svg); + titlebar-normal-icon: url(:/dark/dockwidget-undock.svg); +} +QDockWidget::title +{ + background-color: #212121; +} +QDockWidget::float-button +{ + border: 0; +} +QDockWidget::close-button +{ + border: 0; +} +QDockWidget::float-button:hover +{ + background-color: #4e4e4e; +} +QDockWidget::float-button:pressed +{ + background-color: #5e5e5e; +} +QDockWidget::close-button:hover +{ + background-color: #4e4e4e; +} +QDockWidget::close-button:pressed +{ + background-color: #5e5e5e; +} + +QPushButton +{ + background-color: #232323; + border: 1px solid #4e4e4e; + padding: 2px; +} + +QToolButton[autoRaise="false"] +{ + background-color: #232323; + border: 1px solid #4e4e4e; + padding: 2px; +} + +QWizard QPushButton +{ + min-width: 67px; +} +QDialogButtonBox QPushButton +{ + min-width: 67px; +} +QPushButton:hover, QToolButton:hover +{ + background-color: #404040; +} +QDialogButtonBox QPushButton:focus, QToolButton:focus +{ + border: 2px solid #7e7e7e; +} +QPushButton:pressed, QToolButton:pressed +{ + border: 1px solid #7e7e7e; +} +QPushButton:selected, QToolButton:selected +{ + border: 1px solid #7e7e7e; +} +QPushButton:disabled, QToolButton:disabled +{ + background-color: #313131; +} + +/* the dropdownarrow on the right of the button in menu popup mode */ +QToolButton[popupMode="1"] +{ + padding-right: 19px; +} +QToolButton::menu-button +{ + border: 0px; + border-left: 1px solid #4e4e4e; + width: 18px; +} +QToolButton::menu-arrow +{ + image: url(:/dark/down-triangle.svg); + width: 14px; +} + +QToolBar +{ + border: 0px; +} +QToolBar QToolButton +{ + border: 0px; + padding: 0px; + padding-left: 3px; + padding-right: 2px; + background-color: #1e1e1e; +} +QToolBar QToolButton:hover +{ + background-color: #404040; +} +QToolBar QToolButton:checked +{ + background-color: #505050; +} +QToolBar QToolButton:focus +{ + background-color: #404040; +} +QToolBar QToolButton:disabled +{ + background-color: #242424; +} +QToolBar::separator +{ + min-width: 0px; + width: 1px; + margin-left: 3px; + margin-right: 2px; + background-color: #4e4e4e; +} + +QGroupBox +{ + border: 1px solid #4e4e4e; + margin-top: 9px; + padding-top: 7px; + padding-bottom: 0px; + padding-left: 1px; + padding-right: 1px; +} +QGroupBox::title +{ + subcontrol-origin: margin; + subcontrol-position: top left; + left: 9px; + padding-top: 1px; + min-width: 0px; +} + +QLineEdit, QTextEdit, QPlainTextEdit +{ + border: 1px solid #4e4e4e; +} +QLineEdit:disabled, QTextEdit, QPlainTextEdit:disabled +{ + background-color: #313131; +} + +QComboBox +{ + background-color: #232323; + border: 1px solid #4e4e4e; + margin: 0px; + padding-left: 3px; + padding-right: 3px; + padding-top: 1px; + padding-bottom: 1px; +} +QComboBox:disabled +{ + background-color: #313131; +} +QComboBox:selected +{ + background-color: #404040; +} +QComboBox:editable { + background-color: #232323; +} +QComboBox::drop-down +{ + border: 0px; +} +QComboBox::down-arrow +{ + image: url(:/dark/dropdown-arrow.svg); + height: 10px; + width: 15px; +} +QComboBox QAbstractItemView +{ + background-color: #232323; + selection-background-color: #404040; + border: 1px solid #4e4e4e; + padding: 0px; + margin: 0px; + outline: 0px; +} +QComboBox QAbstractItemView::item:selected +{ + color: #dcdcdc; + background-color: #404040; +} +QComboBox QAbstractItemView::item:last +{ + border: 0px; +} + +QScrollBar:vertical +{ + border: 0px; + background: #2a2a2a; + width: 15px; + margin: 15px 0px; +} +QScrollBar::handle:vertical +{ + border: 0px; + background: #606060; + min-height: 20px; +} +QScrollBar::add-line:vertical +{ + border: 0px; + background: #232323; + height: 15px; + subcontrol-position: bottom; + subcontrol-origin: margin; +} +QScrollBar::sub-line:vertical +{ + border: 0px; + background: #232323; + height: 15px; + subcontrol-position: top; + subcontrol-origin: margin; +} +QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical +{ + border: 0px; + background: none; +} +QScrollBar::up-arrow:vertical +{ + image: url(:/dark/scrollbar-arrow-up.svg); + height: 15px; +} +QScrollBar::down-arrow:vertical +{ + image: url(:/dark/scrollbar-arrow-down.svg); + height: 15px; +} +QScrollBar:horizontal +{ + border: 0px; + background: #2a2a2a; + height: 15px; + margin: 0px 15px; +} +QScrollBar::handle:horizontal +{ + border: 0px; + background: #606060; + min-width: 20px; +} +QScrollBar::add-line:horizontal +{ + border: 0px; + background: #232323; + width: 15px; + subcontrol-position: right; + subcontrol-origin: margin; +} +QScrollBar::sub-line:horizontal +{ + border: 0px; + background: #232323; + width: 15px; + subcontrol-position: left; + subcontrol-origin: margin; +} +QScrollBar::add-page:horizontal, QScrollBar::sub-page:horizontal +{ + border: 0px; + background: none; +} +QScrollBar::left-arrow:horizontal +{ + image: url(:/dark/scrollbar-arrow-left.svg); + width: 15px; +} +QScrollBar::right-arrow:horizontal +{ + image: url(:/dark/scrollbar-arrow-right.svg); + width: 15px; +} + +QSpinBox, QDateEdit, QDateTimeEdit, QTimeEdit, QDoubleSpinBox +{ + border: 1px solid #4e4e4e; + padding-right: 15px; +} +QSpinBox:disabled, QDateEdit:disabled, QDateTimeEdit:disabled, QTimeEdit:disabled, QDoubleSpinBox:disabled +{ + background-color: #313131; +} +QSpinBox::up-button, QDateEdit::up-button, QDateTimeEdit::up-button, QTimeEdit::up-button, QDoubleSpinBox::up-button +{ + border: 1px solid #4e4e4e; + subcontrol-origin: margin; + subcontrol-position: top right; + width: 12px; + height: 6px; + margin: 2px 2px; +} +QSpinBox::down-button, QDateEdit::down-button, QDateTimeEdit::down-button, QTimeEdit::down-button, QDoubleSpinBox::down-button +{ + border: 1px solid #4e4e4e; + subcontrol-origin: margin; + subcontrol-position: bottom right; + width: 12px; + height: 6px; + margin: 2px 2px; +} +QSpinBox::up-button:hover, QDateEdit::up-button:hover, QDateTimeEdit::up-button:hover, QTimeEdit::up-button:hover, QDoubleSpinBox::up-button:hover +{ + background-color: #404040; +} +QSpinBox::down-button:hover, QDateEdit::down-button:hover, QDateTimeEdit::down-button:hover, QTimeEdit::down-button:hover, QDoubleSpinBox::down-button:hover +{ + background-color: #404040; +} +QSpinBox::up-arrow, QDateEdit::up-arrow, QDateTimeEdit::up-arrow, QTimeEdit::up-arrow, QDoubleSpinBox::up-arrow +{ + image: url(:/dark/up-triangle-spinbox.svg); + width: 10px; + height: 5px; +} +QSpinBox::down-arrow, QDateEdit::down-arrow, QDateTimeEdit::down-arrow, QTimeEdit::down-arrow, QDoubleSpinBox::down-arrow +{ + image: url(:/dark/down-triangle-spinbox.svg); + width: 10px; + height: 5px; +} + +QSlider::handle +{ + background-color: #dcdcdc; +} +QSlider::handle:disabled +{ + background-color: #4e4e4e; +} + +QCheckBox +{ + padding: 2px 0px; +} +QCheckBox::indicator +{ + padding: 0px; + margin: 0px; + border: 0px; + width: 13px; + height: 13px; +} +QCheckBox::indicator:unchecked, QObject::indicator:unchecked +{ + image: url(:/dark/checkbox-empty.svg); +} +QCheckBox::indicator:unchecked:disabled, QObject::indicator:unchecked:disabled +{ + image: url(:/dark/checkbox-empty-disabled.svg); +} +QCheckBox::indicator:checked, QObject::indicator:checked +{ + image: url(:/dark/checkbox-checked.svg); +} +QCheckBox::indicator:checked:disabled, QObject::indicator:checked:disabled +{ + image: url(:/dark/checkbox-checked-disabled.svg); +} +QCheckBox::indicator:indeterminate, QObject::indicator:indeterminate +{ + image: url(:/dark/checkbox-half.svg); +} +QCheckBox::indicator:indeterminate:disabled, QObject::indicator:indeterminate:disabled +{ + image: url(:/dark/checkbox-half-disabled.svg); +} + +QRadioButton +{ + padding: 2px 0px; +} +QRadioButton::indicator +{ + padding: 0px; + margin: 0px; + border: 0px; + width: 13px; + height: 13px; +} +QRadioButton::indicator:unchecked +{ + image: url(:/dark/radiobutton-empty.svg); +} +QRadioButton::indicator:unchecked:disabled +{ + image: url(:/dark/radiobutton-empty-disabled.svg); +} +QRadioButton::indicator:checked +{ + image: url(:/dark/radiobutton-checked.svg); +} +QRadioButton::indicator:checked:disabled +{ + image: url(:/dark/radiobutton-checked-disabled.svg); +} + +QListView::indicator:unchecked +{ + image: url(:/dark/checkbox-empty.svg); +} +QListView::indicator:checked +{ + image: url(:/dark/checkbox-checked.svg); +} +QListView::indicator:indeterminate +{ + image: url(:/dark/checkbox-half.svg); +} + +QTabBar QToolButton +{ + background-color: #232323; + min-width: 0px; +} +QTabBar QToolButton::left-arrow +{ + image: url(:/dark/left-triangle-tabbar.svg); +} +QTabBar QToolButton::right-arrow +{ + image: url(:/dark/right-triangle-tabbar.svg); +} +QTableCornerButton::section +{ + background-color: #232323; + border: 1px solid #4e4e4e; + border-top: 0px; + border-left: 0px; + border-bottom: 0px; +} diff --git a/files/windows/QWindowsVistaDark/dockwidget-close.svg b/files/windows/QWindowsVistaDark/dockwidget-close.svg new file mode 100644 index 0000000000..a58a58caa9 --- /dev/null +++ b/files/windows/QWindowsVistaDark/dockwidget-close.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/files/windows/QWindowsVistaDark/dockwidget-undock.svg b/files/windows/QWindowsVistaDark/dockwidget-undock.svg new file mode 100644 index 0000000000..a3d7563030 --- /dev/null +++ b/files/windows/QWindowsVistaDark/dockwidget-undock.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/files/windows/QWindowsVistaDark/down-triangle-spinbox.svg b/files/windows/QWindowsVistaDark/down-triangle-spinbox.svg new file mode 100644 index 0000000000..4c33227289 --- /dev/null +++ b/files/windows/QWindowsVistaDark/down-triangle-spinbox.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/files/windows/QWindowsVistaDark/down-triangle.svg b/files/windows/QWindowsVistaDark/down-triangle.svg new file mode 100644 index 0000000000..33227a8385 --- /dev/null +++ b/files/windows/QWindowsVistaDark/down-triangle.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/files/windows/QWindowsVistaDark/dropdown-arrow.svg b/files/windows/QWindowsVistaDark/dropdown-arrow.svg new file mode 100644 index 0000000000..7462030402 --- /dev/null +++ b/files/windows/QWindowsVistaDark/dropdown-arrow.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/files/windows/QWindowsVistaDark/left-triangle-tabbar.svg b/files/windows/QWindowsVistaDark/left-triangle-tabbar.svg new file mode 100644 index 0000000000..01b2c6ad35 --- /dev/null +++ b/files/windows/QWindowsVistaDark/left-triangle-tabbar.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/files/windows/QWindowsVistaDark/radiobutton-checked-disabled.svg b/files/windows/QWindowsVistaDark/radiobutton-checked-disabled.svg new file mode 100644 index 0000000000..7cef56e7c8 --- /dev/null +++ b/files/windows/QWindowsVistaDark/radiobutton-checked-disabled.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/files/windows/QWindowsVistaDark/radiobutton-checked.svg b/files/windows/QWindowsVistaDark/radiobutton-checked.svg new file mode 100644 index 0000000000..3f1a655397 --- /dev/null +++ b/files/windows/QWindowsVistaDark/radiobutton-checked.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/files/windows/QWindowsVistaDark/radiobutton-empty-disabled.svg b/files/windows/QWindowsVistaDark/radiobutton-empty-disabled.svg new file mode 100644 index 0000000000..693e47d72d --- /dev/null +++ b/files/windows/QWindowsVistaDark/radiobutton-empty-disabled.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/files/windows/QWindowsVistaDark/radiobutton-empty.svg b/files/windows/QWindowsVistaDark/radiobutton-empty.svg new file mode 100644 index 0000000000..11bfe01b83 --- /dev/null +++ b/files/windows/QWindowsVistaDark/radiobutton-empty.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/files/windows/QWindowsVistaDark/right-triangle-tabbar.svg b/files/windows/QWindowsVistaDark/right-triangle-tabbar.svg new file mode 100644 index 0000000000..8829c91647 --- /dev/null +++ b/files/windows/QWindowsVistaDark/right-triangle-tabbar.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/files/windows/QWindowsVistaDark/scrollbar-arrow-down.svg b/files/windows/QWindowsVistaDark/scrollbar-arrow-down.svg new file mode 100644 index 0000000000..af3da3e57d --- /dev/null +++ b/files/windows/QWindowsVistaDark/scrollbar-arrow-down.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/files/windows/QWindowsVistaDark/scrollbar-arrow-left.svg b/files/windows/QWindowsVistaDark/scrollbar-arrow-left.svg new file mode 100644 index 0000000000..fe7fb8849b --- /dev/null +++ b/files/windows/QWindowsVistaDark/scrollbar-arrow-left.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/files/windows/QWindowsVistaDark/scrollbar-arrow-right.svg b/files/windows/QWindowsVistaDark/scrollbar-arrow-right.svg new file mode 100644 index 0000000000..4a8ea9739b --- /dev/null +++ b/files/windows/QWindowsVistaDark/scrollbar-arrow-right.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/files/windows/QWindowsVistaDark/scrollbar-arrow-up.svg b/files/windows/QWindowsVistaDark/scrollbar-arrow-up.svg new file mode 100644 index 0000000000..119ff9de25 --- /dev/null +++ b/files/windows/QWindowsVistaDark/scrollbar-arrow-up.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/files/windows/QWindowsVistaDark/size-grip.svg b/files/windows/QWindowsVistaDark/size-grip.svg new file mode 100644 index 0000000000..9c530e4b61 --- /dev/null +++ b/files/windows/QWindowsVistaDark/size-grip.svg @@ -0,0 +1,54 @@ + + + + + + + + + + + + diff --git a/files/windows/QWindowsVistaDark/table-header-sort-arrow-down.svg b/files/windows/QWindowsVistaDark/table-header-sort-arrow-down.svg new file mode 100644 index 0000000000..f9eab3ee41 --- /dev/null +++ b/files/windows/QWindowsVistaDark/table-header-sort-arrow-down.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/files/windows/QWindowsVistaDark/table-header-sort-arrow-up.svg b/files/windows/QWindowsVistaDark/table-header-sort-arrow-up.svg new file mode 100644 index 0000000000..ed4a4822af --- /dev/null +++ b/files/windows/QWindowsVistaDark/table-header-sort-arrow-up.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/files/windows/QWindowsVistaDark/up-triangle-spinbox.svg b/files/windows/QWindowsVistaDark/up-triangle-spinbox.svg new file mode 100644 index 0000000000..4dc1312209 --- /dev/null +++ b/files/windows/QWindowsVistaDark/up-triangle-spinbox.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/files/windows/QWindowsVistaDark/up-triangle.svg b/files/windows/QWindowsVistaDark/up-triangle.svg new file mode 100644 index 0000000000..d8be2c7d92 --- /dev/null +++ b/files/windows/QWindowsVistaDark/up-triangle.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file