Skip to content

Commit

Permalink
Minor refactor and requirements.txt update
Browse files Browse the repository at this point in the history
  • Loading branch information
Edgiest05 committed May 17, 2024
1 parent 07527cf commit 3f025ab
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 27 deletions.
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ PySide6_Addons>=6.5.1.1,<=6.6.3.1
PySide6_Essentials>=6.5.1.1,<=6.6.3.1
typing_extensions>=3.10.0.0,<=4.11.0
ujson>=5.8.0,<=5.9.0
watchdog>=4.0.0
cachetools>=5.3.3
watchdog>=4.0.0,<5.0.0
cachetools>=5.3.3,<6.0.0
34 changes: 9 additions & 25 deletions tagstudio/src/qt/ts_qt.py
Original file line number Diff line number Diff line change
Expand Up @@ -1219,16 +1219,12 @@ def update_thumbs(self):
ItemType.ENTRY,
entry.id,
append=(
True
if QGuiApplication.keyboardModifiers()
QGuiApplication.keyboardModifiers()
== Qt.KeyboardModifier.ControlModifier
else False
),
bridge=(
True
if QGuiApplication.keyboardModifiers()
QGuiApplication.keyboardModifiers()
== Qt.KeyboardModifier.ShiftModifier
else False
),
)
)
Expand Down Expand Up @@ -1484,25 +1480,13 @@ def create_collage(self) -> None:
# ], prompt='', required=True)
full_thumb_size = 0

thumb_size: int = (
32
if (full_thumb_size == 0)
else (
64
if (full_thumb_size == 1)
else (
128
if (full_thumb_size == 2)
else (
256
if (full_thumb_size == 3)
else 512
if (full_thumb_size == 4)
else 32
)
)
)
)
size_options = {
1: 64,
2: 128,
3: 256,
4: 512,
}
thumb_size = size_options.get(full_thumb_size, 32)
thumb_size = 16

# if len(com) > 1 and com[1] == 'keep-aspect':
Expand Down

0 comments on commit 3f025ab

Please sign in to comment.