rebrand to orc-gallery and optimise search/thumbnail responsiveness

Rebrand:
- Rename project, binary, desktop file, and icons from screenshot-gallery/orcs-gallery to orc-gallery
- Update display name to "ORC Gallery" throughout (window title, .desktop, README, plan.md)
- Config dir changed from ScreenshotOCRGallery to OrcGallery

Performance:
- cancelSearch() is now non-blocking; new searches start immediately instead of waiting for the previous thread to drain
- Remove double-emit from QFutureWatcher::finished handler; results emitted once directly from background thread
- SQLite WAL mode + NORMAL sync + 20 MB page cache + memory temp store + 256 MB mmap applied on init and per-thread connections
- Typing inactivity timer reduced from 500 ms to 150 ms
- COUNT(*) OVER() window function folds total-count into the main SELECT, eliminating a separate COUNT round-trip per search
- ImageThumbnail::paintEvent draws the filename overlay; removes 3 child QObjects (QFrame + QLabel + QHBoxLayout) per thumbnail
- loadThumbnailAsync posts QImage load+scale to QThreadPool; QPixmap::fromImage called on main thread via Qt::QueuedConnection invokeMethod; QPointer guards against use-after-free on gallery clear

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
yzinchuk
2026-07-03 03:53:07 -04:00
parent 3fb8d7e507
commit 55454d7ef6
23 changed files with 231 additions and 315 deletions
+8 -8
View File
@@ -1,4 +1,4 @@
# Screenshot OCR Gallery
# ORC Gallery
A Qt6-based image gallery application that allows you to search through OCR data from your screenshots with live preview and dynamic resizing.
@@ -9,7 +9,7 @@ A Qt6-based image gallery application that allows you to search through OCR data
- Smart typing detection with 500ms inactivity timer before searching
- Visual feedback while typing and searching with animated status indicators
- Settings dialog to customize database location and screenshots directory
- Settings stored in ~/.config/ScreenshotOCRGallery/settings.ini for easy access
- Settings stored in ~/.config/OrcGallery/settings.ini for easy access
- Customizable image preload count for performance tuning
- Prominent "Load More Images" button for easy one-click pagination
- Optimized lazy loading that only loads images when needed
@@ -44,7 +44,7 @@ sudo apt install qt6-base-dev libqt6sql6-sqlite cmake
## Database Requirements
The application stores its SQLite database at `~/.local/share/screenshot-gallery/screenshot_ocr.db` (following the XDG Base Directory Specification). The directory and an empty database are created automatically on first run if they do not exist. The path can be changed via the Settings dialog.
The application stores its SQLite database at `~/.local/share/orc-gallery/screenshot_ocr.db` (following the XDG Base Directory Specification). The directory and an empty database are created automatically on first run if they do not exist. The path can be changed via the Settings dialog.
The required schema is:
@@ -67,7 +67,7 @@ CREATE TABLE ocr_results (
3. Run the build script:
```bash
cd screenshot-gallery
cd orc-gallery
chmod +x build.sh
./build.sh
```
@@ -95,7 +95,7 @@ make
After building, run the application:
```bash
./build/screenshot-gallery
./build/orc-gallery
```
## Usage
@@ -125,7 +125,7 @@ After building, run the application:
- Database File Path: Change where your OCR database is stored
- Screenshots Directory: Set the default location for your screenshots
- Image count to pre-load: Adjust how many images are loaded at once (default: 20)
- The settings are automatically saved to ~/.config/ScreenshotOCRGallery/settings.ini
- The settings are automatically saved to ~/.config/OrcGallery/settings.ini
- Changes are applied immediately without requiring a restart
## Search Technology
@@ -135,7 +135,7 @@ This application combines multiple performance-enhancing technologies:
### 1. Customizable Configuration
- **Settings Dialog:** Easily configure database location, screenshots directory, and preload count
- **File Path Selection:** Browse for locations using native file pickers
- **Persistent Settings:** Your configuration is saved in ~/.config/ScreenshotOCRGallery/settings.ini
- **Persistent Settings:** Your configuration is saved in ~/.config/OrcGallery/settings.ini
- **Performance Tuning:** Adjust how many images are preloaded (20 by default)
- **Dynamic Updates:** Changes are applied immediately without requiring a restart
@@ -176,7 +176,7 @@ This application combines multiple performance-enhancing technologies:
### Database Connection Issues
If the application cannot connect to the database:
- The default location is `~/.local/share/screenshot-gallery/screenshot_ocr.db`
- The default location is `~/.local/share/orc-gallery/screenshot_ocr.db`
- Check file permissions on the database file and its parent directory
- Verify the database has the required schema (the app will create an empty one automatically)