remove old frameless window solution
@@ -214,7 +214,6 @@ include_directories(PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
# And do the job.
|
||||
INCLUDE_DIRECTORIES("${CMAKE_SOURCE_DIR}/src" )
|
||||
INCLUDE_DIRECTORIES("${CMAKE_SOURCE_DIR}/src/noggit/ui/style/framelesswindow" )
|
||||
INCLUDE_DIRECTORIES("${CMAKE_SOURCE_DIR}/src/external/PNG2BLP" )
|
||||
INCLUDE_DIRECTORIES("${CMAKE_SOURCE_DIR}/src/external/PNG2BLP/libimagequant" )
|
||||
INCLUDE_DIRECTORIES("${CMAKE_SOURCE_DIR}/src/external/PNG2BLP/libpng" )
|
||||
|
||||
@@ -1,73 +0,0 @@
|
||||
/*
|
||||
###############################################################################
|
||||
# #
|
||||
# The MIT License #
|
||||
# #
|
||||
# Copyright (C) 2017 by Juergen Skrotzky (JorgenVikingGod@gmail.com) #
|
||||
# >> https://github.com/Jorgen-VikingGod #
|
||||
# #
|
||||
# Sources: https://github.com/Jorgen-VikingGod/Qt-Frameless-Window-DarkStyle #
|
||||
# #
|
||||
###############################################################################
|
||||
*/
|
||||
|
||||
#include "DarkStyle.h"
|
||||
|
||||
DarkStyle::DarkStyle() : DarkStyle(styleBase()) {}
|
||||
|
||||
DarkStyle::DarkStyle(QStyle *style) : QProxyStyle(style) {}
|
||||
|
||||
QStyle *DarkStyle::styleBase(QStyle *style) const {
|
||||
static QStyle *base =
|
||||
!style ? QStyleFactory::create(QStringLiteral("Fusion")) : style;
|
||||
return base;
|
||||
}
|
||||
|
||||
QStyle *DarkStyle::baseStyle() const { return styleBase(); }
|
||||
|
||||
void DarkStyle::polish(QPalette &palette) {
|
||||
// modify palette to dark
|
||||
palette.setColor(QPalette::Window, QColor(53, 53, 53));
|
||||
palette.setColor(QPalette::WindowText, Qt::white);
|
||||
palette.setColor(QPalette::Disabled, QPalette::WindowText,
|
||||
QColor(127, 127, 127));
|
||||
palette.setColor(QPalette::Base, QColor(42, 42, 42));
|
||||
palette.setColor(QPalette::AlternateBase, QColor(66, 66, 66));
|
||||
palette.setColor(QPalette::ToolTipBase, Qt::white);
|
||||
palette.setColor(QPalette::ToolTipText, QColor(53, 53, 53));
|
||||
palette.setColor(QPalette::Text, Qt::white);
|
||||
palette.setColor(QPalette::Disabled, QPalette::Text, QColor(127, 127, 127));
|
||||
palette.setColor(QPalette::Dark, QColor(35, 35, 35));
|
||||
palette.setColor(QPalette::Shadow, QColor(20, 20, 20));
|
||||
palette.setColor(QPalette::Button, QColor(53, 53, 53));
|
||||
palette.setColor(QPalette::ButtonText, Qt::white);
|
||||
palette.setColor(QPalette::Disabled, QPalette::ButtonText,
|
||||
QColor(127, 127, 127));
|
||||
palette.setColor(QPalette::BrightText, Qt::red);
|
||||
palette.setColor(QPalette::Link, QColor(42, 130, 218));
|
||||
palette.setColor(QPalette::Highlight, QColor(42, 130, 218));
|
||||
palette.setColor(QPalette::Disabled, QPalette::Highlight, QColor(80, 80, 80));
|
||||
palette.setColor(QPalette::HighlightedText, Qt::white);
|
||||
palette.setColor(QPalette::Disabled, QPalette::HighlightedText,
|
||||
QColor(127, 127, 127));
|
||||
}
|
||||
|
||||
void DarkStyle::polish(QApplication *app) {
|
||||
if (!app) return;
|
||||
|
||||
// increase font size for better reading,
|
||||
// setPointSize was reduced from +2 because when applied this way in Qt5, the
|
||||
// font is larger than intended for some reason
|
||||
QFont defaultFont = QApplication::font();
|
||||
defaultFont.setPointSize(defaultFont.pointSize() + 1);
|
||||
app->setFont(defaultFont);
|
||||
|
||||
// loadstylesheet
|
||||
QFile qfDarkstyle(QStringLiteral(":/darkstyle/darkstyle.qss"));
|
||||
if (qfDarkstyle.open(QIODevice::ReadOnly | QIODevice::Text)) {
|
||||
// set stylesheet
|
||||
QString qsStylesheet = QString::fromLatin1(qfDarkstyle.readAll());
|
||||
app->setStyleSheet(qsStylesheet);
|
||||
qfDarkstyle.close();
|
||||
}
|
||||
}
|
||||
@@ -1,39 +0,0 @@
|
||||
/*
|
||||
###############################################################################
|
||||
# #
|
||||
# The MIT License #
|
||||
# #
|
||||
# Copyright (C) 2017 by Juergen Skrotzky (JorgenVikingGod@gmail.com) #
|
||||
# >> https://github.com/Jorgen-VikingGod #
|
||||
# #
|
||||
# Sources: https://github.com/Jorgen-VikingGod/Qt-Frameless-Window-DarkStyle #
|
||||
# #
|
||||
###############################################################################
|
||||
*/
|
||||
|
||||
#ifndef DARKSTYLE_HPP
|
||||
#define DARKSTYLE_HPP
|
||||
|
||||
#include <QApplication>
|
||||
#include <QFile>
|
||||
#include <QFont>
|
||||
#include <QProxyStyle>
|
||||
#include <QStyleFactory>
|
||||
|
||||
class DarkStyle : public QProxyStyle {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
DarkStyle();
|
||||
explicit DarkStyle(QStyle *style);
|
||||
|
||||
QStyle *baseStyle() const;
|
||||
|
||||
void polish(QPalette &palette) override;
|
||||
void polish(QApplication *app) override;
|
||||
|
||||
private:
|
||||
QStyle *styleBase(QStyle *style = Q_NULLPTR) const;
|
||||
};
|
||||
|
||||
#endif // DARKSTYLE_HPP
|
||||
@@ -1,343 +0,0 @@
|
||||
QToolTip{
|
||||
color:#ffffff;
|
||||
background-color:palette(base);
|
||||
border:1px solid palette(highlight);
|
||||
border-radius:4px;
|
||||
}
|
||||
QStatusBar{
|
||||
background-color:qlineargradient(x1:0,y1:0,x2:0,y2:1,stop:0 rgba(25,25,25,127),stop:1 rgba(53,53,53,75));
|
||||
color:palette(mid);
|
||||
}
|
||||
QMenuBar{
|
||||
background-color:qlineargradient(x1:0,y1:0,x2:0,y2:1,stop:0 rgba(25,25,25,127),stop:1 rgba(53,53,53,75));
|
||||
border-bottom:2px solid rgba(25,25,25,75);
|
||||
}
|
||||
QMenuBar::item{
|
||||
spacing:2px;
|
||||
padding:3px 4px;
|
||||
background:transparent;
|
||||
}
|
||||
QMenuBar::item:selected{
|
||||
background-color:qlineargradient(x1:0,y1:0,x2:0,y2:1,stop:0 rgba(106,106,106,255),stop:1 rgba(106,106,106,75));
|
||||
border-left:1px solid rgba(106,106,106,127);
|
||||
border-right:1px solid rgba(106,106,106,127);
|
||||
}
|
||||
QMenuBar::item:pressed{
|
||||
background-color:palette(highlight);
|
||||
border-left:1px solid rgba(25,25,25,127);
|
||||
border-right:1px solid rgba(25,25,25,127);
|
||||
}
|
||||
QMenu{
|
||||
background-color:palette(window);
|
||||
border:1px solid palette(shadow);
|
||||
}
|
||||
QMenu::item{
|
||||
padding:3px 25px 3px 25px;
|
||||
border:1px solid transparent;
|
||||
}
|
||||
QMenu::item:disabled{
|
||||
background-color:rgba(35,35,35,127);
|
||||
color:palette(disabled);
|
||||
}
|
||||
QMenu::item:selected{
|
||||
border-color:rgba(147,191,236,127);
|
||||
background:palette(highlight);
|
||||
}
|
||||
QMenu::icon:checked{
|
||||
background-color:qlineargradient(x1:0,y1:1,x2:0,y2:0,stop:0 rgba(25,25,25,127),stop:1 rgba(53,53,53,75));
|
||||
border:1px solid palette(highlight);
|
||||
border-radius:2px;
|
||||
}
|
||||
QMenu::separator{
|
||||
height:1px;
|
||||
background:palette(alternate-base);
|
||||
margin-left:5px;
|
||||
margin-right:5px;
|
||||
}
|
||||
QMenu::indicator{
|
||||
width:18px;
|
||||
height:18px;
|
||||
}
|
||||
QMenu::indicator:non-exclusive:checked{
|
||||
image:url(:/darkstyle/icon_checkbox_checked.png);
|
||||
padding-left:2px;
|
||||
}
|
||||
QMenu::indicator:non-exclusive:unchecked{
|
||||
image:url(:/darkstyle/icon_checkbox_unchecked.png);
|
||||
padding-left:2px;
|
||||
}
|
||||
QMenu::indicator:exclusive:checked{
|
||||
image:url(:/darkstyle/icon_radiobutton_checked.png);
|
||||
padding-left:2px;
|
||||
}
|
||||
QMenu::indicator:exclusive:unchecked{
|
||||
image:url(:/darkstyle/icon_radiobutton_unchecked.png);
|
||||
padding-left:2px;
|
||||
}
|
||||
QToolBar::top{
|
||||
background-color:qlineargradient(x1:0,y1:0,x2:0,y2:1,stop:0 rgba(25,25,25,127),stop:1 rgba(53,53,53,75));
|
||||
border-bottom:3px solid qlineargradient(x1:0,y1:0,x2:0,y2:1,stop:0 rgba(25,25,25,127),stop:1 rgba(53,53,53,75));
|
||||
}
|
||||
QToolBar::bottom{
|
||||
background-color:qlineargradient(x1:0,y1:1,x2:0,y2:0,stop:0 rgba(25,25,25,127),stop:1 rgba(53,53,53,75));
|
||||
border-top:3px solid qlineargradient(x1:0,y1:1,x2:0,y2:0,stop:0 rgba(25,25,25,127),stop:1 rgba(53,53,53,75));
|
||||
}
|
||||
QToolBar::left{
|
||||
background-color:qlineargradient(x1:0,y1:0,x2:1,y2:0,stop:0 rgba(25,25,25,127),stop:1 rgba(53,53,53,75));
|
||||
border-right:3px solid qlineargradient(x1:0,y1:0,x2:1,y2:0,stop:0 rgba(25,25,25,127),stop:1 rgba(53,53,53,75));
|
||||
}
|
||||
QToolBar::right{
|
||||
background-color:qlineargradient(x1:1,y1:0,x2:0,y2:0,stop:0 rgba(25,25,25,127),stop:1 rgba(53,53,53,75));
|
||||
border-left:3px solid qlineargradient(x1:1,y1:0,x2:0,y2:0,stop:0 rgba(25,25,25,127),stop:1 rgba(53,53,53,75));
|
||||
}
|
||||
QMainWindow::separator{
|
||||
width:6px;
|
||||
height:5px;
|
||||
padding:2px;
|
||||
}
|
||||
QSplitter::handle:horizontal{
|
||||
width:10px;
|
||||
}
|
||||
QSplitter::handle:vertical{
|
||||
height:10px;
|
||||
}
|
||||
QMainWindow::separator:hover,QSplitter::handle:hover{
|
||||
background:palette(highlight);
|
||||
}
|
||||
QDockWidget::title{
|
||||
padding:4px;
|
||||
background-color:qlineargradient(x1:0,y1:1,x2:0,y2:0,stop:0 rgba(25,25,25,127),stop:1 rgba(53,53,53,75));
|
||||
border:1px solid rgba(25,25,25,75);
|
||||
border-bottom:2px solid rgba(25,25,25,75);
|
||||
}
|
||||
QDockWidget{
|
||||
titlebar-close-icon:url(:/darkstyle/icon_close.png);
|
||||
titlebar-normal-icon:url(:/darkstyle/icon_restore.png);
|
||||
}
|
||||
QDockWidget::close-button,QDockWidget::float-button{
|
||||
subcontrol-position:top right;
|
||||
subcontrol-origin:margin;
|
||||
position:absolute;
|
||||
top:3px;
|
||||
bottom:0px;
|
||||
width:20px;
|
||||
height:20px;
|
||||
}
|
||||
QDockWidget::close-button{
|
||||
right:3px;
|
||||
}
|
||||
QDockWidget::float-button{
|
||||
right:25px;
|
||||
}
|
||||
QGroupBox{
|
||||
background-color:rgba(66,66,66,50%);
|
||||
margin-top:27px;
|
||||
border:1px solid rgba(25,25,25,127);
|
||||
border-radius:4px;
|
||||
}
|
||||
QGroupBox::title{
|
||||
subcontrol-origin:margin;
|
||||
subcontrol-position:left top;
|
||||
padding:4px 6px;
|
||||
margin-left:3px;
|
||||
background-color:qlineargradient(x1:0,y1:1,x2:0,y2:0,stop:0 rgba(25,25,25,127),stop:1 rgba(53,53,53,75));
|
||||
border:1px solid rgba(25,25,25,75);
|
||||
border-bottom:2px solid rgb(127,127,127);
|
||||
border-top-left-radius:4px;
|
||||
border-top-right-radius:4px;
|
||||
}
|
||||
QTabWidget::pane{
|
||||
background-color:rgba(66,66,66,50%);
|
||||
border-top:1px solid rgba(25,25,25,50%);
|
||||
}
|
||||
QTabWidget::tab-bar{
|
||||
left:3px;
|
||||
top:1px;
|
||||
}
|
||||
QTabBar{
|
||||
background-color:transparent;
|
||||
qproperty-drawBase:0;
|
||||
border-bottom:1px solid rgba(25,25,25,50%);
|
||||
}
|
||||
QTabBar::tab{
|
||||
padding:4px 6px;
|
||||
background-color:qlineargradient(x1:0,y1:1,x2:0,y2:0,stop:0 rgba(25,25,25,127),stop:1 rgba(53,53,53,75));
|
||||
border:1px solid rgba(25,25,25,75);
|
||||
border-top-left-radius:4px;
|
||||
border-top-right-radius:4px;
|
||||
}
|
||||
QTabBar::tab:selected,QTabBar::tab:hover{
|
||||
background-color:qlineargradient(x1:0,y1:0,x2:0,y2:1,stop:0 rgba(53,53,53,127),stop:1 rgba(66,66,66,50%));
|
||||
border-bottom-color:rgba(66,66,66,75%);
|
||||
}
|
||||
QTabBar::tab:selected{
|
||||
border-bottom:2px solid palette(highlight);
|
||||
}
|
||||
QTabBar::tab::selected:disabled{
|
||||
border-bottom:2px solid rgb(127,127,127);
|
||||
}
|
||||
QTabBar::tab:!selected{
|
||||
margin-top:2px;
|
||||
}
|
||||
QCheckBox::indicator{
|
||||
width:18px;
|
||||
height:18px;
|
||||
}
|
||||
QCheckBox::indicator:checked,QTreeView::indicator:checked,QTableView::indicator:checked,QGroupBox::indicator:checked{
|
||||
image:url(:/darkstyle/icon_checkbox_checked.png);
|
||||
}
|
||||
QCheckBox::indicator:checked:pressed,QTreeView::indicator:checked:pressed,QTableView::indicator:checked:pressed,QGroupBox::indicator:checked:pressed{
|
||||
image:url(:/darkstyle/icon_checkbox_checked_pressed.png);
|
||||
}
|
||||
QCheckBox::indicator:checked:disabled,QTreeView::indicator:checked:disabled,QTableView::indicator:checked:disabled,QGroupBox::indicator:checked:disabled{
|
||||
image:url(:/darkstyle/icon_checkbox_checked_disabled.png);
|
||||
}
|
||||
QCheckBox::indicator:unchecked,QTreeView::indicator:unchecked,QTableView::indicator:unchecked,QGroupBox::indicator:unchecked{
|
||||
image:url(:/darkstyle/icon_checkbox_unchecked.png);
|
||||
}
|
||||
QCheckBox::indicator:unchecked:pressed,QTreeView::indicator:unchecked:pressed,QTableView::indicator:unchecked:pressed,QGroupBox::indicator:unchecked:pressed{
|
||||
image:url(:/darkstyle/icon_checkbox_unchecked_pressed.png);
|
||||
}
|
||||
QCheckBox::indicator:unchecked:disabled,QTreeView::indicator:unchecked:disabled,QTableView::indicator:unchecked:disabled,QGroupBox::indicator:unchecked:disabled{
|
||||
image:url(:/darkstyle/icon_checkbox_unchecked_disabled.png);
|
||||
}
|
||||
QCheckBox::indicator:indeterminate,QTreeView::indicator:indeterminate,QTableView::indicator:indeterminate,QGroupBox::indicator:indeterminate{
|
||||
image:url(:/darkstyle/icon_checkbox_indeterminate.png);
|
||||
}
|
||||
QCheckBox::indicator:indeterminate:pressed,QTreeView::indicator:indeterminate:pressed,QTableView::indicator:indeterminate:pressed,QGroupBox::indicator:indeterminate:pressed{
|
||||
image:url(:/darkstyle/icon_checkbox_indeterminate_pressed.png);
|
||||
}
|
||||
QCheckBox::indicator:indeterminate:disabled,QTreeView::indicator:indeterminate:disabled,QTableView::indicator:indeterminate:disabled,QGroupBox::indicator:indeterminate:disabled{
|
||||
image:url(:/darkstyle/icon_checkbox_indeterminate_disabled.png);
|
||||
}
|
||||
QRadioButton::indicator{
|
||||
width:18px;
|
||||
height:18px;
|
||||
}
|
||||
QRadioButton::indicator:checked{
|
||||
image:url(:/darkstyle/icon_radiobutton_checked.png);
|
||||
}
|
||||
QRadioButton::indicator:checked:pressed{
|
||||
image:url(:/darkstyle/icon_radiobutton_checked_pressed.png);
|
||||
}
|
||||
QRadioButton::indicator:checked:disabled{
|
||||
image:url(:/darkstyle/icon_radiobutton_checked_disabled.png);
|
||||
}
|
||||
QRadioButton::indicator:unchecked{
|
||||
image:url(:/darkstyle/icon_radiobutton_unchecked.png);
|
||||
}
|
||||
QRadioButton::indicator:unchecked:pressed{
|
||||
image:url(:/darkstyle/icon_radiobutton_unchecked_pressed.png);
|
||||
}
|
||||
QRadioButton::indicator:unchecked:disabled{
|
||||
image:url(:/darkstyle/icon_radiobutton_unchecked_disabled.png);
|
||||
}
|
||||
QTreeView, QTableView{
|
||||
alternate-background-color:palette(window);
|
||||
background:palette(base);
|
||||
}
|
||||
QTreeView QHeaderView::section, QTableView QHeaderView::section{
|
||||
background-color:qlineargradient(x1:0,y1:1,x2:0,y2:0,stop:0 rgba(25,25,25,127),stop:1 rgba(53,53,53,75));
|
||||
border-style:none;
|
||||
border-bottom:1px solid palette(dark);
|
||||
padding-left:5px;
|
||||
padding-right:5px;
|
||||
}
|
||||
QTreeView::item:selected:disabled, QTableView::item:selected:disabled{
|
||||
background:rgb(80,80,80);
|
||||
}
|
||||
QTreeView::branch{
|
||||
background-color:palette(base);
|
||||
}
|
||||
QTreeView::branch:has-siblings:!adjoins-item{
|
||||
border-image:url(:/darkstyle/icon_vline.png) 0;
|
||||
}
|
||||
QTreeView::branch:has-siblings:adjoins-item{
|
||||
border-image:url(:/darkstyle/icon_branch_more.png) 0;
|
||||
}
|
||||
QTreeView::branch:!has-children:!has-siblings:adjoins-item{
|
||||
border-image:url(:/darkstyle/icon_branch_end.png) 0;
|
||||
}
|
||||
QTreeView::branch:has-children:!has-siblings:closed,
|
||||
QTreeView::branch:closed:has-children:has-siblings{
|
||||
border-image:none;
|
||||
image:url(:/darkstyle/icon_branch_closed.png);
|
||||
}
|
||||
QTreeView::branch:open:has-children:!has-siblings,
|
||||
QTreeView::branch:open:has-children:has-siblings{
|
||||
border-image:none;
|
||||
image:url(:/darkstyle/icon_branch_open.png);
|
||||
}
|
||||
QScrollBar:vertical{
|
||||
background:palette(base);
|
||||
border-top-right-radius:2px;
|
||||
border-bottom-right-radius:2px;
|
||||
width:16px;
|
||||
margin:0px;
|
||||
}
|
||||
QScrollBar::handle:vertical{
|
||||
background-color:palette(alternate-base);
|
||||
border-radius:2px;
|
||||
min-height:20px;
|
||||
margin:2px 4px 2px 4px;
|
||||
}
|
||||
QScrollBar::handle:vertical:hover{
|
||||
background-color:palette(highlight);
|
||||
}
|
||||
QScrollBar::add-line:vertical{
|
||||
background:none;
|
||||
height:0px;
|
||||
subcontrol-position:right;
|
||||
subcontrol-origin:margin;
|
||||
}
|
||||
QScrollBar::sub-line:vertical{
|
||||
background:none;
|
||||
height:0px;
|
||||
subcontrol-position:left;
|
||||
subcontrol-origin:margin;
|
||||
}
|
||||
QScrollBar:horizontal{
|
||||
background:palette(base);
|
||||
height:16px;
|
||||
margin:0px;
|
||||
}
|
||||
QScrollBar::handle:horizontal{
|
||||
background-color:palette(alternate-base);
|
||||
border-radius:2px;
|
||||
min-width:20px;
|
||||
margin:4px 2px 4px 2px;
|
||||
}
|
||||
QScrollBar::handle:horizontal:hover{
|
||||
background-color:palette(highlight);
|
||||
}
|
||||
QScrollBar::add-line:horizontal{
|
||||
background:none;
|
||||
width:0px;
|
||||
subcontrol-position:bottom;
|
||||
subcontrol-origin:margin;
|
||||
}
|
||||
QScrollBar::sub-line:horizontal{
|
||||
background:none;
|
||||
width:0px;
|
||||
subcontrol-position:top;
|
||||
subcontrol-origin:margin;
|
||||
}
|
||||
QSlider::handle:horizontal{
|
||||
border-radius:4px;
|
||||
border:1px solid rgba(25,25,25,255);
|
||||
background-color:palette(alternate-base);
|
||||
min-height:20px;
|
||||
margin:0 -4px;
|
||||
}
|
||||
QSlider::handle:horizontal:hover{
|
||||
background:palette(highlight);
|
||||
}
|
||||
QSlider::add-page:horizontal{
|
||||
background:palette(base);
|
||||
}
|
||||
QSlider::sub-page:horizontal{
|
||||
background:palette(highlight);
|
||||
}
|
||||
QSlider::sub-page:horizontal:disabled{
|
||||
background:rgb(80,80,80);
|
||||
}
|
||||
|
Before Width: | Height: | Size: 310 B |
|
Before Width: | Height: | Size: 358 B |
|
Before Width: | Height: | Size: 207 B |
|
Before Width: | Height: | Size: 313 B |
|
Before Width: | Height: | Size: 176 B |
|
Before Width: | Height: | Size: 373 B |
|
Before Width: | Height: | Size: 373 B |
|
Before Width: | Height: | Size: 121 B |
|
Before Width: | Height: | Size: 286 B |
|
Before Width: | Height: | Size: 286 B |
|
Before Width: | Height: | Size: 119 B |
|
Before Width: | Height: | Size: 238 B |
|
Before Width: | Height: | Size: 238 B |
|
Before Width: | Height: | Size: 422 B |
|
Before Width: | Height: | Size: 370 B |
|
Before Width: | Height: | Size: 617 B |
|
Before Width: | Height: | Size: 616 B |
|
Before Width: | Height: | Size: 310 B |
|
Before Width: | Height: | Size: 538 B |
|
Before Width: | Height: | Size: 537 B |
|
Before Width: | Height: | Size: 404 B |
|
Before Width: | Height: | Size: 424 B |
|
Before Width: | Height: | Size: 303 B |
@@ -1,458 +0,0 @@
|
||||
/*
|
||||
###############################################################################
|
||||
# #
|
||||
# The MIT License #
|
||||
# #
|
||||
# Copyright (C) 2017 by Juergen Skrotzky (JorgenVikingGod@gmail.com) #
|
||||
# >> https://github.com/Jorgen-VikingGod #
|
||||
# #
|
||||
# Sources: https://github.com/Jorgen-VikingGod/Qt-Frameless-Window-DarkStyle #
|
||||
# #
|
||||
###############################################################################
|
||||
*/
|
||||
|
||||
#include "framelesswindow.h"
|
||||
#include <QApplication>
|
||||
#include <QDesktopWidget>
|
||||
#include <QGraphicsDropShadowEffect>
|
||||
#include <QScreen>
|
||||
|
||||
#include "ui_framelesswindow.h"
|
||||
|
||||
FramelessWindow::FramelessWindow(QWidget *parent)
|
||||
: QWidget(parent),
|
||||
ui(new Ui::FramelessWindow),
|
||||
m_bMousePressed(false),
|
||||
m_bDragTop(false),
|
||||
m_bDragLeft(false),
|
||||
m_bDragRight(false),
|
||||
m_bDragBottom(false) {
|
||||
setWindowFlags(Qt::FramelessWindowHint | Qt::WindowSystemMenuHint);
|
||||
// append minimize button flag in case of windows,
|
||||
// for correct windows native handling of minimize function
|
||||
#if defined(Q_OS_WIN)
|
||||
setWindowFlags(windowFlags() | Qt::WindowMinimizeButtonHint);
|
||||
#endif
|
||||
setAttribute(Qt::WA_NoSystemBackground, true);
|
||||
setAttribute(Qt::WA_TranslucentBackground);
|
||||
|
||||
ui->setupUi(this);
|
||||
ui->restoreButton->setVisible(false);
|
||||
|
||||
// shadow under window title text
|
||||
QGraphicsDropShadowEffect *textShadow = new QGraphicsDropShadowEffect;
|
||||
textShadow->setBlurRadius(4.0);
|
||||
textShadow->setColor(QColor(0, 0, 0));
|
||||
textShadow->setOffset(0.0);
|
||||
ui->titleText->setGraphicsEffect(textShadow);
|
||||
|
||||
// window shadow
|
||||
QGraphicsDropShadowEffect *windowShadow = new QGraphicsDropShadowEffect;
|
||||
windowShadow->setBlurRadius(9.0);
|
||||
windowShadow->setColor(palette().color(QPalette::Highlight));
|
||||
windowShadow->setOffset(0.0);
|
||||
ui->windowFrame->setGraphicsEffect(windowShadow);
|
||||
|
||||
QObject::connect(qApp, &QGuiApplication::applicationStateChanged, this,
|
||||
&FramelessWindow::on_applicationStateChanged);
|
||||
setMouseTracking(true);
|
||||
|
||||
// important to watch mouse move from all child widgets
|
||||
QApplication::instance()->installEventFilter(this);
|
||||
}
|
||||
|
||||
FramelessWindow::~FramelessWindow() { delete ui; }
|
||||
|
||||
void FramelessWindow::on_restoreButton_clicked() {
|
||||
ui->restoreButton->setVisible(false);
|
||||
|
||||
ui->maximizeButton->setVisible(true);
|
||||
setWindowState(Qt::WindowNoState);
|
||||
// on MacOS this hack makes sure the
|
||||
// background window is repaint correctly
|
||||
hide();
|
||||
show();
|
||||
}
|
||||
|
||||
void FramelessWindow::on_maximizeButton_clicked() {
|
||||
ui->restoreButton->setVisible(true);
|
||||
ui->maximizeButton->setVisible(false);
|
||||
this->setWindowState(Qt::WindowMaximized);
|
||||
this->showMaximized();
|
||||
styleWindow(true, false);
|
||||
}
|
||||
|
||||
void FramelessWindow::changeEvent(QEvent *event) {
|
||||
if (event->type() == QEvent::WindowStateChange) {
|
||||
if (windowState().testFlag(Qt::WindowNoState)) {
|
||||
ui->restoreButton->setVisible(false);
|
||||
ui->maximizeButton->setVisible(true);
|
||||
styleWindow(true, true);
|
||||
event->ignore();
|
||||
} else if (windowState().testFlag(Qt::WindowMaximized)) {
|
||||
ui->restoreButton->setVisible(true);
|
||||
ui->maximizeButton->setVisible(false);
|
||||
styleWindow(true, false);
|
||||
event->ignore();
|
||||
}
|
||||
}
|
||||
event->accept();
|
||||
}
|
||||
|
||||
void FramelessWindow::setContent(QWidget *w) {
|
||||
ui->windowContent->layout()->addWidget(w);
|
||||
}
|
||||
|
||||
void FramelessWindow::setWindowTitle(const QString &text) {
|
||||
ui->titleText->setText(text);
|
||||
}
|
||||
|
||||
void FramelessWindow::setWindowIcon(const QIcon &ico) {
|
||||
ui->icon->setPixmap(ico.pixmap(16, 16));
|
||||
}
|
||||
|
||||
void FramelessWindow::styleWindow(bool bActive, bool bNoState) {
|
||||
if (bActive) {
|
||||
if (bNoState) {
|
||||
layout()->setMargin(15);
|
||||
ui->windowTitlebar->setStyleSheet(QStringLiteral(
|
||||
"#windowTitlebar{border: 0px none palette(shadow); "
|
||||
"border-top-left-radius:5px; border-top-right-radius:5px; "
|
||||
"background-color:palette(shadow); height:20px;}"));
|
||||
ui->windowFrame->setStyleSheet(QStringLiteral(
|
||||
"#windowFrame{border:1px solid palette(highlight); border-radius:5px "
|
||||
"5px 5px 5px; background-color:palette(Window);}"));
|
||||
QGraphicsEffect *oldShadow = ui->windowFrame->graphicsEffect();
|
||||
if (oldShadow) delete oldShadow;
|
||||
QGraphicsDropShadowEffect *windowShadow = new QGraphicsDropShadowEffect;
|
||||
windowShadow->setBlurRadius(9.0);
|
||||
windowShadow->setColor(palette().color(QPalette::Highlight));
|
||||
windowShadow->setOffset(0.0);
|
||||
ui->windowFrame->setGraphicsEffect(windowShadow);
|
||||
} else {
|
||||
layout()->setMargin(0);
|
||||
ui->windowTitlebar->setStyleSheet(QStringLiteral(
|
||||
"#windowTitlebar{border: 0px none palette(shadow); "
|
||||
"border-top-left-radius:0px; border-top-right-radius:0px; "
|
||||
"background-color:palette(shadow); height:20px;}"));
|
||||
ui->windowFrame->setStyleSheet(QStringLiteral(
|
||||
"#windowFrame{border:1px solid palette(dark); border-radius:0px 0px "
|
||||
"0px 0px; background-color:palette(Window);}"));
|
||||
QGraphicsEffect *oldShadow = ui->windowFrame->graphicsEffect();
|
||||
if (oldShadow) delete oldShadow;
|
||||
ui->windowFrame->setGraphicsEffect(nullptr);
|
||||
} // if (bNoState) else maximize
|
||||
} else {
|
||||
if (bNoState) {
|
||||
layout()->setMargin(15);
|
||||
ui->windowTitlebar->setStyleSheet(QStringLiteral(
|
||||
"#windowTitlebar{border: 0px none palette(shadow); "
|
||||
"border-top-left-radius:5px; border-top-right-radius:5px; "
|
||||
"background-color:palette(dark); height:20px;}"));
|
||||
ui->windowFrame->setStyleSheet(QStringLiteral(
|
||||
"#windowFrame{border:1px solid #000000; border-radius:5px 5px 5px "
|
||||
"5px; background-color:palette(Window);}"));
|
||||
QGraphicsEffect *oldShadow = ui->windowFrame->graphicsEffect();
|
||||
if (oldShadow) delete oldShadow;
|
||||
QGraphicsDropShadowEffect *windowShadow = new QGraphicsDropShadowEffect;
|
||||
windowShadow->setBlurRadius(9.0);
|
||||
windowShadow->setColor(palette().color(QPalette::Shadow));
|
||||
windowShadow->setOffset(0.0);
|
||||
ui->windowFrame->setGraphicsEffect(windowShadow);
|
||||
} else {
|
||||
layout()->setMargin(0);
|
||||
ui->windowTitlebar->setStyleSheet(QStringLiteral(
|
||||
"#titlebarWidget{border: 0px none palette(shadow); "
|
||||
"border-top-left-radius:0px; border-top-right-radius:0px; "
|
||||
"background-color:palette(dark); height:20px;}"));
|
||||
ui->windowFrame->setStyleSheet(QStringLiteral(
|
||||
"#windowFrame{border:1px solid palette(shadow); border-radius:0px "
|
||||
"0px 0px 0px; background-color:palette(Window);}"));
|
||||
QGraphicsEffect *oldShadow = ui->windowFrame->graphicsEffect();
|
||||
if (oldShadow) delete oldShadow;
|
||||
ui->windowFrame->setGraphicsEffect(nullptr);
|
||||
} // if (bNoState) { else maximize
|
||||
} // if (bActive) { else no focus
|
||||
}
|
||||
|
||||
void FramelessWindow::on_applicationStateChanged(Qt::ApplicationState state) {
|
||||
if (windowState().testFlag(Qt::WindowNoState)) {
|
||||
if (state == Qt::ApplicationActive) {
|
||||
styleWindow(true, true);
|
||||
} else {
|
||||
styleWindow(false, true);
|
||||
}
|
||||
} else if (windowState().testFlag(Qt::WindowFullScreen)) {
|
||||
if (state == Qt::ApplicationActive) {
|
||||
styleWindow(true, false);
|
||||
} else {
|
||||
styleWindow(false, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void FramelessWindow::on_minimizeButton_clicked() {
|
||||
setWindowState(Qt::WindowMinimized);
|
||||
}
|
||||
|
||||
void FramelessWindow::on_closeButton_clicked() { close(); }
|
||||
|
||||
void FramelessWindow::on_windowTitlebar_doubleClicked() {
|
||||
if (windowState().testFlag(Qt::WindowNoState)) {
|
||||
on_maximizeButton_clicked();
|
||||
} else if (windowState().testFlag(Qt::WindowFullScreen)) {
|
||||
on_restoreButton_clicked();
|
||||
}
|
||||
}
|
||||
|
||||
void FramelessWindow::mouseDoubleClickEvent(QMouseEvent *event) {
|
||||
Q_UNUSED(event);
|
||||
}
|
||||
|
||||
void FramelessWindow::checkBorderDragging(QMouseEvent *event) {
|
||||
if (isMaximized()) {
|
||||
return;
|
||||
}
|
||||
|
||||
QPoint globalMousePos = event->globalPos();
|
||||
if (m_bMousePressed) {
|
||||
QScreen *screen = QGuiApplication::primaryScreen();
|
||||
// available geometry excludes taskbar
|
||||
QRect availGeometry = screen->availableGeometry();
|
||||
int h = availGeometry.height();
|
||||
int w = availGeometry.width();
|
||||
QList<QScreen *> screenlist = screen->virtualSiblings();
|
||||
if (screenlist.contains(screen)) {
|
||||
QSize sz = QApplication::desktop()->size();
|
||||
h = sz.height();
|
||||
w = sz.width();
|
||||
}
|
||||
|
||||
// top right corner
|
||||
if (m_bDragTop && m_bDragRight) {
|
||||
int diff =
|
||||
globalMousePos.x() - (m_StartGeometry.x() + m_StartGeometry.width());
|
||||
int neww = m_StartGeometry.width() + diff;
|
||||
diff = globalMousePos.y() - m_StartGeometry.y();
|
||||
int newy = m_StartGeometry.y() + diff;
|
||||
if (neww > 0 && newy > 0 && newy < h - 50) {
|
||||
QRect newg = m_StartGeometry;
|
||||
newg.setWidth(neww);
|
||||
newg.setX(m_StartGeometry.x());
|
||||
newg.setY(newy);
|
||||
setGeometry(newg);
|
||||
}
|
||||
}
|
||||
// top left corner
|
||||
else if (m_bDragTop && m_bDragLeft) {
|
||||
int diff = globalMousePos.y() - m_StartGeometry.y();
|
||||
int newy = m_StartGeometry.y() + diff;
|
||||
diff = globalMousePos.x() - m_StartGeometry.x();
|
||||
int newx = m_StartGeometry.x() + diff;
|
||||
if (newy > 0 && newx > 0) {
|
||||
QRect newg = m_StartGeometry;
|
||||
newg.setY(newy);
|
||||
newg.setX(newx);
|
||||
setGeometry(newg);
|
||||
}
|
||||
}
|
||||
// bottom right corner
|
||||
else if (m_bDragBottom && m_bDragLeft) {
|
||||
int diff =
|
||||
globalMousePos.y() - (m_StartGeometry.y() + m_StartGeometry.height());
|
||||
int newh = m_StartGeometry.height() + diff;
|
||||
diff = globalMousePos.x() - m_StartGeometry.x();
|
||||
int newx = m_StartGeometry.x() + diff;
|
||||
if (newh > 0 && newx > 0) {
|
||||
QRect newg = m_StartGeometry;
|
||||
newg.setX(newx);
|
||||
newg.setHeight(newh);
|
||||
setGeometry(newg);
|
||||
}
|
||||
} else if (m_bDragTop) {
|
||||
int diff = globalMousePos.y() - m_StartGeometry.y();
|
||||
int newy = m_StartGeometry.y() + diff;
|
||||
if (newy > 0 && newy < h - 50) {
|
||||
QRect newg = m_StartGeometry;
|
||||
newg.setY(newy);
|
||||
setGeometry(newg);
|
||||
}
|
||||
} else if (m_bDragLeft) {
|
||||
int diff = globalMousePos.x() - m_StartGeometry.x();
|
||||
int newx = m_StartGeometry.x() + diff;
|
||||
if (newx > 0 && newx < w - 50) {
|
||||
QRect newg = m_StartGeometry;
|
||||
newg.setX(newx);
|
||||
setGeometry(newg);
|
||||
}
|
||||
} else if (m_bDragRight) {
|
||||
int diff =
|
||||
globalMousePos.x() - (m_StartGeometry.x() + m_StartGeometry.width());
|
||||
int neww = m_StartGeometry.width() + diff;
|
||||
if (neww > 0) {
|
||||
QRect newg = m_StartGeometry;
|
||||
newg.setWidth(neww);
|
||||
newg.setX(m_StartGeometry.x());
|
||||
setGeometry(newg);
|
||||
}
|
||||
} else if (m_bDragBottom) {
|
||||
int diff =
|
||||
globalMousePos.y() - (m_StartGeometry.y() + m_StartGeometry.height());
|
||||
int newh = m_StartGeometry.height() + diff;
|
||||
if (newh > 0) {
|
||||
QRect newg = m_StartGeometry;
|
||||
newg.setHeight(newh);
|
||||
newg.setY(m_StartGeometry.y());
|
||||
setGeometry(newg);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// no mouse pressed
|
||||
if (leftBorderHit(globalMousePos) && topBorderHit(globalMousePos)) {
|
||||
setCursor(Qt::SizeFDiagCursor);
|
||||
} else if (rightBorderHit(globalMousePos) && topBorderHit(globalMousePos)) {
|
||||
setCursor(Qt::SizeBDiagCursor);
|
||||
} else if (leftBorderHit(globalMousePos) &&
|
||||
bottomBorderHit(globalMousePos)) {
|
||||
setCursor(Qt::SizeBDiagCursor);
|
||||
} else {
|
||||
if (topBorderHit(globalMousePos)) {
|
||||
setCursor(Qt::SizeVerCursor);
|
||||
} else if (leftBorderHit(globalMousePos)) {
|
||||
setCursor(Qt::SizeHorCursor);
|
||||
} else if (rightBorderHit(globalMousePos)) {
|
||||
setCursor(Qt::SizeHorCursor);
|
||||
} else if (bottomBorderHit(globalMousePos)) {
|
||||
setCursor(Qt::SizeVerCursor);
|
||||
} else {
|
||||
m_bDragTop = false;
|
||||
m_bDragLeft = false;
|
||||
m_bDragRight = false;
|
||||
m_bDragBottom = false;
|
||||
setCursor(Qt::ArrowCursor);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// pos in global virtual desktop coordinates
|
||||
bool FramelessWindow::leftBorderHit(const QPoint &pos) {
|
||||
const QRect &rect = this->geometry();
|
||||
if (pos.x() >= rect.x() && pos.x() <= rect.x() + CONST_DRAG_BORDER_SIZE) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool FramelessWindow::rightBorderHit(const QPoint &pos) {
|
||||
const QRect &rect = this->geometry();
|
||||
int tmp = rect.x() + rect.width();
|
||||
if (pos.x() <= tmp && pos.x() >= (tmp - CONST_DRAG_BORDER_SIZE)) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool FramelessWindow::topBorderHit(const QPoint &pos) {
|
||||
const QRect &rect = this->geometry();
|
||||
if (pos.y() >= rect.y() && pos.y() <= rect.y() + CONST_DRAG_BORDER_SIZE) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool FramelessWindow::bottomBorderHit(const QPoint &pos) {
|
||||
const QRect &rect = this->geometry();
|
||||
int tmp = rect.y() + rect.height();
|
||||
if (pos.y() <= tmp && pos.y() >= (tmp - CONST_DRAG_BORDER_SIZE)) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void FramelessWindow::mousePressEvent(QMouseEvent *event) {
|
||||
if (isMaximized()) {
|
||||
return;
|
||||
}
|
||||
|
||||
m_bMousePressed = true;
|
||||
m_StartGeometry = this->geometry();
|
||||
|
||||
QPoint globalMousePos = mapToGlobal(QPoint(event->x(), event->y()));
|
||||
|
||||
if (leftBorderHit(globalMousePos) && topBorderHit(globalMousePos)) {
|
||||
m_bDragTop = true;
|
||||
m_bDragLeft = true;
|
||||
setCursor(Qt::SizeFDiagCursor);
|
||||
} else if (rightBorderHit(globalMousePos) && topBorderHit(globalMousePos)) {
|
||||
m_bDragRight = true;
|
||||
m_bDragTop = true;
|
||||
setCursor(Qt::SizeBDiagCursor);
|
||||
} else if (leftBorderHit(globalMousePos) && bottomBorderHit(globalMousePos)) {
|
||||
m_bDragLeft = true;
|
||||
m_bDragBottom = true;
|
||||
setCursor(Qt::SizeBDiagCursor);
|
||||
} else {
|
||||
if (topBorderHit(globalMousePos)) {
|
||||
m_bDragTop = true;
|
||||
setCursor(Qt::SizeVerCursor);
|
||||
} else if (leftBorderHit(globalMousePos)) {
|
||||
m_bDragLeft = true;
|
||||
setCursor(Qt::SizeHorCursor);
|
||||
} else if (rightBorderHit(globalMousePos)) {
|
||||
m_bDragRight = true;
|
||||
setCursor(Qt::SizeHorCursor);
|
||||
} else if (bottomBorderHit(globalMousePos)) {
|
||||
m_bDragBottom = true;
|
||||
setCursor(Qt::SizeVerCursor);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void FramelessWindow::mouseReleaseEvent(QMouseEvent *event) {
|
||||
Q_UNUSED(event);
|
||||
if (isMaximized()) {
|
||||
return;
|
||||
}
|
||||
|
||||
m_bMousePressed = false;
|
||||
bool bSwitchBackCursorNeeded =
|
||||
m_bDragTop || m_bDragLeft || m_bDragRight || m_bDragBottom;
|
||||
m_bDragTop = false;
|
||||
m_bDragLeft = false;
|
||||
m_bDragRight = false;
|
||||
m_bDragBottom = false;
|
||||
if (bSwitchBackCursorNeeded) {
|
||||
setCursor(Qt::ArrowCursor);
|
||||
}
|
||||
}
|
||||
|
||||
bool FramelessWindow::eventFilter(QObject *obj, QEvent *event) {
|
||||
if (isMaximized()) {
|
||||
return QWidget::eventFilter(obj, event);
|
||||
}
|
||||
|
||||
// check mouse move event when mouse is moved on any object
|
||||
if (event->type() == QEvent::MouseMove) {
|
||||
QMouseEvent *pMouse = dynamic_cast<QMouseEvent *>(event);
|
||||
if (pMouse) {
|
||||
checkBorderDragging(pMouse);
|
||||
}
|
||||
}
|
||||
// press is triggered only on frame window
|
||||
else if (event->type() == QEvent::MouseButtonPress && obj == this) {
|
||||
QMouseEvent *pMouse = dynamic_cast<QMouseEvent *>(event);
|
||||
if (pMouse) {
|
||||
mousePressEvent(pMouse);
|
||||
}
|
||||
} else if (event->type() == QEvent::MouseButtonRelease) {
|
||||
if (m_bMousePressed) {
|
||||
QMouseEvent *pMouse = dynamic_cast<QMouseEvent *>(event);
|
||||
if (pMouse) {
|
||||
mouseReleaseEvent(pMouse);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return QWidget::eventFilter(obj, event);
|
||||
}
|
||||
@@ -1,69 +0,0 @@
|
||||
/*
|
||||
###############################################################################
|
||||
# #
|
||||
# The MIT License #
|
||||
# #
|
||||
# Copyright (C) 2017 by Juergen Skrotzky (JorgenVikingGod@gmail.com) #
|
||||
# >> https://github.com/Jorgen-VikingGod #
|
||||
# #
|
||||
# Sources: https://github.com/Jorgen-VikingGod/Qt-Frameless-Window-DarkStyle #
|
||||
# #
|
||||
###############################################################################
|
||||
*/
|
||||
|
||||
#ifndef FRAMELESSWINDOW_H
|
||||
#define FRAMELESSWINDOW_H
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
namespace Ui {
|
||||
class FramelessWindow;
|
||||
}
|
||||
|
||||
class FramelessWindow : public QWidget {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit FramelessWindow(QWidget *parent = Q_NULLPTR);
|
||||
virtual ~FramelessWindow();
|
||||
void setContent(QWidget *w);
|
||||
|
||||
private:
|
||||
bool leftBorderHit(const QPoint &pos);
|
||||
bool rightBorderHit(const QPoint &pos);
|
||||
bool topBorderHit(const QPoint &pos);
|
||||
bool bottomBorderHit(const QPoint &pos);
|
||||
void styleWindow(bool bActive, bool bNoState);
|
||||
|
||||
public slots:
|
||||
void setWindowTitle(const QString &text);
|
||||
void setWindowIcon(const QIcon &ico);
|
||||
|
||||
private slots:
|
||||
void on_applicationStateChanged(Qt::ApplicationState state);
|
||||
void on_minimizeButton_clicked();
|
||||
void on_restoreButton_clicked();
|
||||
void on_maximizeButton_clicked();
|
||||
void on_closeButton_clicked();
|
||||
void on_windowTitlebar_doubleClicked();
|
||||
|
||||
protected:
|
||||
virtual void changeEvent(QEvent *event);
|
||||
virtual void mouseDoubleClickEvent(QMouseEvent *event);
|
||||
virtual void checkBorderDragging(QMouseEvent *event);
|
||||
virtual void mousePressEvent(QMouseEvent *event);
|
||||
virtual void mouseReleaseEvent(QMouseEvent *event);
|
||||
virtual bool eventFilter(QObject *obj, QEvent *event);
|
||||
|
||||
private:
|
||||
Ui::FramelessWindow *ui;
|
||||
QRect m_StartGeometry;
|
||||
const quint8 CONST_DRAG_BORDER_SIZE = 15;
|
||||
bool m_bMousePressed;
|
||||
bool m_bDragTop;
|
||||
bool m_bDragLeft;
|
||||
bool m_bDragRight;
|
||||
bool m_bDragBottom;
|
||||
};
|
||||
|
||||
#endif // FRAMELESSWINDOW_H
|
||||
@@ -1,304 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>FramelessWindow</class>
|
||||
<widget class="QWidget" name="FramelessWindow">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>560</width>
|
||||
<height>398</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="autoFillBackground">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QWidget" name="windowFrame" native="true">
|
||||
<property name="autoFillBackground">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">#windowFrame{border:1px solid palette(highlight); border-radius:5px 5px 5px 5px; background-color:palette(Window);}</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="WindowDragger" name="windowTitlebar" native="true">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="autoFillBackground">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">#windowTitlebar{border: 0px none palette(base); border-top-left-radius:5px; border-top-right-radius:5px; background-color:palette(shadow); height:20px;}</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout" stretch="0,0,1,0,0,0,0">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="spacer">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>4</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>4</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="icon">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>16</width>
|
||||
<height>16</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16</width>
|
||||
<height>16</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="contextMenuPolicy">
|
||||
<enum>Qt::NoContextMenu</enum>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">#icon {background-color:palette(shadow);}</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="titleText">
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>75</weight>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true"> padding-left:5px;
|
||||
color:rgb(153,153,153);</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Frameless Window (Dark Style)</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="minimizeButton">
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>75</weight>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">#minimizeButton{
|
||||
background-color:none;
|
||||
border:none;
|
||||
width:16px;
|
||||
height:16px;
|
||||
padding:4px;
|
||||
image:url(:/images/icon_window_minimize.png);
|
||||
}
|
||||
#minimizeButton:hover{
|
||||
background-color:palette(alternate-base);
|
||||
}
|
||||
#minimizeButton:pressed{
|
||||
background-color:palette(highlight);
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="restoreButton">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">#restoreButton{
|
||||
background-color:none;
|
||||
border:none;
|
||||
width:16px;
|
||||
height:16px;
|
||||
padding:4px;
|
||||
image:url(:/images/icon_window_restore.png);
|
||||
}
|
||||
#restoreButton:hover{
|
||||
background-color:palette(alternate-base);
|
||||
}
|
||||
#restoreButton:pressed{
|
||||
background-color:palette(highlight);
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="maximizeButton">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">#maximizeButton{
|
||||
background-color:none;
|
||||
border:none;
|
||||
width:16px;
|
||||
height:16px;
|
||||
padding:4px;
|
||||
image:url(:/images/icon_window_maximize.png);
|
||||
}
|
||||
#maximizeButton:hover{
|
||||
background-color:palette(alternate-base);
|
||||
}
|
||||
##maximizeButton:pressed{
|
||||
background-color:palette(highlight);
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="closeButton">
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>75</weight>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">#closeButton{
|
||||
background-color:none;
|
||||
border:none;
|
||||
width:16px;
|
||||
height:16px;
|
||||
padding:4px;
|
||||
image:url(:/images/icon_window_close.png);
|
||||
border-top-right-radius: 5px;
|
||||
}
|
||||
#closeButton:hover{
|
||||
background-color:palette(alternate-base);
|
||||
}
|
||||
##closeButton:pressed{
|
||||
background-color:palette(highlight);
|
||||
}</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QWidget" name="windowContent" native="true">
|
||||
<property name="autoFillBackground">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">#windowContent{
|
||||
border: 0px none palette(base);
|
||||
border-radius:0px 0px 5px 5px;
|
||||
}</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<layoutdefault spacing="6" margin="11"/>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>WindowDragger</class>
|
||||
<extends>QWidget</extends>
|
||||
<header>windowdragger.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
@@ -1,56 +0,0 @@
|
||||
/*
|
||||
###############################################################################
|
||||
# #
|
||||
# The MIT License #
|
||||
# #
|
||||
# Copyright (C) 2017 by Juergen Skrotzky (JorgenVikingGod@gmail.com) #
|
||||
# >> https://github.com/Jorgen-VikingGod #
|
||||
# #
|
||||
# Sources: https://github.com/Jorgen-VikingGod/Qt-Frameless-Window-DarkStyle #
|
||||
# #
|
||||
###############################################################################
|
||||
*/
|
||||
|
||||
#include "windowdragger.h"
|
||||
#include <QPainter>
|
||||
#include <QStyleOption>
|
||||
|
||||
WindowDragger::WindowDragger(QWidget *parent) : QWidget(parent) {
|
||||
mousePressed = false;
|
||||
}
|
||||
|
||||
void WindowDragger::mousePressEvent(QMouseEvent *event) {
|
||||
mousePressed = true;
|
||||
mousePos = event->globalPos();
|
||||
|
||||
QWidget *parent = parentWidget();
|
||||
if (parent) parent = parent->parentWidget();
|
||||
|
||||
if (parent) wndPos = parent->pos();
|
||||
}
|
||||
|
||||
void WindowDragger::mouseMoveEvent(QMouseEvent *event) {
|
||||
QWidget *parent = parentWidget();
|
||||
if (parent) parent = parent->parentWidget();
|
||||
|
||||
if (parent && mousePressed)
|
||||
parent->move(wndPos + (event->globalPos() - mousePos));
|
||||
}
|
||||
|
||||
void WindowDragger::mouseReleaseEvent(QMouseEvent *event) {
|
||||
Q_UNUSED(event);
|
||||
mousePressed = false;
|
||||
}
|
||||
|
||||
void WindowDragger::paintEvent(QPaintEvent *event) {
|
||||
Q_UNUSED(event);
|
||||
QStyleOption styleOption;
|
||||
styleOption.init(this);
|
||||
QPainter painter(this);
|
||||
style()->drawPrimitive(QStyle::PE_Widget, &styleOption, &painter, this);
|
||||
}
|
||||
|
||||
void WindowDragger::mouseDoubleClickEvent(QMouseEvent *event) {
|
||||
Q_UNUSED(event);
|
||||
emit doubleClicked();
|
||||
}
|
||||
@@ -1,43 +0,0 @@
|
||||
/*
|
||||
###############################################################################
|
||||
# #
|
||||
# The MIT License #
|
||||
# #
|
||||
# Copyright (C) 2017 by Juergen Skrotzky (JorgenVikingGod@gmail.com) #
|
||||
# >> https://github.com/Jorgen-VikingGod #
|
||||
# #
|
||||
# Sources: https://github.com/Jorgen-VikingGod/Qt-Frameless-Window-DarkStyle #
|
||||
# #
|
||||
###############################################################################
|
||||
*/
|
||||
|
||||
#ifndef WINDOWDRAGGER_H
|
||||
#define WINDOWDRAGGER_H
|
||||
|
||||
#include <QMouseEvent>
|
||||
#include <QWidget>
|
||||
|
||||
class WindowDragger : public QWidget {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit WindowDragger(QWidget *parent = Q_NULLPTR);
|
||||
virtual ~WindowDragger() {}
|
||||
|
||||
signals:
|
||||
void doubleClicked();
|
||||
|
||||
protected:
|
||||
void mousePressEvent(QMouseEvent *event);
|
||||
void mouseMoveEvent(QMouseEvent *event);
|
||||
void mouseReleaseEvent(QMouseEvent *event);
|
||||
void mouseDoubleClickEvent(QMouseEvent *event);
|
||||
void paintEvent(QPaintEvent *event);
|
||||
|
||||
protected:
|
||||
QPoint mousePos;
|
||||
QPoint wndPos;
|
||||
bool mousePressed;
|
||||
};
|
||||
|
||||
#endif // WINDOWDRAGGER_H
|
||||
|
Before Width: | Height: | Size: 422 B |
|
Before Width: | Height: | Size: 386 B |
|
Before Width: | Height: | Size: 364 B |
|
Before Width: | Height: | Size: 404 B |
@@ -1,635 +0,0 @@
|
||||
$light = #504d55;
|
||||
$half_light = #383440;
|
||||
$base = #2e2b35;
|
||||
$half_dark = #28252e;
|
||||
$dark = #24222a;
|
||||
|
||||
$highlight = #be3b29;
|
||||
$hover = #ffffff;
|
||||
$text = #d7d7d7;
|
||||
$disabled = #7f7f7f;
|
||||
|
||||
|
||||
|
||||
|
||||
QWidget {
|
||||
background: $base;
|
||||
border: none;
|
||||
color: $text;
|
||||
outline: 0;
|
||||
}
|
||||
QWidget:disabled {
|
||||
color: $disabled;
|
||||
outline: none;
|
||||
}
|
||||
QDockWidget::title {
|
||||
background: $base;
|
||||
padding-left: 12px;
|
||||
}
|
||||
QDockWidget::close-button, QDockWidget::float-button {
|
||||
border: 1px solid $base;
|
||||
background: $light;
|
||||
|
||||
}
|
||||
|
||||
|
||||
QMenu {
|
||||
background-color: $base; /* sets background of the menu */
|
||||
border: none;
|
||||
}
|
||||
QMenu::item {
|
||||
/* sets background of menu item. set this to something non-transparent
|
||||
if you want menu color and menu item color to be different */
|
||||
background-color: transparent;
|
||||
}
|
||||
QMenu::item:selected { /* when user selects item using mouse or keyboard */
|
||||
background-color: $light;
|
||||
}
|
||||
|
||||
|
||||
|
||||
QMenu::separator {
|
||||
height: 1px;
|
||||
background: $light;
|
||||
}
|
||||
|
||||
|
||||
QMenuBar {
|
||||
background-color: $base;
|
||||
}
|
||||
QMenuBar::item {
|
||||
padding: 1px 10px;
|
||||
}
|
||||
|
||||
QMenuBar::item:selected { /* when selected using mouse or keyboard */
|
||||
background: $light;
|
||||
}
|
||||
|
||||
QMenuBar::item:pressed {
|
||||
background: $half_dark;
|
||||
}
|
||||
|
||||
|
||||
|
||||
QToolBar {
|
||||
background: $base;
|
||||
spacing: 3px; /* spacing between items in the tool bar */
|
||||
min-height: 42px;
|
||||
min-width: 42px;
|
||||
}
|
||||
QToolBar::separator {
|
||||
background: $half_light;
|
||||
width: 2px;
|
||||
}
|
||||
QToolBar::handle:horizontal {
|
||||
border-left: 2px solid $half_light;
|
||||
border-right: 2px solid $half_light;
|
||||
width: 2px;
|
||||
background: $half_dark;
|
||||
margin-left: 4px;
|
||||
margin-right: 4px;
|
||||
}
|
||||
QToolBar::handle:vertical {
|
||||
border-top: 2px solid $half_light;
|
||||
border-bottom: 2px solid $half_light;
|
||||
height: 2px;
|
||||
background: $half_dark;
|
||||
margin-top: 4px;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
QLineEdit {
|
||||
color: $text;
|
||||
padding: 0 8px;
|
||||
background: $half_dark;
|
||||
selection-background-color: $highlight;
|
||||
}
|
||||
QLineEdit:read-only {
|
||||
background: $base;
|
||||
}
|
||||
QFrame {
|
||||
background: $half_dark;
|
||||
}
|
||||
QLabel {
|
||||
background: transparent;
|
||||
padding: 2px 4px;
|
||||
}
|
||||
QGroupBox QLabel:disabled {
|
||||
color: $disabled;
|
||||
position: absolute;
|
||||
top: 0px;
|
||||
left: 0px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
QGroupBox::indicator {
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
margin-top: 1px;
|
||||
}
|
||||
QGroupBox::indicator:unchecked {
|
||||
image: url(C:/Work/NoggitRed/binaries/bin/Release/themes/dark/images/icon_checkbox_unchecked.png);
|
||||
}
|
||||
QGroupBox::indicator:unchecked:hover {
|
||||
image: url(C:/Work/NoggitRed/binaries/bin/Release/themes/dark/images/icon_checkbox_unchecked_hover.png);
|
||||
}
|
||||
QGroupBox::indicator:checked {
|
||||
image: url(C:/Work/NoggitRed/binaries/bin/Release/themes/dark/images/icon_checkbox_checked.png);
|
||||
}
|
||||
QGroupBox::indicator:checked:hover {
|
||||
image: url(C:/Work/NoggitRed/binaries/bin/Release/themes/dark/images/icon_checkbox_checked_hover.png);
|
||||
}
|
||||
|
||||
|
||||
|
||||
QGroupBox {
|
||||
font-weight: bold;
|
||||
border: 1px solid $half_light;
|
||||
padding-top: 22px;
|
||||
padding-left: 12px;
|
||||
padding-right: 12px;
|
||||
padding-bottom: 4px;
|
||||
outline: none;
|
||||
|
||||
}
|
||||
QGroupBox::title {
|
||||
background: none;
|
||||
border-bottom: 1px solid $highlight;
|
||||
border-top: 1px solid $half_light;
|
||||
color: $text;
|
||||
subcontrol-origin: margin;
|
||||
subcontrol-position: top center;
|
||||
padding: 4px 0px;
|
||||
spacing: 8px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
QTabBar::tab {
|
||||
background: $half_light;
|
||||
border: 1px solid $base;
|
||||
border-bottom: none;
|
||||
padding: 4px 10px;
|
||||
min-width: 55px;
|
||||
}
|
||||
QTabBar::tab:left, QTabBar::tab:right {
|
||||
min-width: 15px;
|
||||
min-height: 35px;
|
||||
padding: 4px 6px;
|
||||
}
|
||||
QTabBar::tab:left:selected {
|
||||
border: none;
|
||||
border-left: 3px solid $highlight;
|
||||
}
|
||||
QTabBar::tab:left:selected:hover {
|
||||
border: none;
|
||||
border-left: 3px solid $highlight;
|
||||
}
|
||||
QTabBar::tab:left:hover {
|
||||
border: none;
|
||||
border-left: 1px solid $highlight;
|
||||
}
|
||||
QTabBar::tab:right:selected {
|
||||
border: none;
|
||||
border-right: 3px solid $highlight;
|
||||
}
|
||||
QTabBar::tab:right:selected:hover {
|
||||
border: none;
|
||||
border-right: 3px solid $highlight;
|
||||
}
|
||||
QTabBar::tab:right:hover {
|
||||
border: none;
|
||||
border-right: 1px solid $highlight;
|
||||
}
|
||||
|
||||
|
||||
QTabBar::tab:hover {
|
||||
background: $light;
|
||||
border-top: 1px solid $highlight;
|
||||
}
|
||||
QTabBar::tab:selected {
|
||||
background: $base;
|
||||
border-top: 3px solid $highlight;
|
||||
}
|
||||
|
||||
QCheckBox {
|
||||
spacing: 8px;
|
||||
}
|
||||
QCheckBox:hover {
|
||||
color: $hover;
|
||||
}
|
||||
QCheckBox::indicator {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
}
|
||||
QCheckBox::indicator:unchecked {
|
||||
image: url(C:/Work/NoggitRed/binaries/bin/Release/themes/dark/images/icon_checkbox_unchecked.png);
|
||||
}
|
||||
QCheckBox::indicator:unchecked:hover {
|
||||
image: url(C:/Work/NoggitRed/binaries/bin/Release/themes/dark/images/icon_checkbox_unchecked_hover.png);
|
||||
}
|
||||
QCheckBox::indicator:unchecked:disabled {
|
||||
image: url(C:/Work/NoggitRed/binaries/bin/Release/themes/dark/images/icon_checkbox_unchecked_disabled.png);
|
||||
}
|
||||
QCheckBox::indicator:checked {
|
||||
image: url(C:/Work/NoggitRed/binaries/bin/Release/themes/dark/images/icon_checkbox_checked.png);
|
||||
}
|
||||
QCheckBox::indicator:checked:hover {
|
||||
image: url(C:/Work/NoggitRed/binaries/bin/Release/themes/dark/images/icon_checkbox_checked_hover.png);
|
||||
}
|
||||
QCheckBox::indicator:checked:disabled {
|
||||
image: url(C:/Work/NoggitRed/binaries/bin/Release/themes/dark/images/icon_checkbox_checked_disabled.png);
|
||||
}
|
||||
QCheckBox::indicator:indeterminate {
|
||||
image: url(C:/Work/NoggitRed/binaries/bin/Release/themes/dark/images/icon_checkbox_checked.png);
|
||||
}
|
||||
|
||||
|
||||
QRadioButton {
|
||||
spacing: 8px;
|
||||
}
|
||||
|
||||
QRadioButton::indicator {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
}
|
||||
QRadioButton:hover {
|
||||
color: $hover;
|
||||
}
|
||||
QRadioButton::indicator::unchecked {
|
||||
image: url(C:/Work/NoggitRed/binaries/bin/Release/themes/dark/images/icon_radiobutton_unchecked.png);
|
||||
}
|
||||
|
||||
QRadioButton::indicator:unchecked:hover {
|
||||
image: url(C:/Work/NoggitRed/binaries/bin/Release/themes/dark/images/icon_radiobutton_unchecked_hover.png);
|
||||
}
|
||||
|
||||
QRadioButton::indicator:unchecked:disabled {
|
||||
image: url(C:/Work/NoggitRed/binaries/bin/Release/themes/dark/images/icon_radiobutton_unchecked_disabled.png);
|
||||
}
|
||||
|
||||
QRadioButton::indicator:checked {
|
||||
image: url(C:/Work/NoggitRed/binaries/bin/Release/themes/dark/images/icon_radiobutton_checked.png);
|
||||
}
|
||||
|
||||
QRadioButton::indicator:checked:hover {
|
||||
image: url(C:/Work/NoggitRed/binaries/bin/Release/themes/dark/images/icon_radiobutton_checked_hover.png);
|
||||
}
|
||||
|
||||
QRadioButton::indicator:checked:disabled {
|
||||
image: url(C:/Work/NoggitRed/binaries/bin/Release/themes/dark/images/icon_radiobutton_checked_disabled.png);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
QScrollBar:horizontal {
|
||||
background: $half_dark;
|
||||
height: 16px;
|
||||
}
|
||||
QScrollBar::add-page:horizontal, QScrollBar::sub-page:horizontal, QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical {
|
||||
background: $half_dark;
|
||||
}
|
||||
QScrollBar::handle:horizontal {
|
||||
background: $light;
|
||||
border: 1px solid $half_light;
|
||||
border-radius: 8px;
|
||||
min-width: 20px;
|
||||
}
|
||||
QScrollBar:vertical {
|
||||
background: $half_dark;
|
||||
width: 16px;
|
||||
}
|
||||
QScrollBar::handle:vertical {
|
||||
background: $light;
|
||||
border: 1px solid $half_light;
|
||||
border-radius: 8px;
|
||||
min-height: 20px;
|
||||
}
|
||||
QScrollBar::add-line:horizontal, QScrollBar::sub-line:horizontal {
|
||||
width: 0px;
|
||||
}
|
||||
QScrollBar::add-line:vertical, QScrollBar::sub-line:vertical {
|
||||
height: 0px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
QToolButton {
|
||||
background-color: $base;
|
||||
border: 1px solid transparent;
|
||||
padding: 0px;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
color: $text;
|
||||
}
|
||||
|
||||
QToolButton:hover {
|
||||
background-color: $half_light;
|
||||
border: 1px solid $light;
|
||||
}
|
||||
QToolButton:pressed {
|
||||
background-color: $half_dark;
|
||||
border: 1px solid $half_light;
|
||||
}
|
||||
QToolButton:selected {
|
||||
background-color: $half_dark;
|
||||
border: 1px solid $half_light;
|
||||
|
||||
}
|
||||
|
||||
QToolButton[popupMode="1"] { /* only for MenuButtonPopup */
|
||||
min-width: 60px;
|
||||
padding-right: 26px; /* make way for the popup button */
|
||||
padding-left: 4px;
|
||||
padding-top: 2px;
|
||||
padding-bottom: 2px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* the subcontrols below are used only in the MenuButtonPopup mode */
|
||||
QToolButton::menu-button {
|
||||
border: 1px solid $half_light;
|
||||
width: 20px;
|
||||
}
|
||||
|
||||
QToolButton::menu-button:hover {
|
||||
border: 1px solid $light;
|
||||
}
|
||||
|
||||
|
||||
|
||||
QDialogButtonBox QPushButton {
|
||||
padding: 6px 26px;
|
||||
}
|
||||
/*QDialogButtonBox {
|
||||
min-width: 250px;
|
||||
min-height: 35px;
|
||||
}*/
|
||||
|
||||
QPushButton {
|
||||
background-color: $half_light;
|
||||
border: 1px solid $light;
|
||||
border-radius: 1px;
|
||||
padding: 6px 6px;
|
||||
}
|
||||
QPushButton:hover {
|
||||
background-color: $light;
|
||||
}
|
||||
QPushButton:pressed {
|
||||
background-color: $half_dark;
|
||||
}
|
||||
QPushButton:disabled {
|
||||
background-color: $half_dark;
|
||||
color: $light;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
QAbstractSpinBox {
|
||||
padding-right: 15px; /* make room for the arrows */
|
||||
background: $half_dark;
|
||||
}
|
||||
QAbstractSpinBox::up-button {
|
||||
subcontrol-origin: border;
|
||||
subcontrol-position: top right; /* position at the top right corner */
|
||||
border-image: url(C:/Work/NoggitRed/binaries/bin/Release/themes/dark/images/spinup.png) 1;
|
||||
}
|
||||
QAbstractSpinBox::up-button:pressed, QAbstractSpinBox::up-button:off {
|
||||
border-image: url(C:/Work/NoggitRed/binaries/bin/Release/themes/dark/images/spinup_pressed.png) 1;
|
||||
}
|
||||
QAbstractSpinBox::up-button:disabled {
|
||||
border-image: url(C:/Work/NoggitRed/binaries/bin/Release/themes/dark/images/spinup_disabled.png) 1;
|
||||
}
|
||||
QAbstractSpinBox::up-arrow {
|
||||
image: url(C:/Work/NoggitRed/binaries/bin/Release/themes/dark/images/up_arrow.png);
|
||||
}
|
||||
QAbstractSpinBox::up-arrow:disabled, QAbstractSpinBox::up-arrow:off { /* off state when value is max */
|
||||
image: url(C:/Work/NoggitRed/binaries/bin/Release/themes/dark/images/down_arrow_disabled.png);
|
||||
}
|
||||
QAbstractSpinBox::down-button {
|
||||
subcontrol-origin: border;
|
||||
subcontrol-position: bottom right; /* position at bottom right corner */
|
||||
border-image: url(C:/Work/NoggitRed/binaries/bin/Release/themes/dark/images/spindown.png) 1;
|
||||
}
|
||||
QAbstractSpinBox::down-button:pressed, QAbstractSpinBox::down-button:off {
|
||||
border-image: url(C:/Work/NoggitRed/binaries/bin/Release/themes/dark/images/spindown_pressed.png) 1;
|
||||
}
|
||||
QAbstractSpinBox::down-button:disabled {
|
||||
border-image: url(C:/Work/NoggitRed/binaries/bin/Release/themes/dark/images/spindown_disabled.png) 1;
|
||||
}
|
||||
QAbstractSpinBox::down-arrow {
|
||||
image: url(C:/Work/NoggitRed/binaries/bin/Release/themes/dark/images/down_arrow.png);
|
||||
}
|
||||
QAbstractSpinBox::down-arrow:disabled, QAbstractSpinBox::down-arrow:off { /* off state when value in min */
|
||||
image: url(C:/Work/NoggitRed/binaries/bin/Release/themes/dark/images/up_arrow_disabled.png);
|
||||
}
|
||||
|
||||
|
||||
|
||||
QComboBox {
|
||||
border: none;
|
||||
padding: 3px 18px 3px 6px;
|
||||
min-width: 6em;
|
||||
}
|
||||
QComboBox:editable {
|
||||
background: $half_dark;
|
||||
}
|
||||
QComboBox:!editable, QComboBox::drop-down:editable {
|
||||
background: $half_light;
|
||||
}
|
||||
/* QComboBox gets the "on" state when the popup is open */
|
||||
QComboBox:!editable:on, QComboBox::drop-down:editable:on {
|
||||
background: $light;
|
||||
}
|
||||
QComboBox::drop-down {
|
||||
subcontrol-origin: padding;
|
||||
subcontrol-position: top right;
|
||||
width: 18px;
|
||||
border: none;
|
||||
}
|
||||
QComboBox::down-arrow {
|
||||
image: url(C:/Work/NoggitRed/binaries/bin/Release/themes/dark/images/down_arrow.png);
|
||||
}
|
||||
|
||||
|
||||
QSlider::groove:horizontal {
|
||||
height: 6px; /* the groove expands to the size of the slider by default. by giving it a height, it has a fixed size */
|
||||
background: $half_dark;
|
||||
border: 1px solid $half_light;
|
||||
}
|
||||
|
||||
QSlider::handle:horizontal {
|
||||
background: $highlight;
|
||||
width: 7px;
|
||||
margin: -5px 0; /* handle is placed by default on the contents rect of the groove. Expand outside the groove */
|
||||
border-radius: 2px;
|
||||
border: 1px solid $half_dark;
|
||||
}
|
||||
QSlider::add-page:horizontal {
|
||||
background: $half_dark;
|
||||
border: 1px solid $half_light;
|
||||
}
|
||||
QSlider::sub-page:horizontal {
|
||||
background-color: qlineargradient(x0:0, y0:0, x1:1, y1:0, stop:0 $highlight, stop:1 $base);
|
||||
border: 1px solid $half_light;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
QSlider::groove:vertical {
|
||||
width: 6px; /* the groove expands to the size of the slider by default. by giving it a height, it has a fixed size */
|
||||
background: $half_dark;
|
||||
border: 1px solid $half_light;
|
||||
}
|
||||
|
||||
QSlider::handle:vertical {
|
||||
background: $highlight;
|
||||
height: 7px;
|
||||
margin: 0 -5px; /* handle is placed by default on the contents rect of the groove. Expand outside the groove */
|
||||
border-radius: 2px;
|
||||
border: 1px solid $half_dark;
|
||||
}
|
||||
QSlider::add-page:vertical {
|
||||
background: $half_dark;
|
||||
border: 1px solid $half_light;
|
||||
}
|
||||
QSlider::sub-page:vertical {
|
||||
background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 $base, stop:1 $highlight);
|
||||
border: 1px solid $half_light;
|
||||
}
|
||||
|
||||
|
||||
QStatusBar {
|
||||
background: $base;
|
||||
}
|
||||
QStatusBar::item {
|
||||
border-left: 1px solid $half_light;
|
||||
}
|
||||
|
||||
|
||||
QTableView {
|
||||
color: $disabled;
|
||||
background-color: $half_dark;
|
||||
selection-color: $text;
|
||||
selection-background-color: $half_light;
|
||||
gridline-color: $light;
|
||||
}
|
||||
|
||||
QTableView QTableCornerButton::section {
|
||||
background: $half_light;
|
||||
border-style: solid;
|
||||
border-bottom: 1px solid $light;
|
||||
border-right: 1px solid $light;
|
||||
}
|
||||
|
||||
QHeaderView::section {
|
||||
background-color: $half_light;
|
||||
color: white;
|
||||
padding: 0px 4px;
|
||||
border-style: solid;
|
||||
border-right: 1px solid $light;
|
||||
border-bottom: 1px solid $light;
|
||||
}
|
||||
|
||||
QHeaderView::section:checked
|
||||
{
|
||||
background-color: $light;
|
||||
}
|
||||
|
||||
/* style the sort indicator */
|
||||
QHeaderView::down-arrow {
|
||||
image: url(C:/Work/NoggitRed/binaries/bin/Release/themes/dark/images/down_arrow.png);
|
||||
}
|
||||
|
||||
QHeaderView::up-arrow {
|
||||
image: url(C:/Work/NoggitRed/binaries/bin/Release/themes/dark/images/up_arrow.png);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
QProgressBar {
|
||||
border: 1px solid $half_light;
|
||||
border-radius: 2px;
|
||||
text-align: center;
|
||||
background-color: $half_dark;
|
||||
}
|
||||
|
||||
QProgressBar::chunk {
|
||||
background-color: $highlight;
|
||||
width: 1px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
QTreeView::branch:has-siblings:!adjoins-item {
|
||||
border-image: url(C:/Work/NoggitRed/binaries/bin/Release/themes/dark/images/vline.png) 0;
|
||||
}
|
||||
|
||||
QTreeView::branch:has-siblings:adjoins-item {
|
||||
border-image: url(C:/Work/NoggitRed/binaries/bin/Release/themes/dark/images/icon_branch_more.png) 0;
|
||||
}
|
||||
|
||||
QTreeView::branch:!has-children:!has-siblings:adjoins-item {
|
||||
border-image: url(C:/Work/NoggitRed/binaries/bin/Release/themes/dark/images/icon_branch_end.png) 0;
|
||||
}
|
||||
|
||||
QTreeView::branch:has-children:!has-siblings:closed,
|
||||
QTreeView::branch:closed:has-children:has-siblings {
|
||||
border-image: none;
|
||||
image: url(C:/Work/NoggitRed/binaries/bin/Release/themes/dark/images/icon_branch_closed.png);
|
||||
}
|
||||
|
||||
QTreeView::branch:open:has-children:!has-siblings,
|
||||
QTreeView::branch:open:has-children:has-siblings {
|
||||
border-image: none;
|
||||
image: url(C:/Work/NoggitRed/binaries/bin/Release/themes/dark/images/icon_branch_open.png);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*======================================*/
|
||||
QListView {
|
||||
border: none;
|
||||
outline: none;
|
||||
}
|
||||
QListView::item {
|
||||
background-color: $half_dark;
|
||||
min-height: 18px;
|
||||
}
|
||||
QListView::item:alternate {
|
||||
background: $dark;
|
||||
}
|
||||
|
||||
QListView::item:selected {
|
||||
background: $highlight;
|
||||
}
|
||||
|
||||
/*=======================================*/
|
||||
|
||||
|
||||
color_widgets--ColorSelector {
|
||||
min-width: 100px;
|
||||
max-height: 30px;
|
||||
}
|
||||
|
Before Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 121 B |
|
Before Width: | Height: | Size: 286 B |
|
Before Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 422 B |
|
Before Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 370 B |
|
Before Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 310 B |
|
Before Width: | Height: | Size: 404 B |
|
Before Width: | Height: | Size: 424 B |
|
Before Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 422 B |
|
Before Width: | Height: | Size: 386 B |
|
Before Width: | Height: | Size: 364 B |
|
Before Width: | Height: | Size: 404 B |
|
Before Width: | Height: | Size: 129 B |
|
Before Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 1.9 KiB |
@@ -1,621 +0,0 @@
|
||||
QWidget {
|
||||
background: #2e2b35;
|
||||
border: none;
|
||||
color: #d7d7d7;
|
||||
outline: 0;
|
||||
}
|
||||
QWidget:disabled {
|
||||
color: #7f7f7f;
|
||||
outline: none;
|
||||
}
|
||||
QDockWidget::title {
|
||||
background: #2e2b35;
|
||||
padding-left: 12px;
|
||||
}
|
||||
QDockWidget::close-button, QDockWidget::float-button {
|
||||
border: 1px solid #2e2b35;
|
||||
background: #504d55;
|
||||
|
||||
}
|
||||
|
||||
|
||||
QMenu {
|
||||
background-color: #2e2b35; /* sets background of the menu */
|
||||
border: none;
|
||||
}
|
||||
QMenu::item {
|
||||
/* sets background of menu item. set this to something non-transparent
|
||||
if you want menu color and menu item color to be different */
|
||||
background-color: transparent;
|
||||
}
|
||||
QMenu::item:selected { /* when user selects item using mouse or keyboard */
|
||||
background-color: #504d55;
|
||||
}
|
||||
|
||||
|
||||
|
||||
QMenu::separator {
|
||||
height: 1px;
|
||||
background: #504d55;
|
||||
}
|
||||
|
||||
|
||||
QMenuBar {
|
||||
background-color: #2e2b35;
|
||||
}
|
||||
QMenuBar::item {
|
||||
padding: 1px 10px;
|
||||
}
|
||||
|
||||
QMenuBar::item:selected { /* when selected using mouse or keyboard */
|
||||
background: #504d55;
|
||||
}
|
||||
|
||||
QMenuBar::item:pressed {
|
||||
background: #28252e;
|
||||
}
|
||||
|
||||
|
||||
|
||||
QToolBar {
|
||||
background: #2e2b35;
|
||||
spacing: 3px; /* spacing between items in the tool bar */
|
||||
min-height: 42px;
|
||||
min-width: 42px;
|
||||
}
|
||||
QToolBar::separator {
|
||||
background: #383440;
|
||||
width: 2px;
|
||||
}
|
||||
QToolBar::handle:horizontal {
|
||||
border-left: 2px solid #383440;
|
||||
border-right: 2px solid #383440;
|
||||
width: 2px;
|
||||
background: #28252e;
|
||||
margin-left: 4px;
|
||||
margin-right: 4px;
|
||||
}
|
||||
QToolBar::handle:vertical {
|
||||
border-top: 2px solid #383440;
|
||||
border-bottom: 2px solid #383440;
|
||||
height: 2px;
|
||||
background: #28252e;
|
||||
margin-top: 4px;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
QLineEdit {
|
||||
color: #d7d7d7;
|
||||
padding: 0 8px;
|
||||
background: #28252e;
|
||||
selection-background-color: #be3b29;
|
||||
}
|
||||
QLineEdit:read-only {
|
||||
background: #2e2b35;
|
||||
}
|
||||
QFrame {
|
||||
background: #28252e;
|
||||
}
|
||||
QLabel {
|
||||
background: transparent;
|
||||
padding: 2px 4px;
|
||||
}
|
||||
QGroupBox QLabel:disabled {
|
||||
color: #7f7f7f;
|
||||
position: absolute;
|
||||
top: 0px;
|
||||
left: 0px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
QGroupBox::indicator {
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
margin-top: 1px;
|
||||
}
|
||||
QGroupBox::indicator:unchecked {
|
||||
image: url(themes/dark/images/icon_checkbox_unchecked.png);
|
||||
}
|
||||
QGroupBox::indicator:unchecked:hover {
|
||||
image: url(themes/dark/images/icon_checkbox_unchecked_hover.png);
|
||||
}
|
||||
QGroupBox::indicator:checked {
|
||||
image: url(themes/dark/images/icon_checkbox_checked.png);
|
||||
}
|
||||
QGroupBox::indicator:checked:hover {
|
||||
image: url(themes/dark/images/icon_checkbox_checked_hover.png);
|
||||
}
|
||||
|
||||
|
||||
|
||||
QGroupBox {
|
||||
font-weight: bold;
|
||||
border: 1px solid #383440;
|
||||
padding-top: 22px;
|
||||
padding-left: 12px;
|
||||
padding-right: 12px;
|
||||
padding-bottom: 4px;
|
||||
outline: none;
|
||||
|
||||
}
|
||||
QGroupBox::title {
|
||||
background: none;
|
||||
border-bottom: 1px solid #be3b29;
|
||||
border-top: 1px solid #383440;
|
||||
color: #d7d7d7;
|
||||
subcontrol-origin: margin;
|
||||
subcontrol-position: top center;
|
||||
padding: 4px 0px;
|
||||
spacing: 8px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
QTabBar::tab {
|
||||
background: #383440;
|
||||
border: 1px solid #2e2b35;
|
||||
border-bottom: none;
|
||||
padding: 4px 10px;
|
||||
min-width: 55px;
|
||||
}
|
||||
QTabBar::tab:left, QTabBar::tab:right {
|
||||
min-width: 15px;
|
||||
min-height: 35px;
|
||||
padding: 4px 6px;
|
||||
}
|
||||
QTabBar::tab:left:selected {
|
||||
border: none;
|
||||
border-left: 3px solid #be3b29;
|
||||
}
|
||||
QTabBar::tab:left:selected:hover {
|
||||
border: none;
|
||||
border-left: 3px solid #be3b29;
|
||||
}
|
||||
QTabBar::tab:left:hover {
|
||||
border: none;
|
||||
border-left: 1px solid #be3b29;
|
||||
}
|
||||
QTabBar::tab:right:selected {
|
||||
border: none;
|
||||
border-right: 3px solid #be3b29;
|
||||
}
|
||||
QTabBar::tab:right:selected:hover {
|
||||
border: none;
|
||||
border-right: 3px solid #be3b29;
|
||||
}
|
||||
QTabBar::tab:right:hover {
|
||||
border: none;
|
||||
border-right: 1px solid #be3b29;
|
||||
}
|
||||
|
||||
|
||||
QTabBar::tab:hover {
|
||||
background: #504d55;
|
||||
border-top: 1px solid #be3b29;
|
||||
}
|
||||
QTabBar::tab:selected {
|
||||
background: #2e2b35;
|
||||
border-top: 3px solid #be3b29;
|
||||
}
|
||||
|
||||
QCheckBox {
|
||||
spacing: 8px;
|
||||
}
|
||||
QCheckBox:hover {
|
||||
color: #ffffff;
|
||||
}
|
||||
QCheckBox::indicator {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
}
|
||||
QCheckBox::indicator:unchecked {
|
||||
image: url(themes/dark/images/icon_checkbox_unchecked.png);
|
||||
}
|
||||
QCheckBox::indicator:unchecked:hover {
|
||||
image: url(themes/dark/images/icon_checkbox_unchecked_hover.png);
|
||||
}
|
||||
QCheckBox::indicator:unchecked:disabled {
|
||||
image: url(themes/dark/images/icon_checkbox_unchecked_disabled.png);
|
||||
}
|
||||
QCheckBox::indicator:checked {
|
||||
image: url(themes/dark/images/icon_checkbox_checked.png);
|
||||
}
|
||||
QCheckBox::indicator:checked:hover {
|
||||
image: url(themes/dark/images/icon_checkbox_checked_hover.png);
|
||||
}
|
||||
QCheckBox::indicator:checked:disabled {
|
||||
image: url(themes/dark/images/icon_checkbox_checked_disabled.png);
|
||||
}
|
||||
QCheckBox::indicator:indeterminate {
|
||||
image: url(themes/dark/images/icon_checkbox_checked.png);
|
||||
}
|
||||
|
||||
|
||||
QRadioButton {
|
||||
spacing: 8px;
|
||||
}
|
||||
|
||||
QRadioButton::indicator {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
}
|
||||
QRadioButton:hover {
|
||||
color: #ffffff;
|
||||
}
|
||||
QRadioButton::indicator::unchecked {
|
||||
image: url(themes/dark/images/icon_radiobutton_unchecked.png);
|
||||
}
|
||||
|
||||
QRadioButton::indicator:unchecked:hover {
|
||||
image: url(themes/dark/images/icon_radiobutton_unchecked_hover.png);
|
||||
}
|
||||
|
||||
QRadioButton::indicator:unchecked:disabled {
|
||||
image: url(themes/dark/images/icon_radiobutton_unchecked_disabled.png);
|
||||
}
|
||||
|
||||
QRadioButton::indicator:checked {
|
||||
image: url(themes/dark/images/icon_radiobutton_checked.png);
|
||||
}
|
||||
|
||||
QRadioButton::indicator:checked:hover {
|
||||
image: url(themes/dark/images/icon_radiobutton_checked_hover.png);
|
||||
}
|
||||
|
||||
QRadioButton::indicator:checked:disabled {
|
||||
image: url(themes/dark/images/icon_radiobutton_checked_disabled.png);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
QScrollBar:horizontal {
|
||||
background: #28252e;
|
||||
height: 16px;
|
||||
}
|
||||
QScrollBar::add-page:horizontal, QScrollBar::sub-page:horizontal, QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical {
|
||||
background: #28252e;
|
||||
}
|
||||
QScrollBar::handle:horizontal {
|
||||
background: #504d55;
|
||||
border: 1px solid #383440;
|
||||
border-radius: 8px;
|
||||
min-width: 20px;
|
||||
}
|
||||
QScrollBar:vertical {
|
||||
background: #28252e;
|
||||
width: 16px;
|
||||
}
|
||||
QScrollBar::handle:vertical {
|
||||
background: #504d55;
|
||||
border: 1px solid #383440;
|
||||
border-radius: 8px;
|
||||
min-height: 20px;
|
||||
}
|
||||
QScrollBar::add-line:horizontal, QScrollBar::sub-line:horizontal {
|
||||
width: 0px;
|
||||
}
|
||||
QScrollBar::add-line:vertical, QScrollBar::sub-line:vertical {
|
||||
height: 0px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
QToolButton {
|
||||
background-color: #2e2b35;
|
||||
border: 1px solid transparent;
|
||||
padding: 0px;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
color: #d7d7d7;
|
||||
}
|
||||
|
||||
QToolButton:hover {
|
||||
background-color: #383440;
|
||||
border: 1px solid #504d55;
|
||||
}
|
||||
QToolButton:pressed {
|
||||
background-color: #28252e;
|
||||
border: 1px solid #383440;
|
||||
}
|
||||
QToolButton:selected {
|
||||
background-color: #28252e;
|
||||
border: 1px solid #383440;
|
||||
|
||||
}
|
||||
|
||||
QToolButton[popupMode="1"] { /* only for MenuButtonPopup */
|
||||
min-width: 60px;
|
||||
padding-right: 26px; /* make way for the popup button */
|
||||
padding-left: 4px;
|
||||
padding-top: 2px;
|
||||
padding-bottom: 2px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* the subcontrols below are used only in the MenuButtonPopup mode */
|
||||
QToolButton::menu-button {
|
||||
border: 1px solid #383440;
|
||||
width: 20px;
|
||||
}
|
||||
|
||||
QToolButton::menu-button:hover {
|
||||
border: 1px solid #504d55;
|
||||
}
|
||||
|
||||
|
||||
|
||||
QDialogButtonBox QPushButton {
|
||||
padding: 6px 26px;
|
||||
}
|
||||
/*QDialogButtonBox {
|
||||
min-width: 250px;
|
||||
min-height: 35px;
|
||||
}*/
|
||||
|
||||
QPushButton {
|
||||
background-color: #383440;
|
||||
border: 1px solid #504d55;
|
||||
border-radius: 1px;
|
||||
padding: 6px 6px;
|
||||
}
|
||||
QPushButton:hover {
|
||||
background-color: #504d55;
|
||||
}
|
||||
QPushButton:pressed {
|
||||
background-color: #28252e;
|
||||
}
|
||||
QPushButton:disabled {
|
||||
background-color: #28252e;
|
||||
color: #504d55;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
QAbstractSpinBox {
|
||||
padding-right: 15px; /* make room for the arrows */
|
||||
background: #28252e;
|
||||
}
|
||||
QAbstractSpinBox::up-button {
|
||||
subcontrol-origin: border;
|
||||
subcontrol-position: top right; /* position at the top right corner */
|
||||
border-image: url(themes/dark/images/spinup.png) 1;
|
||||
}
|
||||
QAbstractSpinBox::up-button:pressed, QAbstractSpinBox::up-button:off {
|
||||
border-image: url(themes/dark/images/spinup_pressed.png) 1;
|
||||
}
|
||||
QAbstractSpinBox::up-button:disabled {
|
||||
border-image: url(themes/dark/images/spinup_disabled.png) 1;
|
||||
}
|
||||
QAbstractSpinBox::up-arrow {
|
||||
image: url(themes/dark/images/up_arrow.png);
|
||||
}
|
||||
QAbstractSpinBox::up-arrow:disabled, QAbstractSpinBox::up-arrow:off { /* off state when value is max */
|
||||
image: url(themes/dark/images/down_arrow_disabled.png);
|
||||
}
|
||||
QAbstractSpinBox::down-button {
|
||||
subcontrol-origin: border;
|
||||
subcontrol-position: bottom right; /* position at bottom right corner */
|
||||
border-image: url(themes/dark/images/spindown.png) 1;
|
||||
}
|
||||
QAbstractSpinBox::down-button:pressed, QAbstractSpinBox::down-button:off {
|
||||
border-image: url(themes/dark/images/spindown_pressed.png) 1;
|
||||
}
|
||||
QAbstractSpinBox::down-button:disabled {
|
||||
border-image: url(themes/dark/images/spindown_disabled.png) 1;
|
||||
}
|
||||
QAbstractSpinBox::down-arrow {
|
||||
image: url(themes/dark/images/down_arrow.png);
|
||||
}
|
||||
QAbstractSpinBox::down-arrow:disabled, QAbstractSpinBox::down-arrow:off { /* off state when value in min */
|
||||
image: url(themes/dark/images/up_arrow_disabled.png);
|
||||
}
|
||||
|
||||
|
||||
|
||||
QComboBox {
|
||||
border: none;
|
||||
padding: 3px 18px 3px 6px;
|
||||
min-width: 6em;
|
||||
}
|
||||
QComboBox:editable {
|
||||
background: #28252e;
|
||||
}
|
||||
QComboBox:!editable, QComboBox::drop-down:editable {
|
||||
background: #383440;
|
||||
}
|
||||
/* QComboBox gets the "on" state when the popup is open */
|
||||
QComboBox:!editable:on, QComboBox::drop-down:editable:on {
|
||||
background: #504d55;
|
||||
}
|
||||
QComboBox::drop-down {
|
||||
subcontrol-origin: padding;
|
||||
subcontrol-position: top right;
|
||||
width: 18px;
|
||||
border: none;
|
||||
}
|
||||
QComboBox::down-arrow {
|
||||
image: url(themes/dark/images/down_arrow.png);
|
||||
}
|
||||
|
||||
|
||||
QSlider::groove:horizontal {
|
||||
height: 6px; /* the groove expands to the size of the slider by default. by giving it a height, it has a fixed size */
|
||||
background: #28252e;
|
||||
border: 1px solid #383440;
|
||||
}
|
||||
|
||||
QSlider::handle:horizontal {
|
||||
background: #be3b29;
|
||||
width: 7px;
|
||||
margin: -5px 0; /* handle is placed by default on the contents rect of the groove. Expand outside the groove */
|
||||
border-radius: 2px;
|
||||
border: 1px solid #28252e;
|
||||
}
|
||||
QSlider::add-page:horizontal {
|
||||
background: #28252e;
|
||||
border: 1px solid #383440;
|
||||
}
|
||||
QSlider::sub-page:horizontal {
|
||||
background-color: qlineargradient(x0:0, y0:0, x1:1, y1:0, stop:0 #be3b29, stop:1 #2e2b35);
|
||||
border: 1px solid #383440;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
QSlider::groove:vertical {
|
||||
width: 6px; /* the groove expands to the size of the slider by default. by giving it a height, it has a fixed size */
|
||||
background: #28252e;
|
||||
border: 1px solid #383440;
|
||||
}
|
||||
|
||||
QSlider::handle:vertical {
|
||||
background: #be3b29;
|
||||
height: 7px;
|
||||
margin: 0 -5px; /* handle is placed by default on the contents rect of the groove. Expand outside the groove */
|
||||
border-radius: 2px;
|
||||
border: 1px solid #28252e;
|
||||
}
|
||||
QSlider::add-page:vertical {
|
||||
background: #28252e;
|
||||
border: 1px solid #383440;
|
||||
}
|
||||
QSlider::sub-page:vertical {
|
||||
background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 #2e2b35, stop:1 #be3b29);
|
||||
border: 1px solid #383440;
|
||||
}
|
||||
|
||||
|
||||
QStatusBar {
|
||||
background: #2e2b35;
|
||||
}
|
||||
QStatusBar::item {
|
||||
border-left: 1px solid #383440;
|
||||
}
|
||||
|
||||
|
||||
QTableView {
|
||||
color: #7f7f7f;
|
||||
background-color: #28252e;
|
||||
selection-color: #d7d7d7;
|
||||
selection-background-color: #383440;
|
||||
gridline-color: #504d55;
|
||||
}
|
||||
|
||||
QTableView QTableCornerButton::section {
|
||||
background: #383440;
|
||||
border-style: solid;
|
||||
border-bottom: 1px solid #504d55;
|
||||
border-right: 1px solid #504d55;
|
||||
}
|
||||
|
||||
QHeaderView::section {
|
||||
background-color: #383440;
|
||||
color: white;
|
||||
padding: 0px 4px;
|
||||
border-style: solid;
|
||||
border-right: 1px solid #504d55;
|
||||
border-bottom: 1px solid #504d55;
|
||||
}
|
||||
|
||||
QHeaderView::section:checked
|
||||
{
|
||||
background-color: #504d55;
|
||||
}
|
||||
|
||||
/* style the sort indicator */
|
||||
QHeaderView::down-arrow {
|
||||
image: url(themes/dark/images/down_arrow.png);
|
||||
}
|
||||
|
||||
QHeaderView::up-arrow {
|
||||
image: url(themes/dark/images/up_arrow.png);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
QProgressBar {
|
||||
border: 1px solid #383440;
|
||||
border-radius: 2px;
|
||||
text-align: center;
|
||||
background-color: #28252e;
|
||||
}
|
||||
|
||||
QProgressBar::chunk {
|
||||
background-color: #be3b29;
|
||||
width: 1px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
QTreeView::branch:has-siblings:!adjoins-item {
|
||||
border-image: url(themes/dark/images/vline.png) 0;
|
||||
}
|
||||
|
||||
QTreeView::branch:has-siblings:adjoins-item {
|
||||
border-image: url(themes/dark/images/icon_branch_more.png) 0;
|
||||
}
|
||||
|
||||
QTreeView::branch:!has-children:!has-siblings:adjoins-item {
|
||||
border-image: url(themes/dark/images/icon_branch_end.png) 0;
|
||||
}
|
||||
|
||||
QTreeView::branch:has-children:!has-siblings:closed,
|
||||
QTreeView::branch:closed:has-children:has-siblings {
|
||||
border-image: none;
|
||||
image: url(themes/dark/images/icon_branch_closed.png);
|
||||
}
|
||||
|
||||
QTreeView::branch:open:has-children:!has-siblings,
|
||||
QTreeView::branch:open:has-children:has-siblings {
|
||||
border-image: none;
|
||||
image: url(themes/dark/images/icon_branch_open.png);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*======================================*/
|
||||
QListView {
|
||||
border: none;
|
||||
outline: none;
|
||||
}
|
||||
QListView::item {
|
||||
background-color: #28252e;
|
||||
min-height: 18px;
|
||||
}
|
||||
QListView::item:alternate {
|
||||
background: #24222a;
|
||||
}
|
||||
|
||||
QListView::item:selected {
|
||||
background: #be3b29;
|
||||
}
|
||||
|
||||
/*=======================================*/
|
||||
|
||||
|
||||
color_widgets--ColorSelector {
|
||||
min-width: 100px;
|
||||
max-height: 30px;
|
||||
}
|
||||