Qt sass theme getter
Project description
qt-sass-theme-getter
Qt sass theme getter.
Default theme is dark-gray theme, my favorite.
Setup
python -m pip install qt-sass-theme-getter
Included Packages
- qtsass - For convert sass into css
Method Overview
-
setTheme(theme='dark')
- this method help people to easily set the theme. Currently (v0.0.25, 2022-05-31) this supports two theme -'light'
,'dark'
. Theme is set to dark by default. -
setThemeColor(bg_color, widget_color, text_color, hover_color, border_color, select_color, disabled_color, text_widget_color, scroll_handle_color)
- in this case, you can set the theme color by yourself. Give 6-digit hex color string such as #FF0000.-
bg_color - background color
-
widget_color - widget color
-
text_color - text color
-
hover_color - certain widgets' color when mouse cursor is hovering
-
border_color - color of widgets' border
-
select_color - selected widgets' color
-
disabled_color - disabled widgets' color
-
text_widget_color - background color of text widget such as
QTextEdit/QTextBrowser
-
scroll_handle_color - horizontal/vertical
QScrollBar
's handle color
-
-
getThemeFiles(output_dir = os.getcwd())
- you can save css files inoutput_dir
which were converted from .scss files included in this package. -
getThemeStyle() -> str
- use it toQMainWindow
,QDialog
. -
getIconButtonStyle() -> str
- use it toQPushButton/QToolButton
which has icon. -
getIconTextButtonStyle() -> str
- use it toQPushButton/QToolButton
. -
getMenuBarStyle() -> str
- use it toQMenuBar
. -
getMainWidgetStyle() -> str
- use it to "top level"QWidget
.
Example
Here's basic usage - get the style code and modify it(such as getThemeStyle() + QLineEdit { ... }), and set it to desired widget.
pyqt-dark-gray-theme/darkGrayTheme.py - return the dark-gray styles using qt-sass-theme-getter pacakge, even though dark-gray is default.
pyqt-style-setter/styleSetter.py - set the style of some widgets
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for qt-sass-theme-getter-0.0.26.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | b528723c58aad259dae56b872a98358928c9e4fb0017947d11118f58407b77b8 |
|
MD5 | 66ae198a724b6a400d919ddada6ef31e |
|
BLAKE2b-256 | 3eeadbe1b0b0b79a96e4b6806789963f5e2c1c7b5fcdbfe658f991a17b6a908e |
Hashes for qt_sass_theme_getter-0.0.26-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 27ecfa3a222700ddcfe944864994f2a9e44c3ce0a12c6402a3e3c4f75de017fe |
|
MD5 | 6de918f2235d54f1eb56a7390151f838 |
|
BLAKE2b-256 | 41db10733864e0723b4f1ec248043711906736fbdeb009e129105d0abc11a9a1 |