v0.9.14
This commit is contained in:
@@ -34,6 +34,7 @@ from constants import (
|
||||
ICON_THEME_VIEWER_FALLBACK, KSCREEN_DOCTOR_MARGIN, KWINOUTPUTCONFIG_PATH,
|
||||
VIEWER_AUTO_RESIZE_WINDOW_DEFAULT, VIEWER_FORM_MARGIN, VIEWER_LABEL,
|
||||
VIEWER_WHEEL_SPEED_DEFAULT, XATTR_NAME, ZOOM_DESKTOP_RATIO, UITexts,
|
||||
AVAILABLE_FACE_ENGINES, AVAILABLE_PET_ENGINES
|
||||
)
|
||||
from imagecontroller import ImageController
|
||||
from widgets import FaceNameInputWidget
|
||||
@@ -156,9 +157,9 @@ class FilmstripLoader(QThread):
|
||||
# Small sleep to prevent UI freezing during heavy IO bursts
|
||||
self.msleep(1)
|
||||
try:
|
||||
img, _ = self.cache.get_thumbnail(path, self.icon_size)
|
||||
if img and not img.isNull():
|
||||
self.thumbnail_loaded.emit(index, img)
|
||||
res = self.cache.get_thumbnail(path, self.icon_size)
|
||||
if res.image and not res.image.isNull():
|
||||
self.thumbnail_loaded.emit(index, res.image)
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
@@ -2535,6 +2536,13 @@ class ImageViewer(QWidget):
|
||||
action.setCheckable(True)
|
||||
action.setChecked(item.get("checked", False))
|
||||
|
||||
if "enabled" in item:
|
||||
action.setEnabled(item["enabled"])
|
||||
|
||||
if "tooltip" in item:
|
||||
action.setToolTip(item["tooltip"])
|
||||
action.setStatusTip(item["tooltip"])
|
||||
|
||||
def restore_scroll_for_pane(self, pane, config):
|
||||
"""
|
||||
Applies the saved scrollbar positions from a layout configuration.
|
||||
@@ -2802,8 +2810,13 @@ class ImageViewer(QWidget):
|
||||
{"text": UITexts.VIEWER_MENU_DETECT_AREAS,
|
||||
"icon": "edit-image-face-recognize", "submenu": [
|
||||
{"text": UITexts.VIEWER_MENU_DETECT_FACES,
|
||||
"action": "detect_faces"},
|
||||
{"text": UITexts.VIEWER_MENU_DETECT_PETS, "action": "detect_pets"},
|
||||
"action": "detect_faces",
|
||||
"enabled": bool(AVAILABLE_FACE_ENGINES),
|
||||
"tooltip": "" if AVAILABLE_FACE_ENGINES else UITexts.NO_FACE_LIBS},
|
||||
{"text": UITexts.VIEWER_MENU_DETECT_PETS,
|
||||
"action": "detect_pets",
|
||||
"enabled": bool(AVAILABLE_PET_ENGINES),
|
||||
"tooltip": "" if AVAILABLE_PET_ENGINES else UITexts.NO_FACE_LIBS},
|
||||
]},
|
||||
"separator",
|
||||
{"text": UITexts.VIEWER_MENU_MANIPULATE,
|
||||
|
||||
Reference in New Issue
Block a user