Skip to main content

Gui Dark Theme

Install

pip install yongshi-guidarktheme

Dark Theme settings

Import

To import the dark theme

from guidarktheme.widget_template import QDarkPalette

How to

class QMainApplication(QApplication):
    """A Dark styled application."""
    def __init__(self, *__args):
        super().__init__(*__args)

        QFontDatabase.addApplicationFont("source/schoensperger.otf")
        self.setStyle("Fusion")
        self.setPalette(QDarkPalette())
        # self.setFont(QFont("schoensperger", 20))
        self.setStyleSheet("QToolTip { color: #ffffff; background-color: grey; border: 1px solid white; }")

Clickable Widgets

Import

To import the dark themed widgets, i.e. a clickable label widget

from guidarktheme.widget_template import QClickLabel

or to just import everything

from guidarktheme.widget_template import *

How to

label = QClickLabel()
label.setText('This label is clickable')
label.clicked.connect(clicklabel)

def clicklabel:
    print("This label is clicked")

Decorators

Import

To import the decorators

from guidarktheme.decorators import (
    Decorators,
    QInputDialogUserInterruption,
    QMessageBoxUserInterruption,
)

How to

to add a loading cursor to a called method:

@Decorators.loading_cursor

to revert back to normal cursor for some reason, usually for user input requests:

@Decorators.user_input_interruption

to use input dialogs that automatically reverts to normal arrow and back to loading cursor after input is done:

result, okPressed = QInputDialogUserInterruption.getText(
    self, "User input requested", "This dialog box shows a regular cursor, letting the user know input is possible"
    )

if result and okPressed:
    print(result)

License

Licensed under GPL-3.0-or-later, see LICENSE file for details.

Copyright © 2020 Michael-Yongshi.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Metadata

Release files for yongshi-guidarktheme 1.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for yongshi-guidarktheme 1.1.1
File Size Uploaded
yongshi-guidarktheme-1.1.1.tar.gz 3.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for yongshi-guidarktheme 1.1.1
File Interpreter ABI Platform
yongshi_guidarktheme-1.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 20.5 kB

Release files / yongshi-guidarktheme-1.1.1.tar.gz

Download URL yongshi-guidarktheme-1.1.1.tar.gz
Size 3.6 kB
Tags Source
SHA-256 checksum
How to use checksums
8ff30423cc87109b45b9ea45ca1d7ba2de2c55988d09812f27476c5c0252c7e8
BLAKE2b-256 checksum
How to use checksums
fa6a692df4546f009d697b106c28d160365469289bf3d3350c9f6a00230a988d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.6.8

Release files / yongshi_guidarktheme-1.1.1-py3-none-any.whl

Download URL yongshi_guidarktheme-1.1.1-py3-none-any.whl
Size 16.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
85211c450458e2b0e21f925755da208a0ffa309a2a5dcb74a995b8cc308e8a7e
BLAKE2b-256 checksum
How to use checksums
11633bb6ceda718187425cd67e1c85a87627254f6f5b351148defb97bbf15984
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.6.8

Release history Release notifications | RSS feed

This release

1.1.1 This release

2 release files

1.1.0

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page