From ee9bb4a00a97ea5eda977a11f6c3be8da9dc5284 Mon Sep 17 00:00:00 2001 From: CoprDistGit Date: Wed, 10 May 2023 08:04:02 +0000 Subject: automatic import of python-tkinter-tooltip --- .gitignore | 1 + python-tkinter-tooltip.spec | 549 ++++++++++++++++++++++++++++++++++++++++++++ sources | 1 + 3 files changed, 551 insertions(+) create mode 100644 python-tkinter-tooltip.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore index e69de29..5611f29 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/tkinter-tooltip-2.1.0.tar.gz diff --git a/python-tkinter-tooltip.spec b/python-tkinter-tooltip.spec new file mode 100644 index 0000000..cfd5664 --- /dev/null +++ b/python-tkinter-tooltip.spec @@ -0,0 +1,549 @@ +%global _empty_manifest_terminate_build 0 +Name: python-tkinter-tooltip +Version: 2.1.0 +Release: 1 +Summary: An easy and customisable ToolTip implementation for Tkinter +License: MIT +URL: https://github.com/gnikit/tkinter-tooltip +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/af/ed/4d236a87382ba0ac28a4dfd9551ffec8b2b76111fd416187680a3e352472/tkinter-tooltip-2.1.0.tar.gz +BuildArch: noarch + +Requires: python3-importlib-metadata +Requires: python3-typing-extensions +Requires: python3-pytest +Requires: python3-pytest-cov +Requires: python3-black +Requires: python3-isort +Requires: python3-sphinx +Requires: python3-sphinx-autodoc-typehints +Requires: python3-sphinx-rtd-theme +Requires: python3-sphinxprettysearchresults +Requires: python3-myst-parser +Requires: python3-docutils + +%description +[![Downloads](https://pepy.tech/badge/tkinter-tooltip)](https://pepy.tech/project/tkinter-tooltip) +[![PyPI Latest Release](https://img.shields.io/pypi/v/tkinter-tooltip.svg)](https://pypi.org/project/tkinter-tooltip/) +[![PyPi Release](https://github.com/gnikit/tkinter-tooltip/actions/workflows/python-publish.yml/badge.svg)](https://github.com/gnikit/tkinter-tooltip/actions/workflows/python-publish.yml) +[![Documentation](https://github.com/gnikit/tkinter-tooltip/actions/workflows/docs.yml/badge.svg)](https://github.com/gnikit/tkinter-tooltip/actions/workflows/docs.yml) +[![CodeFactor](https://www.codefactor.io/repository/github/gnikit/tkinter-tooltip/badge)](https://www.codefactor.io/repository/github/gnikit/tkinter-tooltip) +[![PyPI - License](https://img.shields.io/pypi/l/tkinter-tooltip)](https://github.com/gnikit/tkinter-tooltip/blob/master/LICENSE) +[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) + +[![GitHub Sponsor](https://img.shields.io/static/v1?style=social&label=Sponsor&message=%E2%9D%A4&logo=GitHub&color&link=%3Curl%3E)](https://github.com/sponsors/gnikit) +[![PyaPal](https://img.shields.io/static/v1?style=social&label=Donate&message=%E2%9D%A4&logo=Paypal&color&link=%3Curl%3E)](https://paypal.me/inikit) +[![PyaPal](https://img.shields.io/static/v1?style=social&label=Donate&message=%E2%9D%A4&logo=BuyMeACoffee&color&link=%3Curl%3E)](https://www.buymeacoffee.com/gnikit) + +

+ +

+ +# tkinter-tooltip + +## What this is + +This is a simple yet fully customisable tooltip/pop-up implementation for +`tkinter` widgets. It is capable of fully integrating with custom `tkinter` +themes both light and dark ones. + +![alt](https://raw.githubusercontent.com/gnikit/tkinter-tooltip/master/assets/images/header.png) + +## Features + +- normal tooltips +- show tooltip with `s` seconds `delay` +- tooltip tracks mouse cursor +- tooltip displays strings and string returning functions +- fully customisable, tooltip inherits underlying theme style + +## Install + +```shell +pip install tkinter-tooltip +``` + +## Examples + +### Normal tooltips + +By default the tooltip activates when entering and/or moving in the widget are +and deactivates when leaving and/or pressing any button. + +![alt](https://raw.githubusercontent.com/gnikit/tkinter-tooltip/master/assets/images/tootil-simple.png) + +```python +import tkinter as tk +import tkinter.ttk as ttk +from tktooltip import ToolTip + +app = tk.Tk() +b = ttk.Button(app, text="Button") +b.pack() +ToolTip(b, msg="Hover info") +app.mainloop() +``` + +### Delayed tooltip + +![alt](https://raw.githubusercontent.com/gnikit/tkinter-tooltip/master/assets/animations/tooltip-delayed.gif) + +```python +import tkinter as tk +import tkinter.ttk as ttk +from tktooltip import ToolTip + +app = tk.Tk() +b = ttk.Button(app, text="Button") +b.pack() +ToolTip(b, msg="Hover info", delay=2.0) # True by default +app.mainloop() +``` + +### Tracking tooltip + +Have the tooltip follow the mousse cursor around when moving. + +![alt](https://raw.githubusercontent.com/gnikit/tkinter-tooltip/master/assets/animations/tooltip-tracking.gif) + +```python +import tkinter as tk +import tkinter.ttk as ttk +from tktooltip import ToolTip + +app = tk.Tk() +b = ttk.Button(app, text="Button") +b.pack() +ToolTip(b, msg="Hover info", follow=True) # True by default +app.mainloop() +``` + +### Function as tooltip + +Here the tooltip returns the value of `time.asctime()` which updates with every +movement. You can control the refresh rate of the `ToolTip` through the `refresh` +argument by default it is set to `1s`. + +![alt](https://raw.githubusercontent.com/gnikit/tkinter-tooltip/master/assets/animations/tootip-function-refresh.gif) +![alt](https://raw.githubusercontent.com/gnikit/tkinter-tooltip/master/assets/animations/tootip-function.gif) + +```python +import time +import tkinter as tk +import tkinter.ttk as ttk +from tktooltip import ToolTip + +app = tk.Tk() +b = ttk.Button(app, text="Button") +b.pack() +# NOTE: pass the function itself not the return value +ToolTip(b, msg=time.asctime, delay=0) +app.mainloop() +``` + +### Themed tooltip + +`tkinter-tooltip` is fully aware of the underlying theme (in this case a dark theme), +and can even be furher customised by passing `tk` styling arguments to the tooltip + +![alt](https://raw.githubusercontent.com/gnikit/tkinter-tooltip/master/assets/animations/tootip-dark-theme.gif) + +Style tooltip and underlying the button. If a full theme has been used then +the `ToolTip` will inherit the settings of the theme by default. + +```python +import tkinter as tk +import tkinter.ttk as ttk +from tktooltip import ToolTip + +app = tk.Tk() +s = ttk.Style() +s.configure("custom.TButton", foreground="#ffffff", background="#1c1c1c") +b = ttk.Button(app, text="Button", style="custom.TButton") +b.pack() +ToolTip(b, msg="Hover info", delay=0, + parent_kwargs={"bg": "black", "padx": 5, "pady": 5}, + fg="#ffffff", bg="#1c1c1c", padx=10, pady=10) +app.mainloop() +``` + +## Acknowledgements + +`tkinter-tooltip` is based on the original work performed by +[Tucker Beck](http://code.activestate.com/recipes/576688-tooltip-for-tkinter/) +licensed under an MIT License. + +## License + +MIT License + + + + +%package -n python3-tkinter-tooltip +Summary: An easy and customisable ToolTip implementation for Tkinter +Provides: python-tkinter-tooltip +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-tkinter-tooltip +[![Downloads](https://pepy.tech/badge/tkinter-tooltip)](https://pepy.tech/project/tkinter-tooltip) +[![PyPI Latest Release](https://img.shields.io/pypi/v/tkinter-tooltip.svg)](https://pypi.org/project/tkinter-tooltip/) +[![PyPi Release](https://github.com/gnikit/tkinter-tooltip/actions/workflows/python-publish.yml/badge.svg)](https://github.com/gnikit/tkinter-tooltip/actions/workflows/python-publish.yml) +[![Documentation](https://github.com/gnikit/tkinter-tooltip/actions/workflows/docs.yml/badge.svg)](https://github.com/gnikit/tkinter-tooltip/actions/workflows/docs.yml) +[![CodeFactor](https://www.codefactor.io/repository/github/gnikit/tkinter-tooltip/badge)](https://www.codefactor.io/repository/github/gnikit/tkinter-tooltip) +[![PyPI - License](https://img.shields.io/pypi/l/tkinter-tooltip)](https://github.com/gnikit/tkinter-tooltip/blob/master/LICENSE) +[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) + +[![GitHub Sponsor](https://img.shields.io/static/v1?style=social&label=Sponsor&message=%E2%9D%A4&logo=GitHub&color&link=%3Curl%3E)](https://github.com/sponsors/gnikit) +[![PyaPal](https://img.shields.io/static/v1?style=social&label=Donate&message=%E2%9D%A4&logo=Paypal&color&link=%3Curl%3E)](https://paypal.me/inikit) +[![PyaPal](https://img.shields.io/static/v1?style=social&label=Donate&message=%E2%9D%A4&logo=BuyMeACoffee&color&link=%3Curl%3E)](https://www.buymeacoffee.com/gnikit) + +

+ +

+ +# tkinter-tooltip + +## What this is + +This is a simple yet fully customisable tooltip/pop-up implementation for +`tkinter` widgets. It is capable of fully integrating with custom `tkinter` +themes both light and dark ones. + +![alt](https://raw.githubusercontent.com/gnikit/tkinter-tooltip/master/assets/images/header.png) + +## Features + +- normal tooltips +- show tooltip with `s` seconds `delay` +- tooltip tracks mouse cursor +- tooltip displays strings and string returning functions +- fully customisable, tooltip inherits underlying theme style + +## Install + +```shell +pip install tkinter-tooltip +``` + +## Examples + +### Normal tooltips + +By default the tooltip activates when entering and/or moving in the widget are +and deactivates when leaving and/or pressing any button. + +![alt](https://raw.githubusercontent.com/gnikit/tkinter-tooltip/master/assets/images/tootil-simple.png) + +```python +import tkinter as tk +import tkinter.ttk as ttk +from tktooltip import ToolTip + +app = tk.Tk() +b = ttk.Button(app, text="Button") +b.pack() +ToolTip(b, msg="Hover info") +app.mainloop() +``` + +### Delayed tooltip + +![alt](https://raw.githubusercontent.com/gnikit/tkinter-tooltip/master/assets/animations/tooltip-delayed.gif) + +```python +import tkinter as tk +import tkinter.ttk as ttk +from tktooltip import ToolTip + +app = tk.Tk() +b = ttk.Button(app, text="Button") +b.pack() +ToolTip(b, msg="Hover info", delay=2.0) # True by default +app.mainloop() +``` + +### Tracking tooltip + +Have the tooltip follow the mousse cursor around when moving. + +![alt](https://raw.githubusercontent.com/gnikit/tkinter-tooltip/master/assets/animations/tooltip-tracking.gif) + +```python +import tkinter as tk +import tkinter.ttk as ttk +from tktooltip import ToolTip + +app = tk.Tk() +b = ttk.Button(app, text="Button") +b.pack() +ToolTip(b, msg="Hover info", follow=True) # True by default +app.mainloop() +``` + +### Function as tooltip + +Here the tooltip returns the value of `time.asctime()` which updates with every +movement. You can control the refresh rate of the `ToolTip` through the `refresh` +argument by default it is set to `1s`. + +![alt](https://raw.githubusercontent.com/gnikit/tkinter-tooltip/master/assets/animations/tootip-function-refresh.gif) +![alt](https://raw.githubusercontent.com/gnikit/tkinter-tooltip/master/assets/animations/tootip-function.gif) + +```python +import time +import tkinter as tk +import tkinter.ttk as ttk +from tktooltip import ToolTip + +app = tk.Tk() +b = ttk.Button(app, text="Button") +b.pack() +# NOTE: pass the function itself not the return value +ToolTip(b, msg=time.asctime, delay=0) +app.mainloop() +``` + +### Themed tooltip + +`tkinter-tooltip` is fully aware of the underlying theme (in this case a dark theme), +and can even be furher customised by passing `tk` styling arguments to the tooltip + +![alt](https://raw.githubusercontent.com/gnikit/tkinter-tooltip/master/assets/animations/tootip-dark-theme.gif) + +Style tooltip and underlying the button. If a full theme has been used then +the `ToolTip` will inherit the settings of the theme by default. + +```python +import tkinter as tk +import tkinter.ttk as ttk +from tktooltip import ToolTip + +app = tk.Tk() +s = ttk.Style() +s.configure("custom.TButton", foreground="#ffffff", background="#1c1c1c") +b = ttk.Button(app, text="Button", style="custom.TButton") +b.pack() +ToolTip(b, msg="Hover info", delay=0, + parent_kwargs={"bg": "black", "padx": 5, "pady": 5}, + fg="#ffffff", bg="#1c1c1c", padx=10, pady=10) +app.mainloop() +``` + +## Acknowledgements + +`tkinter-tooltip` is based on the original work performed by +[Tucker Beck](http://code.activestate.com/recipes/576688-tooltip-for-tkinter/) +licensed under an MIT License. + +## License + +MIT License + + + + +%package help +Summary: Development documents and examples for tkinter-tooltip +Provides: python3-tkinter-tooltip-doc +%description help +[![Downloads](https://pepy.tech/badge/tkinter-tooltip)](https://pepy.tech/project/tkinter-tooltip) +[![PyPI Latest Release](https://img.shields.io/pypi/v/tkinter-tooltip.svg)](https://pypi.org/project/tkinter-tooltip/) +[![PyPi Release](https://github.com/gnikit/tkinter-tooltip/actions/workflows/python-publish.yml/badge.svg)](https://github.com/gnikit/tkinter-tooltip/actions/workflows/python-publish.yml) +[![Documentation](https://github.com/gnikit/tkinter-tooltip/actions/workflows/docs.yml/badge.svg)](https://github.com/gnikit/tkinter-tooltip/actions/workflows/docs.yml) +[![CodeFactor](https://www.codefactor.io/repository/github/gnikit/tkinter-tooltip/badge)](https://www.codefactor.io/repository/github/gnikit/tkinter-tooltip) +[![PyPI - License](https://img.shields.io/pypi/l/tkinter-tooltip)](https://github.com/gnikit/tkinter-tooltip/blob/master/LICENSE) +[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) + +[![GitHub Sponsor](https://img.shields.io/static/v1?style=social&label=Sponsor&message=%E2%9D%A4&logo=GitHub&color&link=%3Curl%3E)](https://github.com/sponsors/gnikit) +[![PyaPal](https://img.shields.io/static/v1?style=social&label=Donate&message=%E2%9D%A4&logo=Paypal&color&link=%3Curl%3E)](https://paypal.me/inikit) +[![PyaPal](https://img.shields.io/static/v1?style=social&label=Donate&message=%E2%9D%A4&logo=BuyMeACoffee&color&link=%3Curl%3E)](https://www.buymeacoffee.com/gnikit) + +

+ +

+ +# tkinter-tooltip + +## What this is + +This is a simple yet fully customisable tooltip/pop-up implementation for +`tkinter` widgets. It is capable of fully integrating with custom `tkinter` +themes both light and dark ones. + +![alt](https://raw.githubusercontent.com/gnikit/tkinter-tooltip/master/assets/images/header.png) + +## Features + +- normal tooltips +- show tooltip with `s` seconds `delay` +- tooltip tracks mouse cursor +- tooltip displays strings and string returning functions +- fully customisable, tooltip inherits underlying theme style + +## Install + +```shell +pip install tkinter-tooltip +``` + +## Examples + +### Normal tooltips + +By default the tooltip activates when entering and/or moving in the widget are +and deactivates when leaving and/or pressing any button. + +![alt](https://raw.githubusercontent.com/gnikit/tkinter-tooltip/master/assets/images/tootil-simple.png) + +```python +import tkinter as tk +import tkinter.ttk as ttk +from tktooltip import ToolTip + +app = tk.Tk() +b = ttk.Button(app, text="Button") +b.pack() +ToolTip(b, msg="Hover info") +app.mainloop() +``` + +### Delayed tooltip + +![alt](https://raw.githubusercontent.com/gnikit/tkinter-tooltip/master/assets/animations/tooltip-delayed.gif) + +```python +import tkinter as tk +import tkinter.ttk as ttk +from tktooltip import ToolTip + +app = tk.Tk() +b = ttk.Button(app, text="Button") +b.pack() +ToolTip(b, msg="Hover info", delay=2.0) # True by default +app.mainloop() +``` + +### Tracking tooltip + +Have the tooltip follow the mousse cursor around when moving. + +![alt](https://raw.githubusercontent.com/gnikit/tkinter-tooltip/master/assets/animations/tooltip-tracking.gif) + +```python +import tkinter as tk +import tkinter.ttk as ttk +from tktooltip import ToolTip + +app = tk.Tk() +b = ttk.Button(app, text="Button") +b.pack() +ToolTip(b, msg="Hover info", follow=True) # True by default +app.mainloop() +``` + +### Function as tooltip + +Here the tooltip returns the value of `time.asctime()` which updates with every +movement. You can control the refresh rate of the `ToolTip` through the `refresh` +argument by default it is set to `1s`. + +![alt](https://raw.githubusercontent.com/gnikit/tkinter-tooltip/master/assets/animations/tootip-function-refresh.gif) +![alt](https://raw.githubusercontent.com/gnikit/tkinter-tooltip/master/assets/animations/tootip-function.gif) + +```python +import time +import tkinter as tk +import tkinter.ttk as ttk +from tktooltip import ToolTip + +app = tk.Tk() +b = ttk.Button(app, text="Button") +b.pack() +# NOTE: pass the function itself not the return value +ToolTip(b, msg=time.asctime, delay=0) +app.mainloop() +``` + +### Themed tooltip + +`tkinter-tooltip` is fully aware of the underlying theme (in this case a dark theme), +and can even be furher customised by passing `tk` styling arguments to the tooltip + +![alt](https://raw.githubusercontent.com/gnikit/tkinter-tooltip/master/assets/animations/tootip-dark-theme.gif) + +Style tooltip and underlying the button. If a full theme has been used then +the `ToolTip` will inherit the settings of the theme by default. + +```python +import tkinter as tk +import tkinter.ttk as ttk +from tktooltip import ToolTip + +app = tk.Tk() +s = ttk.Style() +s.configure("custom.TButton", foreground="#ffffff", background="#1c1c1c") +b = ttk.Button(app, text="Button", style="custom.TButton") +b.pack() +ToolTip(b, msg="Hover info", delay=0, + parent_kwargs={"bg": "black", "padx": 5, "pady": 5}, + fg="#ffffff", bg="#1c1c1c", padx=10, pady=10) +app.mainloop() +``` + +## Acknowledgements + +`tkinter-tooltip` is based on the original work performed by +[Tucker Beck](http://code.activestate.com/recipes/576688-tooltip-for-tkinter/) +licensed under an MIT License. + +## License + +MIT License + + + + +%prep +%autosetup -n tkinter-tooltip-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-tkinter-tooltip -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Wed May 10 2023 Python_Bot - 2.1.0-1 +- Package Spec generated diff --git a/sources b/sources new file mode 100644 index 0000000..2746a19 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +6de244d84eba8a447153c1ec2b6d1c42 tkinter-tooltip-2.1.0.tar.gz -- cgit v1.2.3