{"id":24635076,"url":"https://github.com/desty2k/qrainbowstylesheet","last_synced_at":"2025-05-08T20:57:53.468Z","repository":{"id":38237176,"uuid":"314839350","full_name":"desty2k/QRainbowStyleSheet","owner":"desty2k","description":"A customizable style sheet for QtWidgets application ","archived":false,"fork":false,"pushed_at":"2023-01-12T16:01:44.000Z","size":32370,"stargazers_count":13,"open_issues_count":5,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-08T20:57:46.046Z","etag":null,"topics":["aero","cross-platform","frameless-windows","pyqt5","pyside2","qtpy","stylesheets"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/desty2k.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGES.rst","contributing":"CONTRIBUTING.rst","funding":null,"license":"LICENSE.rst","code_of_conduct":"CODE_OF_CONDUCT.rst","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-11-21T15:13:24.000Z","updated_at":"2024-02-20T10:53:20.000Z","dependencies_parsed_at":"2023-02-09T12:45:41.575Z","dependency_job_id":null,"html_url":"https://github.com/desty2k/QRainbowStyleSheet","commit_stats":null,"previous_names":[],"tags_count":58,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/desty2k%2FQRainbowStyleSheet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/desty2k%2FQRainbowStyleSheet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/desty2k%2FQRainbowStyleSheet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/desty2k%2FQRainbowStyleSheet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/desty2k","download_url":"https://codeload.github.com/desty2k/QRainbowStyleSheet/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253149568,"owners_count":21861719,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aero","cross-platform","frameless-windows","pyqt5","pyside2","qtpy","stylesheets"],"created_at":"2025-01-25T09:14:21.109Z","updated_at":"2025-05-08T20:57:53.451Z","avatar_url":"https://github.com/desty2k.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"QRainbowStyleSheet\r\n==================\r\n\r\n|Latest PyPI version| |Supported python versions| |Build Status| |Docs Status| |License: MIT|\r\n|License: CC BY 4.0| |Conduct|\r\n\r\nThe most complete customizable stylesheet for Qt application (PySide2,\r\nPyQt5, QtPy, Qt.Py).\r\n\r\nPreview\r\n-------\r\n\r\nFrom version v0.8 qrainbowstyle.windows module supports native Windows calls.\r\nFeatures:\r\n\r\n    - Borders snapping\r\n    - Minimize, restore, close animations\r\n    - Size grips on borders\r\n    - Frame shadow\r\n    - Aero shake\r\n\r\nOn Linux and Darwin qrainbowstyle will load class with its own implementation of these features.\r\nDue to a bug in Qt, window minimizing is not supported on MacOS.\r\n\r\n\r\nFrameless windows\r\n~~~~~~~~~~~~~~~~~\r\n\r\n.. image:: https://raw.githubusercontent.com/desty2k/QRainbowStyleSheet/master/images/frameless_window_v3.png\r\n\r\n\r\nInstallation\r\n------------\r\n\r\nFrom PyPI: Get the latest stable version of ``qrainbowstyle`` package using\r\n*pip* (preferable):\r\n\r\n    .. code:: bash\r\n\r\n        pip install qrainbowstyle\r\n\r\n\r\nFrom code: Download/clone the project, go to ``qrainbowstyle`` folder then:\r\n\r\n-  You can use the *setup* script and pip install.\r\n\r\n    .. code:: bash\r\n\r\n        pip install .\r\n\r\n\r\n-  Or, you can use the *setup* script with Python:\r\n\r\n    .. code:: bash\r\n\r\n        python setup.py install\r\n\r\n\r\nUsage\r\n-----\r\n\r\n\r\nFrameless windows\r\n~~~~~~~~~~~~~~~~~~\r\n.. code:: python\r\n\r\n    import os\r\n    import sys\r\n    import qrainbowstyle\r\n    import qrainbowstyle.windows\r\n\r\n    from qtpy.QtWidgets import QApplication\r\n    from qtpy.QtCore import Qt\r\n\r\n    QApplication.setAttribute(Qt.AA_UseHighDpiPixmaps)\r\n    QApplication.setAttribute(Qt.AA_EnableHighDpiScaling)\r\n\r\n    app = QApplication(sys.argv)\r\n    app.setStyleSheet(qrainbowstyle.load_stylesheet(style=\"oceanic\"))\r\n\r\n    # Package options\r\n    # qrainbowstyle.alignButtonsLeft()\r\n    # qrainbowstyle.userDarwinButtons()\r\n    qrainbowstyle.setAppName(\"My new application\")\r\n    qrainbowstyle.setAppIcon(\"/path/to/icon.ico\")\r\n\r\n    # Create frameless mainwindow\r\n    win = qrainbowstyle.windows.FramelessWindow()\r\n\r\n    # Example of using signals\r\n    win.closeClicked.connect(lambda: print(\"Close clicked!\"))\r\n\r\n    # Create content widget and pass reference to main window\r\n    widget = SomeWidget(win)\r\n\r\n    # Add widget to main window and show it\r\n    win.addContentWidget(widget)\r\n    win.show()\r\n\r\n    sys.exit(app.exec())\r\n\r\n\r\nStyle sheet\r\n~~~~~~~~~~~~\r\n.. code:: python\r\n\r\n    import os\r\n    import sys\r\n    import qrainbowstyle\r\n\r\n    # set the environment variable to use a specific wrapper\r\n    # it can be set to pyqt, pyqt5, or pyside2\r\n    # you do not need to use QtPy to set this variable\r\n    os.environ['QT_API'] = 'pyqt5'\r\n\r\n    # import from QtPy instead of doing it directly\r\n    # note that QtPy always uses PyQt5 API\r\n    from qtpy import QtWidgets\r\n\r\n    # create the application and the main window\r\n    app = QtWidgets.QApplication(sys.argv)\r\n    window = QtWidgets.QMainWindow()\r\n\r\n    # setup stylesheet\r\n    # the default system in qrainbowstyle uses qtpy environment variable\r\n    app.setStyleSheet(qrainbowstyle.load_stylesheet())\r\n\r\n    # run\r\n    window.show()\r\n    app.exec_()\r\n\r\n\r\nIf you are using PyQt5 directly, see the complete example\r\n\r\n.. code:: python\r\n\r\n    import sys\r\n    import qrainbowstyle\r\n    from PyQt5.QtWidgets import QApplication, QMainWindow\r\n\r\n    # create the application and the main window\r\n    app = QApplication(sys.argv)\r\n    window = QMainWindow()\r\n\r\n    # setup stylesheet\r\n    app.setStyleSheet(qrainbowstyle.load_stylesheet_pyqt5())\r\n    # or in new API\r\n    app.setStyleSheet(qrainbowstyle.load_stylesheet(qt_api='pyqt5'))\r\n\r\n    # run\r\n    window.show()\r\n    app.exec_()\r\n\r\n\r\nHere is an example using PySide2\r\n\r\n.. code:: python\r\n\r\n    import sys\r\n    import qrainbowstyle\r\n    from Pyside2.QtWidgets import QApplication, QMainWindow\r\n\r\n    # create the application and the main window\r\n    app = QApplication(sys.argv)\r\n    window = QMainWindow()\r\n\r\n    # setup stylesheet\r\n    app.setStyleSheet(qrainbowstyle.load_stylesheet_pyside2())\r\n    # or in new API\r\n    app.setStyleSheet(qrainbowstyle.load_stylesheet(qt_api='pyside2'))\r\n\r\n    # run\r\n    window.show()\r\n    app.exec_()\r\n\r\n\r\nIf you are using Qt.py, which is different from qtpy, you should install\r\nqtpy then set both to the same binding.\r\n\r\n\r\nAvailable styles\r\n----------------\r\n\r\nCurrently available styles are:\r\n\r\n* Oceanic\r\n* QDarkStyle3\r\n* QDarkstyle3Light\r\n* LightOrange\r\n* DarkOrange\r\n* QDarkStyle (original)\r\n\r\nSelect style by using ``style=`` keyword argument\r\n\r\n.. code:: python\r\n\r\n    qrainbowstyle.load_stylesheet(style=\"lightorange\")\r\n\r\n\r\nWidgets\r\n-------\r\n\r\nIn v0.6 I added a few new widgets which automatically load colors from current\r\nstylesheet's palette.\r\n\r\n\r\nGoogleMapsView\r\n~~~~~~~~~~~~~~\r\n\r\nGoogleMapsView allows to load Google Maps to application. Supports creating markers and polylines.\r\nCall handler captures all map/markers/polylines actions such as map move or marker click/double click.\r\n\r\n.. image:: https://raw.githubusercontent.com/desty2k/QRainbowStyleSheet/master/images/frameless_mainwindow_google_maps_example.png\r\n\r\n\r\nStylePicker\r\n~~~~~~~~~~~\r\n\r\nStylePicker is small widget used to change stylesheet without restarting application.\r\nOnly styles generated by QRainbowStyle are supported. Widget is available in 3 versions: horizontal, vertical and grid.\r\n\r\n.. image:: https://raw.githubusercontent.com/desty2k/QRainbowStyleSheet/master/images/frameless_mainwindow_color_picker_example.png\r\n\r\n\r\nQRoundProgressBar\r\n~~~~~~~~~~~~~~~~~\r\n\r\nModified version of https://github.com/ozmartian/QRoundProgressBar.\r\nI replaced PyQt5 imports with qtpy and fixed widget background.\r\n\r\n.. image:: https://raw.githubusercontent.com/desty2k/QRainbowStyleSheet/master/images/frameless_mainwindow_round_progress_bar.png\r\n\r\n\r\nQtWaitingSpinner\r\n~~~~~~~~~~~~~~~~~\r\n\r\nModified version of https://github.com/fbjorn/QtWaitingSpinner. Added fade out and fade in.\r\nSpinner designer can be found in `qrainbowstyle/widgets/QtWaitingSpinner/designer.py`\r\n\r\n.. image:: https://raw.githubusercontent.com/desty2k/QRainbowStyleSheet/master/images/waiting_spinner_designer.png\r\n\r\n\r\nBuilding your own style sheet\r\n-----------------------------\r\n\r\nDownload/clone the project, go to ``qrainbowstyle`` folder then:\r\n\r\n1. Create new style in palette.py by subclassing BasePalette. New palette should have unique name, for example ``DeepBluePalette``\r\n\r\n2. Override default colors by your own. Example:\r\n\r\n    .. code:: python\r\n\r\n        class DeepBluePalette(BasePalette):\r\n            COLOR_BACKGROUND_1 = \"#263238\"\r\n            COLOR_BACKGROUND_2 = \"#2f4048\"\r\n            COLOR_BACKGROUND_3 = \"#34474f\"\r\n            COLOR_BACKGROUND_4 = \"#394d57\"\r\n            COLOR_BACKGROUND_5 = \"#3d545f\"\r\n            COLOR_BACKGROUND_6 = \"#425b67\"\r\n\r\n            COLOR_TEXT_1 = Gray.B130\r\n            COLOR_TEXT_2 = Gray.B110\r\n            COLOR_TEXT_3 = Gray.B90\r\n            COLOR_TEXT_4 = Gray.B80\r\n\r\n            COLOR_ACCENT_1 = \"#0a4542\"\r\n            COLOR_ACCENT_2 = \"#136460\"\r\n            COLOR_ACCENT_3 = \"#097D74\"\r\n            COLOR_ACCENT_4 = \"#56BFBA\"\r\n            COLOR_ACCENT_5 = \"#C4D6DB\"\r\n\r\n            TITLE_BAR_BACKGROUND_COLOR = COLOR_ACCENT_3\r\n            TITLE_BAR_BUTTONS_HOVER_COLOR = COLOR_ACCENT_4\r\n            TITLE_BAR_BUTTONS_DISABLED_COLOR = COLOR_ACCENT_1\r\n            TITLE_BAR_TEXT_COLOR = COLOR_TEXT_1\r\n\r\n            OPACITY_TOOLTIP = 230\r\n\r\n3. Generate resources for your style by running scripts/process_qrc.py\r\n\r\n4. Install package by running:\r\n\r\n    .. code:: python\r\n\r\n        pip install .\r\n\r\n5. To use style sheet in your application:\r\n\r\n    .. code:: python\r\n\r\n        import qrainbowstyle\r\n\r\n        app = QApplication(sys.argv)\r\n        app.setStyleSheet(qrainbowstyle.load_stylesheet(style=\"deepblue\")\r\n\r\n\r\nWhat is new?\r\n------------\r\n\r\nStarting with new package name, I added frameless widnows and possibility to\r\ndesign your own stylesheet. I added few new SVG icons such as title bar icons.\r\n\r\n- 0.6 - widget subpackage\r\n- 0.8 - Windows API support\r\n- 0.9 - modern style for frameless windows, full support for new color system\r\n\r\n\r\nChangelog\r\n---------\r\n\r\nPlease, see `CHANGES \u003cCHANGES.rst\u003e`__ file.\r\n\r\n\r\nLicense\r\n-------\r\n\r\nThis project is licensed under the MIT license. Images contained in this\r\nproject are licensed under CC-BY license.\r\n\r\nFor more information see `LICENSE \u003cLICENSE.rst\u003e`__ file.\r\n\r\n\r\nAuthors\r\n-------\r\n\r\nFor more information see `AUTHORS \u003cAUTHORS.rst\u003e`__ file.\r\n\r\n\r\nContributing\r\n------------\r\n\r\nMost widgets have been styled. If you find a widget that has not been\r\nstyle, just open an issue on the issue tracker or, better, submit a pull\r\nrequest.\r\n\r\nIf you want to contribute, see `CONTRIBUTING \u003cCONTRIBUTING.rst\u003e`__ file.\r\n\r\n.. |Build Status| image:: https://github.com/desty2k/QRainbowStyleSheet/workflows/build/badge.svg\r\n   :target: https://github.com/desty2k/QRainbowStyleSheet/actions?workflow=build\r\n.. |Docs Status| image:: https://github.com/desty2k/QRainbowStyleSheet/workflows/docs/badge.svg\r\n   :target: https://desty2k.github.io/QRainbowStyleSheet/\r\n.. |Latest PyPI version| image:: https://img.shields.io/pypi/v/QRainbowStyle.svg\r\n   :target: https://pypi.org/project/QRainbowStyle/\r\n.. |Supported python versions| image:: https://img.shields.io/pypi/pyversions/QRainbowStyle.svg\r\n   :target: https://pypi.org/project/QRainbowStyle/\r\n.. |License: MIT| image:: https://img.shields.io/dub/l/vibe-d.svg?color=lightgrey\r\n   :target: https://opensource.org/licenses/MIT\r\n.. |License: CC BY 4.0| image:: https://img.shields.io/badge/License-CC%20BY%204.0-lightgrey.svg\r\n   :target: https://creativecommons.org/licenses/by/4.0/\r\n.. |Conduct| image:: https://img.shields.io/badge/code%20of%20conduct-contributor%20covenant-green.svg?style=flat\u0026color=lightgrey\r\n   :target: https://www.contributor-covenant.org/version/2/0/code_of_conduct/\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdesty2k%2Fqrainbowstylesheet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdesty2k%2Fqrainbowstylesheet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdesty2k%2Fqrainbowstylesheet/lists"}