Skip to content

Commit

Permalink
Prepare v2.1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
ful1e5 committed Oct 10, 2022
1 parent 691eb13 commit 6961e28
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 15 deletions.
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [unreleased]

## [v2.1.3] - 10 October 2022

### Changed

- Fix blurry Windows Cursors ful1e5/Bibata_Cursor#119

## [v2.1.2] - 06 October 2022

### Changed
Expand Down Expand Up @@ -234,7 +240,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- auto-generated **symlinks** based on input configs
- `.tar` archive & `directory` as out **package**.

[unreleased]: https://github.com/ful1e5/clickgen/compare/v2.1.2...main
[unreleased]: https://github.com/ful1e5/clickgen/compare/v2.1.3...main
[v2.1.3]: https://github.com/ful1e5/clickgen/compare/v2.1.3...v2.1.2
[v2.1.2]: https://github.com/ful1e5/clickgen/compare/v2.1.2...v2.1.1
[v2.1.1]: https://github.com/ful1e5/clickgen/compare/v2.1.1...v2.1.0
[v2.1.0]: https://github.com/ful1e5/clickgen/compare/v2.1.0...v2.0.0
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2020 Kaiz
Copyright (c) 2020 AbdulKaiz Khatri

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[metadata]
name = clickgen
version = attr: clickgen.__version__
author = Kaiz Khatri
author = Abdulkaiz Khatri
author_email = kaizmandhu@gmail.com
description = The hassle-free cursor building toolbox.
long_description = file: README.md
Expand Down
2 changes: 1 addition & 1 deletion src/clickgen/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-

__version__ = "2.1.2"
__version__ = "2.1.3"
5 changes: 0 additions & 5 deletions src/clickgen/packer/windows.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-

"""Generate Windows install and uninstall files.
.. moduleauthor:: Kaiz Khatri <kaizmandhu@gmail.com>
"""

from pathlib import Path
from string import Template
from typing import Dict, List, Optional, Set
Expand Down
5 changes: 0 additions & 5 deletions src/clickgen/packer/x11.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-

"""Generate X11 .theme files.
.. moduleauthor:: Kaiz Khatri <kaizmandhu@gmail.com>
"""

from pathlib import Path
from string import Template
from typing import Dict
Expand Down
13 changes: 12 additions & 1 deletion src/clickgen/writer/windows.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
from itertools import chain
from typing import List, Tuple

from PIL import Image

from clickgen.cursors import CursorFrame

# .CUR FILE FORMAT
Expand All @@ -26,8 +28,17 @@ def to_cur(frame: CursorFrame) -> bytes:
width, height = clone.size
if width > 256 or height > 256:
raise ValueError(f"Image too big for CUR format: {width}x{height}")

# Place cursor image in 32x32 canvas if png is smaller.
# Otherwise Cursors looks blurry
blob = BytesIO()
image.image.save(blob, "PNG")
if width <= 32 or height <= 32:
canvas = Image.new("RGBA", (32, 32), (0, 0, 0, 0))
canvas.paste(clone, (0, 0))
canvas.save(blob, "PNG")
else:
image.image.save(blob, "PNG")

blob.seek(0)
image_data.append(blob.read())
x_offset, y_offset = image.hotspot
Expand Down

0 comments on commit 6961e28

Please sign in to comment.