Skip to content

Commit 3c39174

Browse files
authored
Version 3.1.3
* Corrected watermarking.
1 parent 9b67db8 commit 3c39174

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

pypdfeditor_core/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
__system__ = platform.system()
1717
__author__ = "Nianze A. TAO (Omozawa SUENO)"
18-
__version__ = "3.1.2"
18+
__version__ = "3.1.3"
1919
__all__ = ["main", "reset", "remove"]
2020

2121

pypdfeditor_core/functions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ def add_watermark(
201201
fontname="helv" if font_file == "" else os.path.basename(font_file),
202202
morph=(pos0, Matrix(rotate)),
203203
)
204-
shape.commit()
204+
shape.commit(overlay=False)
205205
return doc
206206

207207

pypdfeditor_core/windows.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,7 @@ def __init__(self, system: str, version: str):
446446
self._title_bar_pos = [
447447
QtCore.QPoint(x, y) for x in range(1200) for y in range(52)
448448
]
449-
# self.setWindowFlags(QtCore.Qt.WindowType.FramelessWindowHint)
449+
# self.setWindowFlags(QtCore.Qt.WindowType.FramelessWindowHint) # not working anymore!
450450
self.setWindowFlags(QtCore.Qt.WindowType.BypassWindowManagerHint)
451451
self.windowEffect.add_shadow_effect(int(self.winId()))
452452
self.windowEffect.add_window_style(int(self.winId()))
@@ -457,6 +457,7 @@ def __init__(self, system: str, version: str):
457457
_loc = wrg.HKEY_CURRENT_USER
458458
_wm = wrg.OpenKeyEx(_loc, r"Control Panel\Desktop\WindowMetrics")
459459
self._border = -int(wrg.QueryValueEx(_wm, "BorderWidth")[0])
460+
wrg.CloseKey(_wm)
460461
except OSError:
461462
self._border = 20
462463
else:

0 commit comments

Comments
 (0)