Umstellung auf Customtkinter.
This commit is contained in:
@@ -0,0 +1 @@
|
||||
pip
|
||||
24
.venv/Lib/site-packages/darkdetect-0.8.0.dist-info/LICENSE
Normal file
24
.venv/Lib/site-packages/darkdetect-0.8.0.dist-info/LICENSE
Normal file
@@ -0,0 +1,24 @@
|
||||
Copyright (c) 2019, Alberto Sottile
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
* Neither the name of "darkdetect" nor the
|
||||
names of its contributors may be used to endorse or promote products
|
||||
derived from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL "Alberto Sottile" BE LIABLE FOR ANY
|
||||
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
87
.venv/Lib/site-packages/darkdetect-0.8.0.dist-info/METADATA
Normal file
87
.venv/Lib/site-packages/darkdetect-0.8.0.dist-info/METADATA
Normal file
@@ -0,0 +1,87 @@
|
||||
Metadata-Version: 2.1
|
||||
Name: darkdetect
|
||||
Version: 0.8.0
|
||||
Summary: Detect OS Dark Mode from Python
|
||||
Author-email: Alberto Sottile <asottile@gmail.com>
|
||||
License: BSD-3-Clause
|
||||
Project-URL: homepage, http://github.com/albertosottile/darkdetect
|
||||
Project-URL: download, http://github.com/albertosottile/darkdetect/releases
|
||||
Classifier: License :: OSI Approved :: BSD License
|
||||
Classifier: Operating System :: MacOS :: MacOS X
|
||||
Classifier: Operating System :: Microsoft :: Windows :: Windows 10
|
||||
Classifier: Operating System :: POSIX :: Linux
|
||||
Classifier: Programming Language :: Python :: 3
|
||||
Classifier: Programming Language :: Python :: 3.6
|
||||
Classifier: Programming Language :: Python :: 3.7
|
||||
Classifier: Programming Language :: Python :: 3.8
|
||||
Classifier: Programming Language :: Python :: 3.9
|
||||
Classifier: Programming Language :: Python :: 3.10
|
||||
Requires-Python: >=3.6
|
||||
Description-Content-Type: text/markdown
|
||||
License-File: LICENSE
|
||||
Provides-Extra: macos-listener
|
||||
Requires-Dist: pyobjc-framework-Cocoa ; (platform_system == "Darwin") and extra == 'macos-listener'
|
||||
|
||||
# Darkdetect
|
||||
|
||||
This package allows to detect if the user is using Dark Mode on:
|
||||
|
||||
- [macOS 10.14+](https://support.apple.com/en-us/HT208976)
|
||||
- [Windows 10 1607+](https://blogs.windows.com/windowsexperience/2016/08/08/windows-10-tip-personalize-your-pc-by-enabling-the-dark-theme/)
|
||||
- Linux with [a dark GTK theme](https://www.gnome-look.org/browse/cat/135/ord/rating/?tag=dark).
|
||||
|
||||
The main application of this package is to detect the Dark mode from your GUI Python application (Tkinter/wx/pyqt/qt for python (pyside)/...) and apply the needed adjustments to your interface. Darkdetect is particularly useful if your GUI library **does not** provide a public API for this detection (I am looking at you, Qt). In addition, this package does not depend on other modules or packages that are not already included in standard Python distributions.
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```
|
||||
import darkdetect
|
||||
|
||||
>>> darkdetect.theme()
|
||||
'Dark'
|
||||
|
||||
>>> darkdetect.isDark()
|
||||
True
|
||||
|
||||
>>> darkdetect.isLight()
|
||||
False
|
||||
```
|
||||
It's that easy.
|
||||
|
||||
You can create a dark mode switch listener daemon thread with `darkdetect.listener` and pass a callback function. The function will be called with string "Dark" or "Light" when the OS switches the dark mode setting.
|
||||
|
||||
``` python
|
||||
import threading
|
||||
import darkdetect
|
||||
|
||||
# def listener(callback: typing.Callable[[str], None]) -> None: ...
|
||||
|
||||
t = threading.Thread(target=darkdetect.listener, args=(print,))
|
||||
t.daemon = True
|
||||
t.start()
|
||||
```
|
||||
|
||||
## Install
|
||||
|
||||
The preferred channel is PyPI:
|
||||
```
|
||||
pip install darkdetect
|
||||
```
|
||||
|
||||
Alternatively, you are free to vendor directly a copy of Darkdetect in your app. Further information on vendoring can be found [here](https://medium.com/underdog-io-engineering/vendoring-python-dependencies-with-pip-b9eb6078b9c0).
|
||||
|
||||
## Optional Installs
|
||||
|
||||
To enable the macOS listener, additional components are required, these can be installed via:
|
||||
```bash
|
||||
pip install darkdetect[macos-listener]
|
||||
```
|
||||
|
||||
## Notes
|
||||
|
||||
- This software is licensed under the terms of the 3-clause BSD License.
|
||||
- This package can be installed on any operative system, but it will always return `None` unless executed on a OS that supports Dark Mode, including older versions of macOS and Windows.
|
||||
- On macOS, detection of the dark menu bar and dock option (available from macOS 10.10) is not supported.
|
||||
- [Details](https://stackoverflow.com/questions/25207077/how-to-detect-if-os-x-is-in-dark-mode) on the detection method used on macOS.
|
||||
- [Details](https://askubuntu.com/questions/1261366/detecting-dark-mode#comment2132694_1261366) on the experimental detection method used on Linux.
|
||||
18
.venv/Lib/site-packages/darkdetect-0.8.0.dist-info/RECORD
Normal file
18
.venv/Lib/site-packages/darkdetect-0.8.0.dist-info/RECORD
Normal file
@@ -0,0 +1,18 @@
|
||||
darkdetect-0.8.0.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
|
||||
darkdetect-0.8.0.dist-info/LICENSE,sha256=abuEZk7_kzrdyycchm1nYi2cLFOlvaMbGnUjVpwlCv4,1495
|
||||
darkdetect-0.8.0.dist-info/METADATA,sha256=NkgDlZffAhLrmov8qk_CcvNff5Rg-chv3fQ6sJAk4UA,3590
|
||||
darkdetect-0.8.0.dist-info/RECORD,,
|
||||
darkdetect-0.8.0.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
|
||||
darkdetect-0.8.0.dist-info/top_level.txt,sha256=lIG2Q43uQniIc4b-ukidPntGpjQzuFfQCYrgxeM4RVQ,11
|
||||
darkdetect/__init__.py,sha256=q2BLQUpYqbfFzsXHVoQL38IKzwXH50aEFAMy4rBuh50,1412
|
||||
darkdetect/__main__.py,sha256=H1iyyQbJFbpOtKpSEmmV9H5ZjcrAI3zPWcCv1min5Ww,332
|
||||
darkdetect/__pycache__/__init__.cpython-311.pyc,,
|
||||
darkdetect/__pycache__/__main__.cpython-311.pyc,,
|
||||
darkdetect/__pycache__/_dummy.cpython-311.pyc,,
|
||||
darkdetect/__pycache__/_linux_detect.cpython-311.pyc,,
|
||||
darkdetect/__pycache__/_mac_detect.cpython-311.pyc,,
|
||||
darkdetect/__pycache__/_windows_detect.cpython-311.pyc,,
|
||||
darkdetect/_dummy.py,sha256=vKv_XK2dpvIGXZAjlNRuXiCH-vrRy7DBVCQKpbflrsM,473
|
||||
darkdetect/_linux_detect.py,sha256=nfyc7rpVNqMfbfGoXLsB7bPPSMG2cP1AauON73dCiKE,1584
|
||||
darkdetect/_mac_detect.py,sha256=XQfJ9gcbEFWoZxFrrnrsh-AVwIWHV-_oMpk3UCVBMWA,3745
|
||||
darkdetect/_windows_detect.py,sha256=8CCrPeTqNno1zVDXU5CP8D0AzOfqtcYOViHFnK3_WfA,4172
|
||||
5
.venv/Lib/site-packages/darkdetect-0.8.0.dist-info/WHEEL
Normal file
5
.venv/Lib/site-packages/darkdetect-0.8.0.dist-info/WHEEL
Normal file
@@ -0,0 +1,5 @@
|
||||
Wheel-Version: 1.0
|
||||
Generator: bdist_wheel (0.38.4)
|
||||
Root-Is-Purelib: true
|
||||
Tag: py3-none-any
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
darkdetect
|
||||
Reference in New Issue
Block a user