Comments (3)
Something like this can make title bar dark.
app = QApplication(sys.argv + ['-platform', 'windows:darkmode=2'])
app.setStyle('Fusion')
app.setPalette(get_darkModePalette(app))
from pyqtdarktheme.
Something like this can make title bar dark.
app = QApplication(sys.argv + ['-platform', 'windows:darkmode=2']) app.setStyle('Fusion') app.setPalette(get_darkModePalette(app))
thanks for that, works great.
curious where the get_darkModePalette
method comes from?
from pyqtdarktheme.
Here is the get_darkModePalette().
def get_darkModePalette(app=None):
darkPalette = app.palette()
darkPalette.setColor(QPalette.Window, QColor(53, 53, 53))
darkPalette.setColor(QPalette.WindowText, Qt.white)
darkPalette.setColor(QPalette.Disabled, QPalette.WindowText, QColor(127, 127, 127))
darkPalette.setColor(QPalette.Base, QColor(42, 42, 42))
darkPalette.setColor(QPalette.AlternateBase, QColor(66, 66, 66))
darkPalette.setColor(QPalette.ToolTipBase, Qt.white)
darkPalette.setColor(QPalette.ToolTipText, Qt.white)
darkPalette.setColor(QPalette.Text, Qt.white)
darkPalette.setColor(QPalette.Disabled, QPalette.Text, QColor(127, 127, 127))
darkPalette.setColor(QPalette.Dark, QColor(35, 35, 35))
darkPalette.setColor(QPalette.Shadow, QColor(20, 20, 20))
darkPalette.setColor(QPalette.Button, QColor(53, 53, 53))
darkPalette.setColor(QPalette.ButtonText, Qt.white)
darkPalette.setColor(QPalette.Disabled, QPalette.ButtonText, QColor(127, 127, 127))
darkPalette.setColor(QPalette.BrightText, Qt.red)
darkPalette.setColor(QPalette.Link, QColor(42, 130, 218))
darkPalette.setColor(QPalette.Highlight, QColor(42, 130, 218))
darkPalette.setColor(QPalette.Disabled, QPalette.Highlight, QColor(80, 80, 80))
darkPalette.setColor(QPalette.HighlightedText, Qt.white)
darkPalette.setColor(QPalette.Disabled, QPalette.HighlightedText, QColor(127, 127, 127), )
return darkPalette
# end get_darkModePalette def
from pyqtdarktheme.
Related Issues (20)
- Tooltip on windows is not readable HOT 1
- Setting a theme enables mouseTracking in QTabBar
- How to make child windows unaffected by the theme
- Painting Error in QtWidgets.QInputDialog.getText HOT 1
- Segmentation Fault when using example in README
- Tooltip background color HOT 3
- PyInstaller executable doesn't work if I include qdarktheme HOT 1
- inverted active line of horizontal QSlider in RTL direction
- Incomplete lines in QTreeWidget
- Selecting auto for the theme will result in QWebEngineView(). setUrl (URL) exceptions, and the program will exit without displaying task error messages
- How to reduce the height of QComboBox after applying PyQtDarkTheme HOT 3
- Has anyone implemented pyqtdarktheme in C++ version?
- setup_theme() causes debugger to not end
- Style issues with QTree HOT 1
- Python 3.12 Support HOT 7
- Query regarding theming
- Specify Qt version to use
- can not change the background colors of individual headerItem in TableWidget
- Pyqtgraph is buggy
- Titelbar of QDockWidgets
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyqtdarktheme.