UI polish: overlay color, debounce, and tooltips

- Added overlay color storage to settings import/export
- Removed generic keyboard shortcuts from menus and replaced them with localized tooltips
- Added QTimer debouncing to log history dialog to prevent status string spam
- Ensured export worker gracefully handles KeyErrors with standard return tuple
This commit is contained in:
lm
2026-03-24 23:17:05 +01:00
parent 9ff56ce7ef
commit dab226f55e
5 changed files with 469 additions and 111 deletions
+17
View File
@@ -155,3 +155,20 @@ def test_calculate_grouping_score():
# 1 center pixel = 80/80 = 1.0.
# Overall it should be a healthy percentage.
assert res_9x9 > 10.0 # significant grouping
def test_export_worker_error():
from app.qt.image_processor import _export_worker
# 1. Provide a missing file to trigger an exception during Image.open()
res1 = _export_worker(("missing_file.png", {
"hue_min": 0, "hue_max": 360, "sat_min": 0, "sat_max": 100,
"val_min": 0, "val_max": 100, "exclude_bg": False,
"exclude_bg_rgb": (0, 0, 0), "exclude_bg_tolerance": 5,
"prefer_dark": False, "exclude_shapes": [], "exclude_ref_size": None,
"weights": {}
}))
assert res1 == ("missing_file.png", None, None, None, None, None)
# 2. Provide an empty params dict to trigger KeyError before opening image
res2 = _export_worker(("dummy.png", {}))
assert res2 == ("dummy.png", None, None, None, None, None)