diff options
author | CoprDistGit <infra@openeuler.org> | 2023-05-31 04:56:41 +0000 |
---|---|---|
committer | CoprDistGit <infra@openeuler.org> | 2023-05-31 04:56:41 +0000 |
commit | d509944d8ec51f8f8dd84172b400b1e6166dd912 (patch) | |
tree | a26995cb9797ecfa97cea90218ab273a49cd0f59 | |
parent | c0c6b1f9bfcce448bf5544d2395ee49ca263a71f (diff) |
automatic import of python-pyqtdarktheme
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | python-pyqtdarktheme.spec | 559 | ||||
-rw-r--r-- | sources | 1 |
3 files changed, 561 insertions, 0 deletions
@@ -0,0 +1 @@ +/pyqtdarktheme-2.1.0.tar.gz diff --git a/python-pyqtdarktheme.spec b/python-pyqtdarktheme.spec new file mode 100644 index 0000000..60f4a0f --- /dev/null +++ b/python-pyqtdarktheme.spec @@ -0,0 +1,559 @@ +%global _empty_manifest_terminate_build 0 +Name: python-pyqtdarktheme +Version: 2.1.0 +Release: 1 +Summary: Flat dark theme for PySide and PyQt. +License: MIT +URL: https://github.com/5yutan5/PyQtDarkTheme +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/5c/f1/786feaad7a333072b34a913dbe38aef94b5ae43ad188934f5d70007aea79/pyqtdarktheme-2.1.0.tar.gz +BuildArch: noarch + +Requires: python3-darkdetect + +%description +# PyQtDarkTheme + +PyQtDarkTheme applies a flat dark theme to QtWidgets application. There's a light theme too. Color balanced from the dark theme for easy viewing in daylight. + +Check out the [complete documentation](https://pyqtdarktheme.readthedocs.io). + +**Project status** +[](https://pypi.org/project/pyqtdarktheme/) +[](https://www.python.org/downloads/) +[](https://www.qt.io/qt-for-python) +[](https://github.com/5yutan5/PyQtDarkTheme/blob/main/LICENSE.txt/) + +**Tests** +[](https://results.pre-commit.ci/latest/github/5yutan5/PyQtDarkTheme/main) +[](https://codecov.io/gh/5yutan5/PyQtDarkTheme) +[](https://pyqtdarktheme.readthedocs.io/en/latest/?badge=latest) + +## Features + +- A flat dark and light theme +- Support PySide and PyQt +- Sync with OS's theme and accent (Mac, Windows, Linux) +- Resolve the style differences between Qt versions +- Provide dark/light theme QPalette +- Override Qt old standard icons + +## Themes + +### Dark Theme + + + +### Light Theme + + + +## Requirements + +- [Python 3.7+](https://www.python.org/downloads/) +- Qt 5.15+ +- PySide6, PyQt6, PyQt5 or PySide2 + +## Installation Method + +- Last released version + + ```plaintext + pip install pyqtdarktheme + ``` + +- Latest development version + + ```plaintext + pip install git+https://github.com/5yutan5/PyQtDarkTheme.git@main + ``` + +## Usage + +```Python +import sys + +from PySide6.QtWidgets import QApplication, QMainWindow, QPushButton + +import qdarktheme + +app = QApplication(sys.argv) +# Apply the complete dark theme to your Qt App. +qdarktheme.setup_theme() + +main_win = QMainWindow() +push_button = QPushButton("PyQtDarkTheme!!") +main_win.setCentralWidget(push_button) + +main_win.show() + +app.exec() +``` + +Further information can be found in our docs: + +- [Usage Guide](https://pyqtdarktheme.readthedocs.io/en/latest/how_to_use.html) + +### Enable HiDPI + +```Python +# enable_hi_dpi() must be called before the instantiation of QApplication. +qdarktheme.enable_hi_dpi() +app = QApplication(sys.argv) +qdarktheme.setup_theme() +``` + +For Qt6 bindings, HiDPI “just works” without using this function. + +### Light theme + +```Python +qdarktheme.setup_theme("light") +``` + +### Sync with OS's theme and accent + +```Python +qdarktheme.setup_theme("auto") +``` + + + +On macOS, qdarktheme also syncs with accent colors. + + +### Customizing colors + +You can customize the theme color. + +```python +# Customize accent color. +qdarktheme.setup_theme(custom_colors={"primary": "#D0BCFF"}) +``` + +For a list of all customizable colors, see the Theme Color Reference: + +- [Theme Color](https://pyqtdarktheme.readthedocs.io/en/latest/reference/theme_color.html) + +### Sharp frame + +You can change the corner style. + +```python +# Default is "rounded". +stylesheet = qdarktheme.setup_theme(corner_shape="sharp") +``` + +### QPalette and stylesheet + +You can also only load QPalette and stylesheet. `qdarktheme.setup_theme` uses the following functions internally. + +```Python +palette = qdarktheme.load_palette(theme="dark") +stylesheet = qdarktheme.load_stylesheet(theme="dark") +``` + +## Example + +To check all Qt widgets, run: + +```plaintext +python -m qdarktheme.widget_gallery +``` + +## License + +The svg files for the PyQtDarkTheme are derived [Material design icons](https://fonts.google.com/icons)(Apache License Version 2.0). Qt stylesheets are originally fork of [QDarkStyleSheet](https://github.com/ColinDuquesnoy/QDarkStyleSheet)(MIT License). Other files are covered by PyQtDarkTheme's MIT license. The accent detector(qdarktheme/_os_appearance/_accent/_mac_detect) is inspired by [darkdetect](https://github.com/albertosottile/darkdetect)(3-clause BSD License). + +## Contributing + +All contributions, bug reports, bug fixes, documentation improvements, enhancements, and ideas are welcome. You can get started by reading this: + +- [Contributing Guide](https://pyqtdarktheme.readthedocs.io/en/latest/contributing.html) + +## Change log + +See [Releases](https://github.com/5yutan5/PyQtDarkTheme/releases). + + +%package -n python3-pyqtdarktheme +Summary: Flat dark theme for PySide and PyQt. +Provides: python-pyqtdarktheme +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-pyqtdarktheme +# PyQtDarkTheme + +PyQtDarkTheme applies a flat dark theme to QtWidgets application. There's a light theme too. Color balanced from the dark theme for easy viewing in daylight. + +Check out the [complete documentation](https://pyqtdarktheme.readthedocs.io). + +**Project status** +[](https://pypi.org/project/pyqtdarktheme/) +[](https://www.python.org/downloads/) +[](https://www.qt.io/qt-for-python) +[](https://github.com/5yutan5/PyQtDarkTheme/blob/main/LICENSE.txt/) + +**Tests** +[](https://results.pre-commit.ci/latest/github/5yutan5/PyQtDarkTheme/main) +[](https://codecov.io/gh/5yutan5/PyQtDarkTheme) +[](https://pyqtdarktheme.readthedocs.io/en/latest/?badge=latest) + +## Features + +- A flat dark and light theme +- Support PySide and PyQt +- Sync with OS's theme and accent (Mac, Windows, Linux) +- Resolve the style differences between Qt versions +- Provide dark/light theme QPalette +- Override Qt old standard icons + +## Themes + +### Dark Theme + + + +### Light Theme + + + +## Requirements + +- [Python 3.7+](https://www.python.org/downloads/) +- Qt 5.15+ +- PySide6, PyQt6, PyQt5 or PySide2 + +## Installation Method + +- Last released version + + ```plaintext + pip install pyqtdarktheme + ``` + +- Latest development version + + ```plaintext + pip install git+https://github.com/5yutan5/PyQtDarkTheme.git@main + ``` + +## Usage + +```Python +import sys + +from PySide6.QtWidgets import QApplication, QMainWindow, QPushButton + +import qdarktheme + +app = QApplication(sys.argv) +# Apply the complete dark theme to your Qt App. +qdarktheme.setup_theme() + +main_win = QMainWindow() +push_button = QPushButton("PyQtDarkTheme!!") +main_win.setCentralWidget(push_button) + +main_win.show() + +app.exec() +``` + +Further information can be found in our docs: + +- [Usage Guide](https://pyqtdarktheme.readthedocs.io/en/latest/how_to_use.html) + +### Enable HiDPI + +```Python +# enable_hi_dpi() must be called before the instantiation of QApplication. +qdarktheme.enable_hi_dpi() +app = QApplication(sys.argv) +qdarktheme.setup_theme() +``` + +For Qt6 bindings, HiDPI “just works” without using this function. + +### Light theme + +```Python +qdarktheme.setup_theme("light") +``` + +### Sync with OS's theme and accent + +```Python +qdarktheme.setup_theme("auto") +``` + + + +On macOS, qdarktheme also syncs with accent colors. + + +### Customizing colors + +You can customize the theme color. + +```python +# Customize accent color. +qdarktheme.setup_theme(custom_colors={"primary": "#D0BCFF"}) +``` + +For a list of all customizable colors, see the Theme Color Reference: + +- [Theme Color](https://pyqtdarktheme.readthedocs.io/en/latest/reference/theme_color.html) + +### Sharp frame + +You can change the corner style. + +```python +# Default is "rounded". +stylesheet = qdarktheme.setup_theme(corner_shape="sharp") +``` + +### QPalette and stylesheet + +You can also only load QPalette and stylesheet. `qdarktheme.setup_theme` uses the following functions internally. + +```Python +palette = qdarktheme.load_palette(theme="dark") +stylesheet = qdarktheme.load_stylesheet(theme="dark") +``` + +## Example + +To check all Qt widgets, run: + +```plaintext +python -m qdarktheme.widget_gallery +``` + +## License + +The svg files for the PyQtDarkTheme are derived [Material design icons](https://fonts.google.com/icons)(Apache License Version 2.0). Qt stylesheets are originally fork of [QDarkStyleSheet](https://github.com/ColinDuquesnoy/QDarkStyleSheet)(MIT License). Other files are covered by PyQtDarkTheme's MIT license. The accent detector(qdarktheme/_os_appearance/_accent/_mac_detect) is inspired by [darkdetect](https://github.com/albertosottile/darkdetect)(3-clause BSD License). + +## Contributing + +All contributions, bug reports, bug fixes, documentation improvements, enhancements, and ideas are welcome. You can get started by reading this: + +- [Contributing Guide](https://pyqtdarktheme.readthedocs.io/en/latest/contributing.html) + +## Change log + +See [Releases](https://github.com/5yutan5/PyQtDarkTheme/releases). + + +%package help +Summary: Development documents and examples for pyqtdarktheme +Provides: python3-pyqtdarktheme-doc +%description help +# PyQtDarkTheme + +PyQtDarkTheme applies a flat dark theme to QtWidgets application. There's a light theme too. Color balanced from the dark theme for easy viewing in daylight. + +Check out the [complete documentation](https://pyqtdarktheme.readthedocs.io). + +**Project status** +[](https://pypi.org/project/pyqtdarktheme/) +[](https://www.python.org/downloads/) +[](https://www.qt.io/qt-for-python) +[](https://github.com/5yutan5/PyQtDarkTheme/blob/main/LICENSE.txt/) + +**Tests** +[](https://results.pre-commit.ci/latest/github/5yutan5/PyQtDarkTheme/main) +[](https://codecov.io/gh/5yutan5/PyQtDarkTheme) +[](https://pyqtdarktheme.readthedocs.io/en/latest/?badge=latest) + +## Features + +- A flat dark and light theme +- Support PySide and PyQt +- Sync with OS's theme and accent (Mac, Windows, Linux) +- Resolve the style differences between Qt versions +- Provide dark/light theme QPalette +- Override Qt old standard icons + +## Themes + +### Dark Theme + + + +### Light Theme + + + +## Requirements + +- [Python 3.7+](https://www.python.org/downloads/) +- Qt 5.15+ +- PySide6, PyQt6, PyQt5 or PySide2 + +## Installation Method + +- Last released version + + ```plaintext + pip install pyqtdarktheme + ``` + +- Latest development version + + ```plaintext + pip install git+https://github.com/5yutan5/PyQtDarkTheme.git@main + ``` + +## Usage + +```Python +import sys + +from PySide6.QtWidgets import QApplication, QMainWindow, QPushButton + +import qdarktheme + +app = QApplication(sys.argv) +# Apply the complete dark theme to your Qt App. +qdarktheme.setup_theme() + +main_win = QMainWindow() +push_button = QPushButton("PyQtDarkTheme!!") +main_win.setCentralWidget(push_button) + +main_win.show() + +app.exec() +``` + +Further information can be found in our docs: + +- [Usage Guide](https://pyqtdarktheme.readthedocs.io/en/latest/how_to_use.html) + +### Enable HiDPI + +```Python +# enable_hi_dpi() must be called before the instantiation of QApplication. +qdarktheme.enable_hi_dpi() +app = QApplication(sys.argv) +qdarktheme.setup_theme() +``` + +For Qt6 bindings, HiDPI “just works” without using this function. + +### Light theme + +```Python +qdarktheme.setup_theme("light") +``` + +### Sync with OS's theme and accent + +```Python +qdarktheme.setup_theme("auto") +``` + + + +On macOS, qdarktheme also syncs with accent colors. + + +### Customizing colors + +You can customize the theme color. + +```python +# Customize accent color. +qdarktheme.setup_theme(custom_colors={"primary": "#D0BCFF"}) +``` + +For a list of all customizable colors, see the Theme Color Reference: + +- [Theme Color](https://pyqtdarktheme.readthedocs.io/en/latest/reference/theme_color.html) + +### Sharp frame + +You can change the corner style. + +```python +# Default is "rounded". +stylesheet = qdarktheme.setup_theme(corner_shape="sharp") +``` + +### QPalette and stylesheet + +You can also only load QPalette and stylesheet. `qdarktheme.setup_theme` uses the following functions internally. + +```Python +palette = qdarktheme.load_palette(theme="dark") +stylesheet = qdarktheme.load_stylesheet(theme="dark") +``` + +## Example + +To check all Qt widgets, run: + +```plaintext +python -m qdarktheme.widget_gallery +``` + +## License + +The svg files for the PyQtDarkTheme are derived [Material design icons](https://fonts.google.com/icons)(Apache License Version 2.0). Qt stylesheets are originally fork of [QDarkStyleSheet](https://github.com/ColinDuquesnoy/QDarkStyleSheet)(MIT License). Other files are covered by PyQtDarkTheme's MIT license. The accent detector(qdarktheme/_os_appearance/_accent/_mac_detect) is inspired by [darkdetect](https://github.com/albertosottile/darkdetect)(3-clause BSD License). + +## Contributing + +All contributions, bug reports, bug fixes, documentation improvements, enhancements, and ideas are welcome. You can get started by reading this: + +- [Contributing Guide](https://pyqtdarktheme.readthedocs.io/en/latest/contributing.html) + +## Change log + +See [Releases](https://github.com/5yutan5/PyQtDarkTheme/releases). + + +%prep +%autosetup -n pyqtdarktheme-2.1.0 + +%build +%py3_build + +%install +%py3_install +install -d -m755 %{buildroot}/%{_pkgdocdir} +if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi +if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi +if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi +if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi +pushd %{buildroot} +if [ -d usr/lib ]; then + find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/lib64 ]; then + find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/bin ]; then + find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/sbin ]; then + find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst +fi +touch doclist.lst +if [ -d usr/share/man ]; then + find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst +fi +popd +mv %{buildroot}/filelist.lst . +mv %{buildroot}/doclist.lst . + +%files -n python3-pyqtdarktheme -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Wed May 31 2023 Python_Bot <Python_Bot@openeuler.org> - 2.1.0-1 +- Package Spec generated @@ -0,0 +1 @@ +6efc5786ea0e3cd42c97548bb6911835 pyqtdarktheme-2.1.0.tar.gz |