Initial dark style attempt for Windows.
|
@ -47,15 +47,8 @@
|
|||
<file>dark/vmovetoolbar.svg</file>
|
||||
<file>dark/hsepartoolbar.svg</file>
|
||||
<file>dark/vsepartoolbars.svg</file>
|
||||
<file>dark/stylesheet-branch-end.svg</file>
|
||||
<file>dark/stylesheet-branch-end-closed.svg</file>
|
||||
<file>dark/stylesheet-branch-end-open.svg</file>
|
||||
<file>dark/stylesheet-vline.svg</file>
|
||||
<file>dark/stylesheet-branch-more.svg</file>
|
||||
<file>dark/branch_closed.svg</file>
|
||||
<file>dark/branch_closed-on.svg</file>
|
||||
<file>dark/branch_open.svg</file>
|
||||
<file>dark/branch_open-on.svg</file>
|
||||
<file>dark/down_arrow.svg</file>
|
||||
<file>dark/down_arrow_disabled.svg</file>
|
||||
<file>dark/down_arrow-hover.svg</file>
|
||||
|
@ -85,5 +78,7 @@
|
|||
<file>dark/radio_unchecked_disabled.svg</file>
|
||||
<file>light.qss</file>
|
||||
<file>dark.qss</file>
|
||||
<!-- TODO(ahuszagh) Remove -->
|
||||
<file>windows_dark.qss</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
|
4722
breeze_resources.py
3
dark.qss
|
@ -68,7 +68,6 @@ QWidget:item:selected
|
|||
background-color: #3daee9;
|
||||
}
|
||||
|
||||
|
||||
QCheckBox
|
||||
{
|
||||
spacing: 0.5ex;
|
||||
|
@ -314,7 +313,6 @@ QMenu::right-arrow
|
|||
height: 0.9ex;
|
||||
}
|
||||
|
||||
|
||||
QWidget:disabled
|
||||
{
|
||||
color: #454545;
|
||||
|
@ -494,7 +492,6 @@ QScrollBar::sub-line:vertical:on
|
|||
subcontrol-origin: margin;
|
||||
}
|
||||
|
||||
|
||||
QScrollBar::add-line:vertical:hover,
|
||||
QScrollBar::add-line:vertical:on
|
||||
{
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
<svg width="6" height="9">
|
||||
<path fill="#fff" fill-rule="evenodd" d="M1,8V1L5,4.5Z"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 94 B |
|
@ -1,3 +1,3 @@
|
|||
<svg width="12" height="18">
|
||||
<path fill="#afafaf" d="M5,12V6L9,9Z"/>
|
||||
<path fill="#afafaf" d="M3,13.5V4.5L9,9Z"/>
|
||||
</svg>
|
||||
|
|
Before Width: | Height: | Size: 78 B After Width: | Height: | Size: 82 B |
|
@ -1,3 +0,0 @@
|
|||
<svg width="9" height="6">
|
||||
<path fill="#fff" d="M1,1H8L4.5,5Z"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 74 B |
|
@ -1,3 +1,3 @@
|
|||
<svg width="18" height="12">
|
||||
<path fill="#afafaf" d="M5.5,3H12.5L9,9Z"/>
|
||||
<path fill="#afafaf" d="M4.5,3H13.5L9,9Z"/>
|
||||
</svg>
|
||||
|
|
Before Width: | Height: | Size: 82 B After Width: | Height: | Size: 82 B |
|
@ -1,4 +0,0 @@
|
|||
<svg width="81" height="58">
|
||||
<rect id="VLine" fill="#626568" x="36" width="2" height="14"/>
|
||||
<rect id="HLine" fill="#626568" x="65" y="28" height="1" width="28"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 173 B |
|
@ -1,4 +0,0 @@
|
|||
<svg width="81" height="58">
|
||||
<rect id="VLine" fill="#626568" x="36" width="2" height="14"/>
|
||||
<rect id="HLine" fill="#626568" x="65" y="28" height="1" width="28"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 173 B |
|
@ -1,4 +0,0 @@
|
|||
<svg width="81" height="58">
|
||||
<rect id="VLine" fill="#626568" x="36" width="2" height="28"/>
|
||||
<rect id="HLine" fill="#626568" x="36" y="28" height="1" width="57"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 173 B |
|
@ -1,4 +0,0 @@
|
|||
<svg width="81" height="58">
|
||||
<rect id="VLine" fill="#626568" x="36" width="2" height="58"/>
|
||||
<rect id="HLine" fill="#626568" x="36" y="30" height="1" width="44"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 173 B |
|
@ -1,3 +0,0 @@
|
|||
<svg width="81" height="58">
|
||||
<rect fill="#626568" x="36" width="2" height="58"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 90 B |
26
example.py
|
@ -79,6 +79,7 @@ class Ui_MainWindow(object):
|
|||
self.gridLayout_6.addWidget(self.checkableButton, 1, 0, 1, 1)
|
||||
self.pushButton = QtWidgets.QPushButton(self.tab_3)
|
||||
self.pushButton.setObjectName("pushButton")
|
||||
self.pushButton.setToolTip('Sample Tooltip1')
|
||||
self.gridLayout_6.addWidget(self.pushButton, 0, 0, 1, 1)
|
||||
self.pushButton_5 = QtWidgets.QPushButton(self.tab_3)
|
||||
self.pushButton_5.setObjectName("pushButton_5")
|
||||
|
@ -132,6 +133,10 @@ class Ui_MainWindow(object):
|
|||
self.checkBox_2.setTristate(True)
|
||||
self.checkBox_2.setObjectName("checkBox_2")
|
||||
self.verticalLayout_4.addWidget(self.checkBox_2)
|
||||
self.checkBox_3 = QtWidgets.QCheckBox(self.groupBox_2)
|
||||
self.checkBox_3.setEnabled(False)
|
||||
self.checkBox_3.setObjectName("checkBox_3")
|
||||
self.verticalLayout_4.addWidget(self.checkBox_3)
|
||||
self.treeWidget = QtWidgets.QTreeWidget(self.groupBox_2)
|
||||
self.treeWidget.setObjectName("treeWidget")
|
||||
item_0 = QtWidgets.QTreeWidgetItem(self.treeWidget)
|
||||
|
@ -140,12 +145,29 @@ class Ui_MainWindow(object):
|
|||
item_2.setText(0, "subitem")
|
||||
self.verticalLayout_4.addWidget(self.treeWidget)
|
||||
self.gridLayout_2.addWidget(self.groupBox_2, 0, 0, 1, 1)
|
||||
self.tab_3v2 = QtWidgets.QWidget()
|
||||
self.tab_3v2.setObjectName("tab_3v2")
|
||||
self.gridLayout_3v2 = QtWidgets.QGridLayout(self.tab_3v2)
|
||||
self.gridLayout_3v2.setObjectName("gridLayout_3v2")
|
||||
self.groupBox_3v2 = QtWidgets.QGroupBox(self.tab_3v2)
|
||||
self.groupBox_3v2.setObjectName("groupBox_3v2")
|
||||
self.verticalLayout_4v2 = QtWidgets.QVBoxLayout(self.groupBox_3v2)
|
||||
self.verticalLayout_4v2.setObjectName("verticalLayout_4v2")
|
||||
self.tabBar = QtWidgets.QTabBar(self.tab_3v2)
|
||||
self.gridLayout_3v2.setObjectName("tabBar")
|
||||
self.tabBar.addTab("TabBar Tab 1")
|
||||
self.tabBar.addTab("TabBar Tab 2")
|
||||
self.tabBar.addTab("TabBar Tab 3")
|
||||
self.verticalLayout_4v2.addWidget(self.tabBar, 0, QtCore.Qt.AlignTop)
|
||||
self.gridLayout_3v2.addWidget(self.groupBox_3v2, 0, 0, 1, 1)
|
||||
self.tabWidget.addTab(self.tab_2, "")
|
||||
self.tabWidget.addTab(self.tab_3v2, "")
|
||||
self.verticalLayout_5.addWidget(self.tabWidget)
|
||||
self.horizontalLayout = QtWidgets.QHBoxLayout()
|
||||
self.horizontalLayout.setObjectName("horizontalLayout")
|
||||
self.pushButton_2 = QtWidgets.QPushButton(self.centralwidget)
|
||||
self.pushButton_2.setObjectName("pushButton_2")
|
||||
self.pushButton_2.setToolTip('Sample Tooltip2')
|
||||
self.horizontalLayout.addWidget(self.pushButton_2)
|
||||
self.bt_delay_popup = QtWidgets.QToolButton(self.centralwidget)
|
||||
self.bt_delay_popup.setObjectName("bt_delay_popup")
|
||||
|
@ -166,6 +188,7 @@ class Ui_MainWindow(object):
|
|||
self.pushButton_3 = QtWidgets.QPushButton(self.centralwidget)
|
||||
self.pushButton_3.setEnabled(False)
|
||||
self.pushButton_3.setObjectName("pushButton_3")
|
||||
self.pushButton_3.setToolTip('Sample Tooltip3')
|
||||
self.horizontalLayout.addWidget(self.pushButton_3)
|
||||
self.doubleSpinBox = QtWidgets.QDoubleSpinBox(self.centralwidget)
|
||||
self.doubleSpinBox.setObjectName("doubleSpinBox")
|
||||
|
@ -332,6 +355,7 @@ class Ui_MainWindow(object):
|
|||
self.radioButton.setText(_translate("MainWindow", "RadioB&utton"))
|
||||
self.checkBox.setText(_translate("MainWindow", "CheckBox"))
|
||||
self.checkBox_2.setText(_translate("MainWindow", "CheckBox Tristate"))
|
||||
self.checkBox_3.setText(_translate("MainWindow", "CheckBox Disabled"))
|
||||
self.treeWidget.headerItem().setText(0, _translate("MainWindow", "qdz"))
|
||||
__sortingEnabled = self.treeWidget.isSortingEnabled()
|
||||
self.treeWidget.setSortingEnabled(False)
|
||||
|
@ -339,6 +363,8 @@ class Ui_MainWindow(object):
|
|||
self.treeWidget.topLevelItem(1).setText(0, _translate("MainWindow", "effefe"))
|
||||
self.treeWidget.setSortingEnabled(__sortingEnabled)
|
||||
self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_2), _translate("MainWindow", "Tab 2"))
|
||||
self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_3v2), _translate("MainWindow", "Tab 3"))
|
||||
self.groupBox_3v2.setTitle(_translate("MainWindow", "GroupBox v2"))
|
||||
self.pushButton_2.setText(_translate("MainWindow", "PushButton"))
|
||||
self.bt_delay_popup.setText(_translate("MainWindow", "Delayed popup "))
|
||||
self.bt_instant_popup.setText(_translate("MainWindow", "Instant popup"))
|
||||
|
|
|
@ -0,0 +1,94 @@
|
|||
#!/usr/bin/env python
|
||||
#
|
||||
# The MIT License (MIT)
|
||||
#
|
||||
# Copyright (c) <2013-2014> <Colin Duquesnoy>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
# in the Software without restriction, including without limitation the rights
|
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
# copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
# THE SOFTWARE.
|
||||
#
|
||||
"""
|
||||
A simple example of use.
|
||||
|
||||
Load an ui made in QtDesigner and apply the DarkStyleSheet.
|
||||
|
||||
|
||||
Requirements:
|
||||
- Python 2 or Python 3
|
||||
- PyQt4
|
||||
|
||||
.. note.. :: qdarkstyle does not have to be installed to run
|
||||
the example
|
||||
|
||||
"""
|
||||
import logging
|
||||
import sys
|
||||
from PyQt5 import QtWidgets, QtCore
|
||||
from PyQt5.QtCore import QFile, QTextStream
|
||||
# make the example runnable without the need to install
|
||||
|
||||
import example
|
||||
import breeze_resources
|
||||
|
||||
def main():
|
||||
"""
|
||||
Application entry point
|
||||
"""
|
||||
logging.basicConfig(level=logging.DEBUG)
|
||||
# create the application and the main window
|
||||
app = QtWidgets.QApplication(sys.argv)
|
||||
#app.setStyle(QtWidgets.QStyleFactory.create("fusion"))
|
||||
window = QtWidgets.QMainWindow()
|
||||
|
||||
# setup ui
|
||||
ui = example.Ui_MainWindow()
|
||||
ui.setupUi(window)
|
||||
ui.bt_delay_popup.addActions([
|
||||
ui.actionAction,
|
||||
ui.actionAction_C
|
||||
])
|
||||
ui.bt_instant_popup.addActions([
|
||||
ui.actionAction,
|
||||
ui.actionAction_C
|
||||
])
|
||||
ui.bt_menu_button_popup.addActions([
|
||||
ui.actionAction,
|
||||
ui.actionAction_C
|
||||
])
|
||||
window.setWindowTitle("BreezeDark example")
|
||||
|
||||
# tabify dock widgets to show bug #6
|
||||
window.tabifyDockWidget(ui.dockWidget1, ui.dockWidget2)
|
||||
|
||||
# setup stylesheet
|
||||
file = QFile(":/windows_dark.qss")
|
||||
file.open(QFile.ReadOnly | QFile.Text)
|
||||
stream = QTextStream(file)
|
||||
app.setStyleSheet(stream.readAll())
|
||||
|
||||
# auto quit after 2s when testing on travis-ci
|
||||
if "--travis" in sys.argv:
|
||||
QtCore.QTimer.singleShot(2000, app.exit)
|
||||
|
||||
# run
|
||||
window.show()
|
||||
app.exec_()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|