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 44aba73
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 29 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
36 changes: 9 additions & 27 deletions tagstudio/src/qt/ts_qt.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
from datetime import datetime as dt
from pathlib import Path
from queue import Queue
from watchdog.observers import Observer
from watchdog.events import DirModifiedEvent, FileSystemEventHandler
from typing import Optional

from PIL import Image
Expand Down Expand Up @@ -1219,16 +1217,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 +1478,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 44aba73

Please sign in to comment.