Skip to content

Commit

Permalink
Update hPyT version to 1.3.4 and add new features
Browse files Browse the repository at this point in the history
  • Loading branch information
Zingzy committed Sep 6, 2024
1 parent 128982a commit 49143fc
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 8 deletions.
48 changes: 43 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,10 @@ https://github.com/Zingzy/hPyT/assets/90309290/f86df1c7-b75b-4477-974a-eb34cc117
- [Opacity](#opacity)
- [⚡ Flashing Window](#-flashing-window)
- [🎨 Custom TitleBar Color](#-custom-titlebar-color)
- [Set TitleBar Color to windows Accent Color](#set-titlebar-color-to-windows-accent-color)
- [🖌️ Custom TitleBar Text Color](#️-custom-titlebar-text-color)
- [🖌️ Custom Border Color](#️-custom-border-color)
- [Set Border Color to windows Accent Color](#set-border-color-to-windows-accent-color)
- [💻 Window Management](#-window-management)
- [Center a window on the screen](#center-a-window-on-the-screen)
- [Center a secondary window relative to the primary window](#center-a-secondary-window-relative-to-the-primary-window)
Expand All @@ -39,9 +41,12 @@ https://github.com/Zingzy/hPyT/assets/90309290/f86df1c7-b75b-4477-974a-eb34cc117
- [Verical Shake](#verical-shake)
- [Horizontal Shake](#horizontal-shake)
- [✏️ Stylize text](#️-stylize-text)
- [Miscellaneous](#miscellaneous)
- [Miscellaneous](#miscellaneous)
- [Get Windows Accent Color](#get-windows-accent-color)
- [Stylize text](#stylize-text)
- [Workaround for other libraries](#workaround-for-other-libraries)
- [📜 hPyT Changelog](#-hpyt-changelog)
- [v1.3.4](#v134)
- [v1.3.3](#v133)
- [v1.3.2](#v132)
- [v1.3.1](#v131)
Expand All @@ -68,7 +73,7 @@ https://github.com/Zingzy/hPyT/assets/90309290/f86df1c7-b75b-4477-974a-eb34cc117
## 📦 Installing

```powershell
pip install hPyT==1.3.3
pip install hPyT==1.3.4
```

## 📥 Importing
Expand Down Expand Up @@ -127,7 +132,7 @@ current_color = rainbow_title_bar.get_current_color() # or rainbow_border.get_cu
![synchronization example](https://raw.githubusercontent.com/zingzy/hPyT/main/assets/synchronization-example.gif)


**Code for the above illustration available in [`/examples/synchronization-example.py`](https://github.com/Zingzy/hPyT/blob/main/examples/synchronization-example.py)**
**Code for the above illustration available in [`/examples/rainbow-synchronization-example.py`](https://github.com/Zingzy/hPyT/blob/main/examples/rainbow-synchronization-example.py)**


## Hide/Unhide both Maximize and Minimize Buttons (Completely Hides both buttons)
Expand All @@ -148,7 +153,7 @@ all_stuffs.hide(window) # hides close button

![Hide Everything](https://raw.githubusercontent.com/zingzy/hPyT/main/assets/all_stuffs.png)

_**Tip:** to hide the text set the window title to ''_
_**Tip:** to hide the text set the window title to `''`_

## Enable/Disable Maximize Button

Expand Down Expand Up @@ -200,6 +205,15 @@ title_bar_color.set(window, '#ff00ff') # sets the titlebar color to magenta
![Custom TitleBar Color](https://raw.githubusercontent.com/zingzy/hPyT/main/assets/titlebar_color.png)

### Set TitleBar Color to windows Accent Color

```python
title_bar_color.set_accent(window) # sets the titlebar color to the current windows accent color
```

![Accent TitleBar](https://raw.githubusercontent.com/zingzy/hPyT/main/assets/accent_titlebar.png)


## 🖌️ Custom TitleBar Text Color

```python
Expand All @@ -218,6 +232,15 @@ border_color.set(window, '#ff00ff') # sets the border color to magenta

![Custom Border Color](https://raw.githubusercontent.com/zingzy/hPyT/main/assets/border_color.png)

### Set Border Color to windows Accent Color

```python
border_color.set_accent(window) # sets the border color to the current windows accent color
```

![Accent Border](https://raw.githubusercontent.com/zingzy/hPyT/main/assets/accent_border.png)


## 💻 Window Management

### Center a window on the screen
Expand Down Expand Up @@ -306,7 +329,16 @@ title_text.stylize(window, style=1)

![Stylize Text](https://raw.githubusercontent.com/zingzy/hPyT/main/assets/stylize_text.gif)

### Miscellaneous
## Miscellaneous

## Get Windows Accent Color

```python
print(get_accent_color()) # prints the current windows accent color
>>> '#1b595a'
```

## Stylize text

```python
print(stylize_text("Your Custom Text", style=1)) # stylizes your text
Expand All @@ -330,6 +362,12 @@ rainbow_border.start(hwnd)

## 📜 hPyT Changelog

### v1.3.4

- Add method for applying the current windows accent color to the titlebar and border color
- Add method for getting the current windows accent color
- Add type annotations and docstrings to functions for better clarity and autocompletion

### v1.3.3

- Fixed taskbar unhide/hide bug
Expand Down
Binary file added assets/accent_border.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/accent_titlebar.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 3 additions & 1 deletion hPyT/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""
hPyT - Hack Python Titlebar
Author - zingzy
version - 1.3.3
version - 1.3.4
License - MIT
Homepage - https://github.com/zingzy/hPyT
"""
Expand All @@ -22,6 +22,7 @@
window_animation,
window_flash,
window_frame,
get_accent_color,
)

__all__ = [
Expand All @@ -40,6 +41,7 @@
"title_text",
"border_color",
"rainbow_border",
"get_accent_color",
]

__version__ = "1.3.3"
5 changes: 3 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setup(
name='hPyT',
version='1.3.3',
version='1.3.4',
description='Hack Python Titlebar - A package to manipulate windows and titlebar of GUI applications made using python.',
long_description=long_description,
long_description_content_type='text/markdown',
Expand All @@ -28,5 +28,6 @@
'Programming Language :: Python :: 3.12',
"Operating System :: Microsoft :: Windows",
],
keywords='Tkinter wxpython pyqt pyside GUI window controls decorations hide show titlebar',
keywords='Tkinter wxpython pyqt pyside GUI window controls decorations hide show titlebar border color animation',
python_requires='>=3.6',
)

0 comments on commit 49143fc

Please sign in to comment.