hidpi-tk


Namehidpi-tk JSON
Version 1.3.0 PyPI version JSON
download
home_pageNone
SummaryFixed Tkinter-based GUI window blurry on high-DPI monitors.
upload_time2025-08-10 02:55:21
maintainerNone
docs_urlNone
authorNone
requires_python>=3.6
licenseNone
keywords hidpi-tk tkinter dpi highdpi blurry tkdpi
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ===================
hidpi-tk
===================
.. image:: https://github.com/Wulian233/hidpi-tk/actions/workflows/ci.yml/badge.svg
    :target: https://github.com/Wulian233/hidpi-tk/actions/workflows/ci.yml
.. image:: https://img.shields.io/pypi/v/hidpi-tk.svg
    :target: https://pypi.python.org/pypi/hidpi-tk



``hidpi-tk`` is a Python library designed to enhance Tkinter-based GUI applications
by automatically adjusting DPI scaling and font sizes, particularly for high-DPI monitors.

.. image:: ./screenshot.png
    :target: ./screenshot.png

Features
===================

- **Automatic DPI Scaling**

- **Automatic Font Size Adjustment**

- **Without side-effects**

- **Cross-Platform**

Usage
===========================

To use this library, simply replace the standard ``Tk`` class with ``DPIAwareTk``.
The library will handle DPI and font adjustments automatically:

.. code:: python

    from hidpi_tk import DPIAwareTk
    # from tkinter import Tk

    # root = Tk()
    root = DPIAwareTk()
    # After that use like Tk instance
    root.mainloop()

Details
======================

On Windows systems, it provides full support for scaling on high-DPI monitors,
particularly for Windows 8.1 and newer. For older Windows systems (Vista & Win7)
, it still adjusts DPI and font scaling to an extent.

For other systems, such as macOS and Linux, the operating systems themselves
provide excellent high-DPI support, so this library does not include specific
code for DPI adjustments. However, using this library is still beneficial as
it adjusts font scaling, which makes cross-platform development easier and
more consistent.


License
=======

``hidpi-tk`` library is offered under Apache 2 license.

Thanks
======

The library development is based on `high-dpi-tkinter <https://github.com/not-dev/high-dpi-tkinter>`_.

Added: High-DPI font scaling support, legacy Windows support, bug fixes, and modern Python standards.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "hidpi-tk",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": null,
    "keywords": "hidpi-tk, tkinter, dpi, highdpi, blurry, tkdpi",
    "author": null,
    "author_email": "Wulian233 <xiguawulian@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/72/74/d1dfff432da7a3cbe941599d99e94f207e78041c5d4c3e23910acccb368a/hidpi_tk-1.3.0.tar.gz",
    "platform": null,
    "description": "===================\r\nhidpi-tk\r\n===================\r\n.. image:: https://github.com/Wulian233/hidpi-tk/actions/workflows/ci.yml/badge.svg\r\n    :target: https://github.com/Wulian233/hidpi-tk/actions/workflows/ci.yml\r\n.. image:: https://img.shields.io/pypi/v/hidpi-tk.svg\r\n    :target: https://pypi.python.org/pypi/hidpi-tk\r\n\r\n\r\n\r\n``hidpi-tk`` is a Python library designed to enhance Tkinter-based GUI applications\r\nby automatically adjusting DPI scaling and font sizes, particularly for high-DPI monitors.\r\n\r\n.. image:: ./screenshot.png\r\n    :target: ./screenshot.png\r\n\r\nFeatures\r\n===================\r\n\r\n- **Automatic DPI Scaling**\r\n\r\n- **Automatic Font Size Adjustment**\r\n\r\n- **Without side-effects**\r\n\r\n- **Cross-Platform**\r\n\r\nUsage\r\n===========================\r\n\r\nTo use this library, simply replace the standard ``Tk`` class with ``DPIAwareTk``.\r\nThe library will handle DPI and font adjustments automatically:\r\n\r\n.. code:: python\r\n\r\n    from hidpi_tk import DPIAwareTk\r\n    # from tkinter import Tk\r\n\r\n    # root = Tk()\r\n    root = DPIAwareTk()\r\n    # After that use like Tk instance\r\n    root.mainloop()\r\n\r\nDetails\r\n======================\r\n\r\nOn Windows systems, it provides full support for scaling on high-DPI monitors,\r\nparticularly for Windows 8.1 and newer. For older Windows systems (Vista & Win7)\r\n, it still adjusts DPI and font scaling to an extent.\r\n\r\nFor other systems, such as macOS and Linux, the operating systems themselves\r\nprovide excellent high-DPI support, so this library does not include specific\r\ncode for DPI adjustments. However, using this library is still beneficial as\r\nit adjusts font scaling, which makes cross-platform development easier and\r\nmore consistent.\r\n\r\n\r\nLicense\r\n=======\r\n\r\n``hidpi-tk`` library is offered under Apache 2 license.\r\n\r\nThanks\r\n======\r\n\r\nThe library development is based on `high-dpi-tkinter <https://github.com/not-dev/high-dpi-tkinter>`_.\r\n\r\nAdded: High-DPI font scaling support, legacy Windows support, bug fixes, and modern Python standards.\r\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Fixed Tkinter-based GUI window blurry on high-DPI monitors.",
    "version": "1.3.0",
    "project_urls": {
        "Bug Tracker": "https://github.com/Wulian233/hidpi-tk/issues",
        "Changelog": "https://github.com/Wulian233/hidpi-tk/blob/main/CHANGES.rst",
        "GitHub": "https://github.com/Wulian233/hidpi-tk",
        "Repository": "https://github.com/Wulian233/hidpi-tk.git"
    },
    "split_keywords": [
        "hidpi-tk",
        " tkinter",
        " dpi",
        " highdpi",
        " blurry",
        " tkdpi"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "d41de0450e620a8d70bf54fd576819dc2c28c2d04b9b0df44c80ae330f100b8b",
                "md5": "907c4e994e6ff2110d490eea204bdbd2",
                "sha256": "41bd6d289dabd53a226204c3e33c40eceddc4741038041c96fc1fc2db4e6b593"
            },
            "downloads": -1,
            "filename": "hidpi_tk-1.3.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "907c4e994e6ff2110d490eea204bdbd2",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 9277,
            "upload_time": "2025-08-10T02:55:20",
            "upload_time_iso_8601": "2025-08-10T02:55:20.879531Z",
            "url": "https://files.pythonhosted.org/packages/d4/1d/e0450e620a8d70bf54fd576819dc2c28c2d04b9b0df44c80ae330f100b8b/hidpi_tk-1.3.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "7274d1dfff432da7a3cbe941599d99e94f207e78041c5d4c3e23910acccb368a",
                "md5": "6e710d53de96c1dbbdb1c049469eaee1",
                "sha256": "f59323f5072e4672beac0dced3cf1ac00a4b2abaf1cd065ca27612b1b661a30c"
            },
            "downloads": -1,
            "filename": "hidpi_tk-1.3.0.tar.gz",
            "has_sig": false,
            "md5_digest": "6e710d53de96c1dbbdb1c049469eaee1",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 8752,
            "upload_time": "2025-08-10T02:55:21",
            "upload_time_iso_8601": "2025-08-10T02:55:21.918683Z",
            "url": "https://files.pythonhosted.org/packages/72/74/d1dfff432da7a3cbe941599d99e94f207e78041c5d4c3e23910acccb368a/hidpi_tk-1.3.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-08-10 02:55:21",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Wulian233",
    "github_project": "hidpi-tk",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "hidpi-tk"
}
        
Elapsed time: 3.27092s