Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ae0a32543c | ||
|
|
96dc8c67c1 | ||
|
|
701eafa744 | ||
|
|
1a6de71ff6 | ||
|
|
a5969cf28f | ||
|
|
eed0646237 | ||
|
|
9a7480cd68 | ||
|
|
8a80cba116 | ||
|
|
3b1fad18fa | ||
|
|
32fb12c210 | ||
|
|
abbde04e50 | ||
|
|
e6808aaf8e | ||
|
|
805c7eedf2 | ||
|
|
2ae32e351d | ||
|
|
ee456773d4 | ||
|
|
57fa3d92dd | ||
|
|
5f4d4ffe1a | ||
|
|
a2d2c0d151 |
No files matched your search
@@ -49,7 +49,7 @@ app.*.map.json
|
|||||||
*.deb
|
*.deb
|
||||||
*.tar.gz
|
*.tar.gz
|
||||||
*.exe
|
*.exe
|
||||||
!dist/imajviewer_1.6.1_amd64.deb
|
!dist/imajviewer_1.9.2_amd64.deb
|
||||||
!dist/imajviewer_setup_1.1.0.exe
|
!dist/imajviewer_setup_1.1.0.exe
|
||||||
deb/usr/lib/imajviewer/
|
deb/usr/lib/imajviewer/
|
||||||
release/
|
release/
|
||||||
|
|||||||
@@ -4,6 +4,113 @@ All notable changes to imajViewer are documented in this file.
|
|||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
|
## [1.9.2] - 2026-10-31
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
- Settings dialog is now tabbed (General / Size / Shortcuts) instead of one
|
||||||
|
long scrolling column; settings dialog panel has no outer margin, no rounded
|
||||||
|
corners and fills the window on small sizes — separated from the canvas by a
|
||||||
|
thin border.
|
||||||
|
- Tab bar spans the panel width; size grid cells stretch to fill the tab.
|
||||||
|
- Size grid: top-left cell is the `H:W` axis label; cells highlight on hover
|
||||||
|
with a pointer cursor.
|
||||||
|
- Sort labels are single words (Time / Name) so they never wrap on narrow
|
||||||
|
windows; section titles are bold.
|
||||||
|
- Shortcut key column uses the UI font (monospace removed) and is narrower.
|
||||||
|
- Footer tagline: "Simple, clean, light, fast image viewer."
|
||||||
|
- Language row (English / Türkçe / Français) added to the General tab as a
|
||||||
|
disabled placeholder — switching is not wired yet.
|
||||||
|
- Title bar: crop-save icon moved from the window controls to the left group,
|
||||||
|
right next to the settings gear.
|
||||||
|
- Hover highlight color is selectable in Settings > General (8-color palette,
|
||||||
|
default red) and applies to title bar buttons, navigation arrows and size
|
||||||
|
grid cells; stored as `hoverColor` in `window.json`.
|
||||||
|
- Title bar drag area: grab cursor and a faint hover tint while the pointer is
|
||||||
|
on the bar (buttons keep the click cursor and their own highlight).
|
||||||
|
|
||||||
|
## [1.9.1] - 2026-10-31
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
- Settings dialog: compact single top row — "Settings" title on the left,
|
||||||
|
print and close as icon buttons on the right (bottom action row removed).
|
||||||
|
- Settings dialog facelift: capped 520×560 centered dialog, M3 section cards,
|
||||||
|
segmented sort control, two-column shortcuts, fixed footer, size grid
|
||||||
|
cells 52×28.
|
||||||
|
|
||||||
|
## [1.9.0] - 2026-10-31
|
||||||
|
|
||||||
|
### Added
|
||||||
|
- Taskbar/alt-tab title now shows the opened image's file name (falls back to
|
||||||
|
"imajViewer" when no image is open).
|
||||||
|
- Full hicolor icon size set (16–256 px) instead of only 64 px, so small-icon
|
||||||
|
contexts (Thunar "Open With", Xfce app menu) keep the symbol visible.
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
- `install.sh` generates the full icon size set and rewrites the hicolor
|
||||||
|
index; uninstall hint updated.
|
||||||
|
- Settings size grid is now a fixed 4-column layout (the wide/narrow
|
||||||
|
transposition introduced in this release was removed).
|
||||||
|
|
||||||
|
## [1.8.0] - 2026-10-31
|
||||||
|
|
||||||
|
### Added
|
||||||
|
- Window size presets: 4×8 screen-ratio grid in settings; clicking a preset
|
||||||
|
resizes the window to that fraction of the screen work area (taskbar
|
||||||
|
excluded). Minimum window size lowered to 160×100.
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- Settings file-properties rows were centered under the longest row (path);
|
||||||
|
now left-aligned.
|
||||||
|
|
||||||
|
## [1.7.2] - 2026-10-25
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- Rotating sometimes vanished before saving: the right-button double-click reset was
|
||||||
|
detected on button *down* against the previous down time and position, so two rotate
|
||||||
|
drags started quickly at nearly the same spot were treated as a double click — all
|
||||||
|
effects (rotation included) were wiped and the second drag was ignored, so `Ctrl+S`
|
||||||
|
saved an unrotated crop. A double click is now only counted for actual clicks
|
||||||
|
(movement ≤ 4 px, decided on button up), a drag breaks the chain, and
|
||||||
|
`pointer up` is matched by pointer id so a left-drag pan never counts as a click.
|
||||||
|
|
||||||
|
## [1.7.1] - 2026-10-25
|
||||||
|
|
||||||
|
### Added
|
||||||
|
- Zoom percentage badge at the bottom center, between the previous/next buttons: shown
|
||||||
|
together with the hover controls, translucent background, live while wheeling
|
||||||
|
(100% = one image pixel per screen pixel), recomputed on fill/fit toggle, image
|
||||||
|
change and window resize.
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
- Image header parsing (pixel size without decoding) moved from the viewer screen into
|
||||||
|
`lib/services/image_header.dart`; the settings file-properties panel and the zoom badge
|
||||||
|
use the same code.
|
||||||
|
|
||||||
|
## [1.7.0] - 2026-10-20
|
||||||
|
|
||||||
|
### Added
|
||||||
|
- Settings dialog shows the app version next to the name.
|
||||||
|
- Fine zoom: `Ctrl`+wheel zooms 1% per step (plain wheel stays 10% per step).
|
||||||
|
- Settings shortcut list completed: `Ctrl+O` (open), `Esc` (exit fullscreen), scroll/zoom,
|
||||||
|
`Ctrl`+scroll fine zoom, left-drag pan, double right click (reset effects).
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
- README: zoom feature line and shortcut table updated to match.
|
||||||
|
|
||||||
|
## [1.6.3] - 2026-10-20
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- `SIGSEGV` while resizing the window. The GTK embedder's OpenGL compositor uploaded the frame using
|
||||||
|
the window's new dimensions while its pixel buffer still held the previous size, so `memcpy` read
|
||||||
|
past the end of the buffer (`engine/.../linux/fl_compositor_opengl.cc`). Fixed upstream in
|
||||||
|
flutter#187626, which is not part of Flutter 3.44.7 — the Linux build now uses Flutter 3.47.7,
|
||||||
|
where the compositor derives the texture size from the framebuffer itself.
|
||||||
|
|
||||||
|
## [1.6.2] - 2026-10-14
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
- Crop save JPEG quality raised from 93 to 95.
|
||||||
|
|
||||||
## [1.6.1] - 2026-10-14
|
## [1.6.1] - 2026-10-14
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
# imajViewer
|
# imajViewer
|
||||||
|
|
||||||
[](LICENSE)
|
[](LICENSE)
|
||||||
[](https://github.com/alhan/imajviewer/actions/workflows/build.yml)
|
|
||||||
[](https://github.com/alhan/imajviewer/releases/latest)
|
[Releases](https://git.softmediadesign.com/git_alhan/imajviewer/releases)
|
||||||
|
|
||||||
Ultra-lightweight image viewer written in Flutter — Linux & Windows.
|
Ultra-lightweight image viewer written in Flutter — Linux & Windows.
|
||||||
|
|
||||||
@@ -12,7 +12,8 @@ Ultra-lightweight image viewer written in Flutter — Linux & Windows.
|
|||||||
|
|
||||||
- **Formats:** PNG, JPEG, JFIF, WebP, BMP, GIF, WBMP
|
- **Formats:** PNG, JPEG, JFIF, WebP, BMP, GIF, WBMP
|
||||||
- **Pan:** Left drag
|
- **Pan:** Left drag
|
||||||
- **Zoom:** Mouse wheel (cursor-centered; viewport-centered in rotate mode)
|
- **Zoom:** Mouse wheel — 10% per step, cursor-centered (viewport-centered in rotate mode);
|
||||||
|
hold `Ctrl` for fine zoom (1% per step)
|
||||||
- **Fill/Fit toggle:** Double left click
|
- **Fill/Fit toggle:** Double left click
|
||||||
- **Contrast:** Right drag + vertical move
|
- **Contrast:** Right drag + vertical move
|
||||||
- **Saturation:** Ctrl + Right drag + vertical move
|
- **Saturation:** Ctrl + Right drag + vertical move
|
||||||
@@ -26,7 +27,7 @@ Ultra-lightweight image viewer written in Flutter — Linux & Windows.
|
|||||||
- **Settings (gear):** sort by time/name, print, shortcut info
|
- **Settings (gear):** sort by time/name, print, shortcut info
|
||||||
- **Print:** send the image to a printer (A4, fit)
|
- **Print:** send the image to a printer (A4, fit)
|
||||||
- **Save visible area:** title bar save icon or `Ctrl+S` — the on-screen region is written at
|
- **Save visible area:** title bar save icon or `Ctrl+S` — the on-screen region is written at
|
||||||
original resolution as JPEG (quality 93) next to the source file (`photo.jpg` →
|
original resolution as JPEG (quality 95) next to the source file (`photo.jpg` →
|
||||||
`photo_143025.jpg`); active effects (contrast/saturation/brightness), rotation and horizontal
|
`photo_143025.jpg`); active effects (contrast/saturation/brightness), rotation and horizontal
|
||||||
flip are baked into the output; if that name already exists, nothing is written and a warning is shown
|
flip are baked into the output; if that name already exists, nothing is written and a warning is shown
|
||||||
- Drag & drop to open images
|
- Drag & drop to open images
|
||||||
@@ -40,7 +41,7 @@ Ultra-lightweight image viewer written in Flutter — Linux & Windows.
|
|||||||
### Linux (.deb, recommended)
|
### Linux (.deb, recommended)
|
||||||
|
|
||||||
No Flutter SDK needed — grab the latest `.deb` from the
|
No Flutter SDK needed — grab the latest `.deb` from the
|
||||||
[Releases page](https://github.com/alhan/imajviewer/releases/latest):
|
[Releases page](https://git.softmediadesign.com/git_alhan/imajviewer/releases):
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
sudo dpkg -i imajviewer_*_amd64.deb
|
sudo dpkg -i imajviewer_*_amd64.deb
|
||||||
@@ -52,7 +53,7 @@ After install, open an image with `xdg-open <file>` or double-click it.
|
|||||||
### Windows (installer)
|
### Windows (installer)
|
||||||
|
|
||||||
Download `imajviewer_setup_*.exe` from the
|
Download `imajviewer_setup_*.exe` from the
|
||||||
[Releases page](https://github.com/alhan/imajviewer/releases/latest) and run it.
|
[Releases page](https://git.softmediadesign.com/git_alhan/imajviewer/releases) and run it.
|
||||||
The installer:
|
The installer:
|
||||||
|
|
||||||
- Installs to Program Files
|
- Installs to Program Files
|
||||||
@@ -83,7 +84,8 @@ folder including `imajviewer.exe` and all DLLs).
|
|||||||
| Interaction | Action |
|
| Interaction | Action |
|
||||||
|---|---|
|
|---|---|
|
||||||
| Left drag | Pan |
|
| Left drag | Pan |
|
||||||
| Mouse wheel | Zoom (cursor-centered) |
|
| Mouse wheel | Zoom (cursor-centered, 10% per step) |
|
||||||
|
| Ctrl + Mouse wheel | Fine zoom (1% per step) |
|
||||||
| Double left click | Fill / Fit toggle |
|
| Double left click | Fill / Fit toggle |
|
||||||
| Right drag + vertical | Contrast (0.0 – 2.0) |
|
| Right drag + vertical | Contrast (0.0 – 2.0) |
|
||||||
| Ctrl + Right drag + vertical | Saturation (0.0 – 2.0) |
|
| Ctrl + Right drag + vertical | Saturation (0.0 – 2.0) |
|
||||||
@@ -92,15 +94,20 @@ folder including `imajviewer.exe` and all DLLs).
|
|||||||
| Ctrl + R | Flip horizontally (clears effects; press again to undo) |
|
| Ctrl + R | Flip horizontally (clears effects; press again to undo) |
|
||||||
| Double right click | Reset (all effects) |
|
| Double right click | Reset (all effects) |
|
||||||
| Left / Right arrow | Previous / next image |
|
| Left / Right arrow | Previous / next image |
|
||||||
| Ctrl + S | Save visible area (JPEG 93, original resolution) |
|
| Ctrl + O | Open file |
|
||||||
|
| Ctrl + S | Save visible area (JPEG 95, original resolution) |
|
||||||
|
| Esc | Exit fullscreen |
|
||||||
| Ctrl + Q | Close window |
|
| Ctrl + Q | Close window |
|
||||||
| Ctrl + Shift + Q | Close all windows |
|
| Ctrl + Shift + Q | Close all windows |
|
||||||
|
|
||||||
## CI / Releases
|
## Releases
|
||||||
|
|
||||||
GitHub Actions builds Linux `.deb` and Windows installer on every push to
|
Installers are published on the
|
||||||
`main`. Pushing a `v*` tag creates a GitHub Release with both installers as
|
[Gitea Releases page](https://git.softmediadesign.com/git_alhan/imajviewer/releases):
|
||||||
assets.
|
|
||||||
|
- Linux `.deb` — `flutter build linux --release` + `bash dist/rebuild-deb.sh`
|
||||||
|
- Windows installer — on a Windows machine: `.\build-windows.ps1`
|
||||||
|
(Flutter + VS 2022 Build Tools + Inno Setup 6)
|
||||||
|
|
||||||
## Development
|
## Development
|
||||||
|
|
||||||
|
|||||||
@@ -7,6 +7,11 @@
|
|||||||
|
|
||||||
# The following line activates a set of recommended lints for Flutter apps,
|
# The following line activates a set of recommended lints for Flutter apps,
|
||||||
# packages, and plugins designed to encourage good coding practices.
|
# packages, and plugins designed to encourage good coding practices.
|
||||||
|
analyzer:
|
||||||
|
exclude:
|
||||||
|
- build/**
|
||||||
|
- windows/**
|
||||||
|
- linux/**
|
||||||
include: package:flutter_lints/flutter.yaml
|
include: package:flutter_lints/flutter.yaml
|
||||||
|
|
||||||
linter:
|
linter:
|
||||||
|
|||||||
@@ -136,6 +136,11 @@ if (-not $SkipInno) {
|
|||||||
Write-Err "Installer scripti bulunamadi: $installerScript"
|
Write-Err "Installer scripti bulunamadi: $installerScript"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Installer surumunu pubspec.yaml'dan aynala (CI'daki adimla ayni)
|
||||||
|
$pubVersion = (Select-String -Path (Join-Path $ProjectRoot 'pubspec.yaml') -Pattern '^version:\s*([0-9]+\.[0-9]+\.[0-9]+)').Matches[0].Groups[1].Value
|
||||||
|
(Get-Content $installerScript -Raw) -replace '#define MyAppVersion "[^"]+"', "#define MyAppVersion `"$pubVersion`"" | Set-Content $installerScript
|
||||||
|
Write-Ok "Inno Setup surumu pubspec'ten: $pubVersion"
|
||||||
|
|
||||||
$distDir = Join-Path $ProjectRoot "dist"
|
$distDir = Join-Path $ProjectRoot "dist"
|
||||||
New-Item -ItemType Directory -Force -Path $distDir | Out-Null
|
New-Item -ItemType Directory -Force -Path $distDir | Out-Null
|
||||||
|
|
||||||
|
|||||||
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 796 B |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 68 KiB |
|
After Width: | Height: | Size: 2.3 KiB |
|
After Width: | Height: | Size: 4.5 KiB |
|
Before Width: | Height: | Size: 6.7 KiB After Width: | Height: | Size: 7.0 KiB |
@@ -11,8 +11,8 @@ fi
|
|||||||
INSTALL_DIR="${HOME}/.local/lib/${APP}"
|
INSTALL_DIR="${HOME}/.local/lib/${APP}"
|
||||||
BIN_LINK="${HOME}/.local/bin/${APP}"
|
BIN_LINK="${HOME}/.local/bin/${APP}"
|
||||||
DESKTOP_FILE="${HOME}/.local/share/applications/${APP}.desktop"
|
DESKTOP_FILE="${HOME}/.local/share/applications/${APP}.desktop"
|
||||||
ICON_DIR="${HOME}/.local/share/icons/hicolor/64x64/apps"
|
ICON_BASE="${HOME}/.local/share/icons/hicolor"
|
||||||
ICON_FILE="${ICON_DIR}/${APP}.png"
|
ICON_SIZES="16 22 24 32 48 64 128 256"
|
||||||
|
|
||||||
# ── Renkler ──
|
# ── Renkler ──
|
||||||
RED='\033[0;31m'; GREEN='\033[0;32m'; CYAN='\033[0;36m'; NC='\033[0m'
|
RED='\033[0;31m'; GREEN='\033[0;32m'; CYAN='\033[0;36m'; NC='\033[0m'
|
||||||
@@ -36,7 +36,7 @@ if [ ! -f "$BUNDLE_DIR/${APP}" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# ── Kurulum dizinleri ──
|
# ── Kurulum dizinleri ──
|
||||||
mkdir -p "$INSTALL_DIR" "$(dirname "$BIN_LINK")" "$(dirname "$DESKTOP_FILE")" "$ICON_DIR"
|
mkdir -p "$INSTALL_DIR" "$(dirname "$BIN_LINK")" "$(dirname "$DESKTOP_FILE")"
|
||||||
|
|
||||||
# ── Binary + kütüphaneler ──
|
# ── Binary + kütüphaneler ──
|
||||||
info "Binary ve kütüphaneler kopyalanıyor…"
|
info "Binary ve kütüphaneler kopyalanıyor…"
|
||||||
@@ -47,37 +47,39 @@ chmod +x "$INSTALL_DIR/${APP}"
|
|||||||
ln -sf "$INSTALL_DIR/${APP}" "$BIN_LINK"
|
ln -sf "$INSTALL_DIR/${APP}" "$BIN_LINK"
|
||||||
ok "Symlink: $BIN_LINK → $INSTALL_DIR/${APP}"
|
ok "Symlink: $BIN_LINK → $INSTALL_DIR/${APP}"
|
||||||
|
|
||||||
# ── İkon (64×64 PNG) ──
|
# ── İkon (hicolor boyut seti: 16–256) ──
|
||||||
if [ ! -f "$ICON_FILE" ]; then
|
if [ -f "$SCRIPT_DIR/imajviewericon.png" ]; then
|
||||||
if [ -f "$SCRIPT_DIR/imajviewericon.png" ]; then
|
info "İkon boyutları üretiliyor (16–256)…"
|
||||||
info "İkon kopyalanıyor (64x64)…"
|
for s in $ICON_SIZES; do
|
||||||
|
d="${ICON_BASE}/${s}x${s}/apps"
|
||||||
|
mkdir -p "$d"
|
||||||
python3 -c "
|
python3 -c "
|
||||||
from PIL import Image
|
from PIL import Image
|
||||||
im = Image.open('$SCRIPT_DIR/imajviewericon.png')
|
im = Image.open('$SCRIPT_DIR/imajviewericon.png')
|
||||||
im.resize((64,64), Image.LANCZOS).save('$ICON_FILE')
|
(im if $s == 256 else im.resize(($s, $s), Image.LANCZOS)).save('$d/${APP}.png')
|
||||||
" && ok "İkon: $ICON_FILE" || err "İkon dönüştürme başarısız!"
|
" || err "İkon dönüştürme başarısız! ($s)"
|
||||||
else
|
done
|
||||||
err "imajviewericon.png bulunamadı!"
|
ok "İkon: ${ICON_BASE} (${ICON_SIZES} px)"
|
||||||
fi
|
|
||||||
else
|
else
|
||||||
ok "İkon zaten mevcut"
|
err "imajviewericon.png bulunamadı!"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# ── Hicolor tema indeksi (GTK ikon temasını tanısın) ──
|
# ── Hicolor tema indeksi (GTK ikon temasını tanısın) ──
|
||||||
if [ ! -f "${HOME}/.local/share/icons/hicolor/index.theme" ]; then
|
{
|
||||||
mkdir -p "${HOME}/.local/share/icons/hicolor/64x64/apps"
|
echo "[Icon Theme]"
|
||||||
cat > "${HOME}/.local/share/icons/hicolor/index.theme" << 'EOF'
|
echo "Name=Hicolor"
|
||||||
[Icon Theme]
|
echo "Comment=Fallback icon theme"
|
||||||
Name=Hicolor
|
dirs=""
|
||||||
Comment=Fallback icon theme
|
for s in $ICON_SIZES; do dirs="${dirs:+$dirs,}${s}x${s}/apps"; done
|
||||||
Directories=64x64/apps
|
echo "Directories=$dirs"
|
||||||
|
for s in $ICON_SIZES; do
|
||||||
[64x64/apps]
|
echo ""
|
||||||
Size=64
|
echo "[${s}x${s}/apps]"
|
||||||
Context=Applications
|
echo "Size=$s"
|
||||||
Type=Fixed
|
echo "Context=Applications"
|
||||||
EOF
|
echo "Type=Fixed"
|
||||||
fi
|
done
|
||||||
|
} > "${ICON_BASE}/index.theme"
|
||||||
|
|
||||||
# ── .desktop dosyası ──
|
# ── .desktop dosyası ──
|
||||||
info ".desktop dosyası oluşturuluyor…"
|
info ".desktop dosyası oluşturuluyor…"
|
||||||
@@ -113,4 +115,4 @@ echo -e "${GREEN} Bir PNG/JPG/WebP dosyasına çift tıklayın${NC}"
|
|||||||
echo -e "${GREEN} veya 'xdg-open <dosya>' ile test edin${NC}"
|
echo -e "${GREEN} veya 'xdg-open <dosya>' ile test edin${NC}"
|
||||||
echo -e "${GREEN}══════════════════════════════════════════${NC}"
|
echo -e "${GREEN}══════════════════════════════════════════${NC}"
|
||||||
echo ""
|
echo ""
|
||||||
echo "Kaldırmak için: rm -rf ${INSTALL_DIR} ${BIN_LINK} ${DESKTOP_FILE} ${ICON_FILE}"
|
echo "Kaldırmak için: rm -rf \"$INSTALL_DIR\" \"$BIN_LINK\" \"$DESKTOP_FILE\" && rm -f ${ICON_BASE}/*x*/apps/${APP}.png"
|
||||||
@@ -1,15 +1,58 @@
|
|||||||
{
|
{
|
||||||
"@@locale": "en",
|
"@@locale": "en",
|
||||||
"settingsTitle": "Settings",
|
"settingsTitle": "Settings",
|
||||||
|
"tabGeneral": "General",
|
||||||
|
"language": "Language",
|
||||||
"sortBy": "Sort by",
|
"sortBy": "Sort by",
|
||||||
"sortByTime": "By time",
|
"hoverColor": "Hover color",
|
||||||
"sortByName": "By name",
|
"sortByTime": "Time",
|
||||||
"appDescription": "Ultra-lightweight and fast image viewer. Open images and use arrows or keyboard keys to navigate.",
|
"sortByName": "Name",
|
||||||
|
"sizeSection": "Size",
|
||||||
|
"appDescription": "Simple, clean, light, fast image viewer.",
|
||||||
"shortcuts": "Shortcuts",
|
"shortcuts": "Shortcuts",
|
||||||
"shortcutsList": "• Left/Right arrow — previous/next image\n• Ctrl+S — save visible area (JPEG 93)\n• Ctrl+R — flip horizontally (clears effects, press again to undo)\n• Ctrl+Q — close window\n• Ctrl+Shift+Q — close all windows\n• Double click — toggle fill/fit\n• Right-drag — contrast\n• Shift+right-drag — rotate\n• Ctrl+right-drag — saturation\n• Ctrl+Shift+right-drag — brightness",
|
"scNavKey": "Left/Right arrow",
|
||||||
|
"scNavAction": "previous/next image",
|
||||||
|
"scOpenKey": "Ctrl+O",
|
||||||
|
"scOpenAction": "open file",
|
||||||
|
"scSaveKey": "Ctrl+S",
|
||||||
|
"scSaveAction": "save visible area (JPEG 95)",
|
||||||
|
"scFlipKey": "Ctrl+R",
|
||||||
|
"scFlipAction": "flip horizontally (clears effects, press again to undo)",
|
||||||
|
"scCloseKey": "Ctrl+Q",
|
||||||
|
"scCloseAction": "close window",
|
||||||
|
"scCloseAllKey": "Ctrl+Shift+Q",
|
||||||
|
"scCloseAllAction": "close all windows",
|
||||||
|
"scFullscreenKey": "F11",
|
||||||
|
"scFullscreenAction": "toggle fullscreen",
|
||||||
|
"scExitFullscreenKey": "Esc",
|
||||||
|
"scExitFullscreenAction": "exit fullscreen",
|
||||||
|
"scZoomKey": "Scroll",
|
||||||
|
"scZoomAction": "zoom (10% per step)",
|
||||||
|
"scFineZoomKey": "Ctrl+scroll",
|
||||||
|
"scFineZoomAction": "fine zoom (1% per step)",
|
||||||
|
"scPanKey": "Left-drag",
|
||||||
|
"scPanAction": "pan",
|
||||||
|
"scFillKey": "Double click",
|
||||||
|
"scFillAction": "toggle fill/fit",
|
||||||
|
"scResetKey": "Right double click",
|
||||||
|
"scResetAction": "reset effects",
|
||||||
|
"scContrastKey": "Right-drag",
|
||||||
|
"scContrastAction": "contrast",
|
||||||
|
"scRotateKey": "Shift+right-drag",
|
||||||
|
"scRotateAction": "rotate",
|
||||||
|
"scSaturationKey": "Ctrl+right-drag",
|
||||||
|
"scSaturationAction": "saturation",
|
||||||
|
"scBrightnessKey": "Ctrl+Shift+right-drag",
|
||||||
|
"scBrightnessAction": "brightness",
|
||||||
"print": "Print",
|
"print": "Print",
|
||||||
|
"fileProperties": "File properties",
|
||||||
|
"propResolution": "Resolution",
|
||||||
|
"propFileSize": "File size",
|
||||||
|
"propFormat": "Format",
|
||||||
|
"propModified": "Modified",
|
||||||
|
"propPath": "Path",
|
||||||
"close": "Close",
|
"close": "Close",
|
||||||
"saveCrop": "Save visible area (JPEG 93)",
|
"saveCrop": "Save visible area (JPEG 95)",
|
||||||
"cropSaved": "Saved: {path}",
|
"cropSaved": "Saved: {path}",
|
||||||
"@cropSaved": {
|
"@cropSaved": {
|
||||||
"placeholders": {
|
"placeholders": {
|
||||||
|
|||||||
@@ -104,28 +104,52 @@ abstract class AppLocalizations {
|
|||||||
/// **'Settings'**
|
/// **'Settings'**
|
||||||
String get settingsTitle;
|
String get settingsTitle;
|
||||||
|
|
||||||
|
/// No description provided for @tabGeneral.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'General'**
|
||||||
|
String get tabGeneral;
|
||||||
|
|
||||||
|
/// No description provided for @language.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'Language'**
|
||||||
|
String get language;
|
||||||
|
|
||||||
/// No description provided for @sortBy.
|
/// No description provided for @sortBy.
|
||||||
///
|
///
|
||||||
/// In en, this message translates to:
|
/// In en, this message translates to:
|
||||||
/// **'Sort by'**
|
/// **'Sort by'**
|
||||||
String get sortBy;
|
String get sortBy;
|
||||||
|
|
||||||
|
/// No description provided for @hoverColor.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'Hover color'**
|
||||||
|
String get hoverColor;
|
||||||
|
|
||||||
/// No description provided for @sortByTime.
|
/// No description provided for @sortByTime.
|
||||||
///
|
///
|
||||||
/// In en, this message translates to:
|
/// In en, this message translates to:
|
||||||
/// **'By time'**
|
/// **'Time'**
|
||||||
String get sortByTime;
|
String get sortByTime;
|
||||||
|
|
||||||
/// No description provided for @sortByName.
|
/// No description provided for @sortByName.
|
||||||
///
|
///
|
||||||
/// In en, this message translates to:
|
/// In en, this message translates to:
|
||||||
/// **'By name'**
|
/// **'Name'**
|
||||||
String get sortByName;
|
String get sortByName;
|
||||||
|
|
||||||
|
/// No description provided for @sizeSection.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'Size'**
|
||||||
|
String get sizeSection;
|
||||||
|
|
||||||
/// No description provided for @appDescription.
|
/// No description provided for @appDescription.
|
||||||
///
|
///
|
||||||
/// In en, this message translates to:
|
/// In en, this message translates to:
|
||||||
/// **'Ultra-lightweight and fast image viewer. Open images and use arrows or keyboard keys to navigate.'**
|
/// **'Simple, clean, light, fast image viewer.'**
|
||||||
String get appDescription;
|
String get appDescription;
|
||||||
|
|
||||||
/// No description provided for @shortcuts.
|
/// No description provided for @shortcuts.
|
||||||
@@ -134,11 +158,209 @@ abstract class AppLocalizations {
|
|||||||
/// **'Shortcuts'**
|
/// **'Shortcuts'**
|
||||||
String get shortcuts;
|
String get shortcuts;
|
||||||
|
|
||||||
/// No description provided for @shortcutsList.
|
/// No description provided for @scNavKey.
|
||||||
///
|
///
|
||||||
/// In en, this message translates to:
|
/// In en, this message translates to:
|
||||||
/// **'• Left/Right arrow — previous/next image\n• Ctrl+S — save visible area (JPEG 93)\n• Ctrl+R — flip horizontally (clears effects, press again to undo)\n• Ctrl+Q — close window\n• Ctrl+Shift+Q — close all windows\n• Double click — toggle fill/fit\n• Right-drag — contrast\n• Shift+right-drag — rotate\n• Ctrl+right-drag — saturation\n• Ctrl+Shift+right-drag — brightness'**
|
/// **'Left/Right arrow'**
|
||||||
String get shortcutsList;
|
String get scNavKey;
|
||||||
|
|
||||||
|
/// No description provided for @scNavAction.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'previous/next image'**
|
||||||
|
String get scNavAction;
|
||||||
|
|
||||||
|
/// No description provided for @scOpenKey.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'Ctrl+O'**
|
||||||
|
String get scOpenKey;
|
||||||
|
|
||||||
|
/// No description provided for @scOpenAction.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'open file'**
|
||||||
|
String get scOpenAction;
|
||||||
|
|
||||||
|
/// No description provided for @scSaveKey.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'Ctrl+S'**
|
||||||
|
String get scSaveKey;
|
||||||
|
|
||||||
|
/// No description provided for @scSaveAction.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'save visible area (JPEG 95)'**
|
||||||
|
String get scSaveAction;
|
||||||
|
|
||||||
|
/// No description provided for @scFlipKey.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'Ctrl+R'**
|
||||||
|
String get scFlipKey;
|
||||||
|
|
||||||
|
/// No description provided for @scFlipAction.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'flip horizontally (clears effects, press again to undo)'**
|
||||||
|
String get scFlipAction;
|
||||||
|
|
||||||
|
/// No description provided for @scCloseKey.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'Ctrl+Q'**
|
||||||
|
String get scCloseKey;
|
||||||
|
|
||||||
|
/// No description provided for @scCloseAction.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'close window'**
|
||||||
|
String get scCloseAction;
|
||||||
|
|
||||||
|
/// No description provided for @scCloseAllKey.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'Ctrl+Shift+Q'**
|
||||||
|
String get scCloseAllKey;
|
||||||
|
|
||||||
|
/// No description provided for @scCloseAllAction.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'close all windows'**
|
||||||
|
String get scCloseAllAction;
|
||||||
|
|
||||||
|
/// No description provided for @scFullscreenKey.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'F11'**
|
||||||
|
String get scFullscreenKey;
|
||||||
|
|
||||||
|
/// No description provided for @scFullscreenAction.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'toggle fullscreen'**
|
||||||
|
String get scFullscreenAction;
|
||||||
|
|
||||||
|
/// No description provided for @scExitFullscreenKey.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'Esc'**
|
||||||
|
String get scExitFullscreenKey;
|
||||||
|
|
||||||
|
/// No description provided for @scExitFullscreenAction.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'exit fullscreen'**
|
||||||
|
String get scExitFullscreenAction;
|
||||||
|
|
||||||
|
/// No description provided for @scZoomKey.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'Scroll'**
|
||||||
|
String get scZoomKey;
|
||||||
|
|
||||||
|
/// No description provided for @scZoomAction.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'zoom (10% per step)'**
|
||||||
|
String get scZoomAction;
|
||||||
|
|
||||||
|
/// No description provided for @scFineZoomKey.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'Ctrl+scroll'**
|
||||||
|
String get scFineZoomKey;
|
||||||
|
|
||||||
|
/// No description provided for @scFineZoomAction.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'fine zoom (1% per step)'**
|
||||||
|
String get scFineZoomAction;
|
||||||
|
|
||||||
|
/// No description provided for @scPanKey.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'Left-drag'**
|
||||||
|
String get scPanKey;
|
||||||
|
|
||||||
|
/// No description provided for @scPanAction.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'pan'**
|
||||||
|
String get scPanAction;
|
||||||
|
|
||||||
|
/// No description provided for @scFillKey.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'Double click'**
|
||||||
|
String get scFillKey;
|
||||||
|
|
||||||
|
/// No description provided for @scFillAction.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'toggle fill/fit'**
|
||||||
|
String get scFillAction;
|
||||||
|
|
||||||
|
/// No description provided for @scResetKey.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'Right double click'**
|
||||||
|
String get scResetKey;
|
||||||
|
|
||||||
|
/// No description provided for @scResetAction.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'reset effects'**
|
||||||
|
String get scResetAction;
|
||||||
|
|
||||||
|
/// No description provided for @scContrastKey.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'Right-drag'**
|
||||||
|
String get scContrastKey;
|
||||||
|
|
||||||
|
/// No description provided for @scContrastAction.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'contrast'**
|
||||||
|
String get scContrastAction;
|
||||||
|
|
||||||
|
/// No description provided for @scRotateKey.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'Shift+right-drag'**
|
||||||
|
String get scRotateKey;
|
||||||
|
|
||||||
|
/// No description provided for @scRotateAction.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'rotate'**
|
||||||
|
String get scRotateAction;
|
||||||
|
|
||||||
|
/// No description provided for @scSaturationKey.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'Ctrl+right-drag'**
|
||||||
|
String get scSaturationKey;
|
||||||
|
|
||||||
|
/// No description provided for @scSaturationAction.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'saturation'**
|
||||||
|
String get scSaturationAction;
|
||||||
|
|
||||||
|
/// No description provided for @scBrightnessKey.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'Ctrl+Shift+right-drag'**
|
||||||
|
String get scBrightnessKey;
|
||||||
|
|
||||||
|
/// No description provided for @scBrightnessAction.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'brightness'**
|
||||||
|
String get scBrightnessAction;
|
||||||
|
|
||||||
/// No description provided for @print.
|
/// No description provided for @print.
|
||||||
///
|
///
|
||||||
@@ -146,6 +368,42 @@ abstract class AppLocalizations {
|
|||||||
/// **'Print'**
|
/// **'Print'**
|
||||||
String get print;
|
String get print;
|
||||||
|
|
||||||
|
/// No description provided for @fileProperties.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'File properties'**
|
||||||
|
String get fileProperties;
|
||||||
|
|
||||||
|
/// No description provided for @propResolution.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'Resolution'**
|
||||||
|
String get propResolution;
|
||||||
|
|
||||||
|
/// No description provided for @propFileSize.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'File size'**
|
||||||
|
String get propFileSize;
|
||||||
|
|
||||||
|
/// No description provided for @propFormat.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'Format'**
|
||||||
|
String get propFormat;
|
||||||
|
|
||||||
|
/// No description provided for @propModified.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'Modified'**
|
||||||
|
String get propModified;
|
||||||
|
|
||||||
|
/// No description provided for @propPath.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'Path'**
|
||||||
|
String get propPath;
|
||||||
|
|
||||||
/// No description provided for @close.
|
/// No description provided for @close.
|
||||||
///
|
///
|
||||||
/// In en, this message translates to:
|
/// In en, this message translates to:
|
||||||
@@ -155,7 +413,7 @@ abstract class AppLocalizations {
|
|||||||
/// No description provided for @saveCrop.
|
/// No description provided for @saveCrop.
|
||||||
///
|
///
|
||||||
/// In en, this message translates to:
|
/// In en, this message translates to:
|
||||||
/// **'Save visible area (JPEG 93)'**
|
/// **'Save visible area (JPEG 95)'**
|
||||||
String get saveCrop;
|
String get saveCrop;
|
||||||
|
|
||||||
/// No description provided for @cropSaved.
|
/// No description provided for @cropSaved.
|
||||||
|
|||||||
@@ -11,34 +11,162 @@ class AppLocalizationsEn extends AppLocalizations {
|
|||||||
@override
|
@override
|
||||||
String get settingsTitle => 'Settings';
|
String get settingsTitle => 'Settings';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get tabGeneral => 'General';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get language => 'Language';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get sortBy => 'Sort by';
|
String get sortBy => 'Sort by';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get sortByTime => 'By time';
|
String get hoverColor => 'Hover color';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get sortByName => 'By name';
|
String get sortByTime => 'Time';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get appDescription =>
|
String get sortByName => 'Name';
|
||||||
'Ultra-lightweight and fast image viewer. Open images and use arrows or keyboard keys to navigate.';
|
|
||||||
|
@override
|
||||||
|
String get sizeSection => 'Size';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get appDescription => 'Simple, clean, light, fast image viewer.';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get shortcuts => 'Shortcuts';
|
String get shortcuts => 'Shortcuts';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get shortcutsList =>
|
String get scNavKey => 'Left/Right arrow';
|
||||||
'• Left/Right arrow — previous/next image\n• Ctrl+S — save visible area (JPEG 93)\n• Ctrl+R — flip horizontally (clears effects, press again to undo)\n• Ctrl+Q — close window\n• Ctrl+Shift+Q — close all windows\n• Double click — toggle fill/fit\n• Right-drag — contrast\n• Shift+right-drag — rotate\n• Ctrl+right-drag — saturation\n• Ctrl+Shift+right-drag — brightness';
|
|
||||||
|
@override
|
||||||
|
String get scNavAction => 'previous/next image';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get scOpenKey => 'Ctrl+O';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get scOpenAction => 'open file';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get scSaveKey => 'Ctrl+S';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get scSaveAction => 'save visible area (JPEG 95)';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get scFlipKey => 'Ctrl+R';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get scFlipAction =>
|
||||||
|
'flip horizontally (clears effects, press again to undo)';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get scCloseKey => 'Ctrl+Q';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get scCloseAction => 'close window';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get scCloseAllKey => 'Ctrl+Shift+Q';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get scCloseAllAction => 'close all windows';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get scFullscreenKey => 'F11';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get scFullscreenAction => 'toggle fullscreen';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get scExitFullscreenKey => 'Esc';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get scExitFullscreenAction => 'exit fullscreen';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get scZoomKey => 'Scroll';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get scZoomAction => 'zoom (10% per step)';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get scFineZoomKey => 'Ctrl+scroll';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get scFineZoomAction => 'fine zoom (1% per step)';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get scPanKey => 'Left-drag';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get scPanAction => 'pan';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get scFillKey => 'Double click';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get scFillAction => 'toggle fill/fit';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get scResetKey => 'Right double click';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get scResetAction => 'reset effects';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get scContrastKey => 'Right-drag';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get scContrastAction => 'contrast';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get scRotateKey => 'Shift+right-drag';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get scRotateAction => 'rotate';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get scSaturationKey => 'Ctrl+right-drag';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get scSaturationAction => 'saturation';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get scBrightnessKey => 'Ctrl+Shift+right-drag';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get scBrightnessAction => 'brightness';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get print => 'Print';
|
String get print => 'Print';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get fileProperties => 'File properties';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get propResolution => 'Resolution';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get propFileSize => 'File size';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get propFormat => 'Format';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get propModified => 'Modified';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get propPath => 'Path';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get close => 'Close';
|
String get close => 'Close';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get saveCrop => 'Save visible area (JPEG 93)';
|
String get saveCrop => 'Save visible area (JPEG 95)';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String cropSaved(String path) {
|
String cropSaved(String path) {
|
||||||
|
|||||||
@@ -11,34 +11,163 @@ class AppLocalizationsTr extends AppLocalizations {
|
|||||||
@override
|
@override
|
||||||
String get settingsTitle => 'Ayarlar';
|
String get settingsTitle => 'Ayarlar';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get tabGeneral => 'Genel';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get language => 'Dil';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get sortBy => 'Sıralama';
|
String get sortBy => 'Sıralama';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get sortByTime => 'Zamana göre';
|
String get hoverColor => 'Hover rengi';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get sortByName => 'İsme göre';
|
String get sortByTime => 'Zaman';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get sortByName => 'İsim';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get sizeSection => 'Boyut';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get appDescription =>
|
String get appDescription =>
|
||||||
'Ultra hafif ve hızlı resim görüntüleyici. Görselleri açın, gezinti için okları veya klavye tuşlarını kullanın.';
|
'Basit, temiz, hafif, hızlı resim görüntüleyici.';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get shortcuts => 'Kısayollar';
|
String get shortcuts => 'Kısayollar';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get shortcutsList =>
|
String get scNavKey => 'Sol/Sağ ok';
|
||||||
'• Sol/Sağ ok — önceki/sonraki resim\n• Ctrl+S — görünen alanı kaydet (JPEG 93)\n• Ctrl+R — yatay aynala (efektleri sıfırlar, tekrar basınca geri alır)\n• Ctrl+Q — pencereyi kapat\n• Ctrl+Shift+Q — tüm pencereleri kapat\n• Çift tık — doldur/sığdır geçişi\n• Sağ tık sürükle — kontrast\n• Shift+sağ tık — döndür\n• Ctrl+sağ tık — doygunluk\n• Ctrl+Shift+sağ tık — parlaklık';
|
|
||||||
|
@override
|
||||||
|
String get scNavAction => 'önceki/sonraki resim';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get scOpenKey => 'Ctrl+O';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get scOpenAction => 'dosya aç';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get scSaveKey => 'Ctrl+S';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get scSaveAction => 'görünen alanı kaydet (JPEG 95)';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get scFlipKey => 'Ctrl+R';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get scFlipAction =>
|
||||||
|
'yatay aynala (efektleri sıfırlar, tekrar basınca geri alır)';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get scCloseKey => 'Ctrl+Q';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get scCloseAction => 'pencereyi kapat';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get scCloseAllKey => 'Ctrl+Shift+Q';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get scCloseAllAction => 'tüm pencereleri kapat';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get scFullscreenKey => 'F11';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get scFullscreenAction => 'tam ekran / normal geçişi';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get scExitFullscreenKey => 'Esc';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get scExitFullscreenAction => 'tam ekrandan çık';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get scZoomKey => 'Kaydırma';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get scZoomAction => 'yakınlaştır (tık başına %10)';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get scFineZoomKey => 'Ctrl+kaydırma';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get scFineZoomAction => 'ince yakınlaştırma (tık başına %1)';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get scPanKey => 'Sol tık sürükle';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get scPanAction => 'kaydır';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get scFillKey => 'Çift tık';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get scFillAction => 'doldur/sığdır geçişi';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get scResetKey => 'Sağ çift tık';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get scResetAction => 'efektleri sıfırla';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get scContrastKey => 'Sağ tık sürükle';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get scContrastAction => 'kontrast';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get scRotateKey => 'Shift+sağ tık';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get scRotateAction => 'döndür';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get scSaturationKey => 'Ctrl+sağ tık';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get scSaturationAction => 'doygunluk';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get scBrightnessKey => 'Ctrl+Shift+sağ tık';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get scBrightnessAction => 'parlaklık';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get print => 'Yazdır';
|
String get print => 'Yazdır';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get fileProperties => 'Dosya özellikleri';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get propResolution => 'Çözünürlük';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get propFileSize => 'Dosya boyutu';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get propFormat => 'Biçim';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get propModified => 'Değiştirilme';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get propPath => 'Yol';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get close => 'Kapat';
|
String get close => 'Kapat';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get saveCrop => 'Görünen alanı kaydet (JPEG 93)';
|
String get saveCrop => 'Görünen alanı kaydet (JPEG 95)';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String cropSaved(String path) {
|
String cropSaved(String path) {
|
||||||
|
|||||||
@@ -1,15 +1,58 @@
|
|||||||
{
|
{
|
||||||
"@@locale": "tr",
|
"@@locale": "tr",
|
||||||
"settingsTitle": "Ayarlar",
|
"settingsTitle": "Ayarlar",
|
||||||
|
"tabGeneral": "Genel",
|
||||||
|
"language": "Dil",
|
||||||
"sortBy": "Sıralama",
|
"sortBy": "Sıralama",
|
||||||
"sortByTime": "Zamana göre",
|
"hoverColor": "Hover rengi",
|
||||||
"sortByName": "İsme göre",
|
"sortByTime": "Zaman",
|
||||||
"appDescription": "Ultra hafif ve hızlı resim görüntüleyici. Görselleri açın, gezinti için okları veya klavye tuşlarını kullanın.",
|
"sortByName": "İsim",
|
||||||
|
"sizeSection": "Boyut",
|
||||||
|
"appDescription": "Basit, temiz, hafif, hızlı resim görüntüleyici.",
|
||||||
"shortcuts": "Kısayollar",
|
"shortcuts": "Kısayollar",
|
||||||
"shortcutsList": "• Sol/Sağ ok — önceki/sonraki resim\n• Ctrl+S — görünen alanı kaydet (JPEG 93)\n• Ctrl+R — yatay aynala (efektleri sıfırlar, tekrar basınca geri alır)\n• Ctrl+Q — pencereyi kapat\n• Ctrl+Shift+Q — tüm pencereleri kapat\n• Çift tık — doldur/sığdır geçişi\n• Sağ tık sürükle — kontrast\n• Shift+sağ tık — döndür\n• Ctrl+sağ tık — doygunluk\n• Ctrl+Shift+sağ tık — parlaklık",
|
"scNavKey": "Sol/Sağ ok",
|
||||||
|
"scNavAction": "önceki/sonraki resim",
|
||||||
|
"scOpenKey": "Ctrl+O",
|
||||||
|
"scOpenAction": "dosya aç",
|
||||||
|
"scSaveKey": "Ctrl+S",
|
||||||
|
"scSaveAction": "görünen alanı kaydet (JPEG 95)",
|
||||||
|
"scFlipKey": "Ctrl+R",
|
||||||
|
"scFlipAction": "yatay aynala (efektleri sıfırlar, tekrar basınca geri alır)",
|
||||||
|
"scCloseKey": "Ctrl+Q",
|
||||||
|
"scCloseAction": "pencereyi kapat",
|
||||||
|
"scCloseAllKey": "Ctrl+Shift+Q",
|
||||||
|
"scCloseAllAction": "tüm pencereleri kapat",
|
||||||
|
"scFullscreenKey": "F11",
|
||||||
|
"scFullscreenAction": "tam ekran / normal geçişi",
|
||||||
|
"scExitFullscreenKey": "Esc",
|
||||||
|
"scExitFullscreenAction": "tam ekrandan çık",
|
||||||
|
"scZoomKey": "Kaydırma",
|
||||||
|
"scZoomAction": "yakınlaştır (tık başına %10)",
|
||||||
|
"scFineZoomKey": "Ctrl+kaydırma",
|
||||||
|
"scFineZoomAction": "ince yakınlaştırma (tık başına %1)",
|
||||||
|
"scPanKey": "Sol tık sürükle",
|
||||||
|
"scPanAction": "kaydır",
|
||||||
|
"scFillKey": "Çift tık",
|
||||||
|
"scFillAction": "doldur/sığdır geçişi",
|
||||||
|
"scResetKey": "Sağ çift tık",
|
||||||
|
"scResetAction": "efektleri sıfırla",
|
||||||
|
"scContrastKey": "Sağ tık sürükle",
|
||||||
|
"scContrastAction": "kontrast",
|
||||||
|
"scRotateKey": "Shift+sağ tık",
|
||||||
|
"scRotateAction": "döndür",
|
||||||
|
"scSaturationKey": "Ctrl+sağ tık",
|
||||||
|
"scSaturationAction": "doygunluk",
|
||||||
|
"scBrightnessKey": "Ctrl+Shift+sağ tık",
|
||||||
|
"scBrightnessAction": "parlaklık",
|
||||||
"print": "Yazdır",
|
"print": "Yazdır",
|
||||||
|
"fileProperties": "Dosya özellikleri",
|
||||||
|
"propResolution": "Çözünürlük",
|
||||||
|
"propFileSize": "Dosya boyutu",
|
||||||
|
"propFormat": "Biçim",
|
||||||
|
"propModified": "Değiştirilme",
|
||||||
|
"propPath": "Yol",
|
||||||
"close": "Kapat",
|
"close": "Kapat",
|
||||||
"saveCrop": "Görünen alanı kaydet (JPEG 93)",
|
"saveCrop": "Görünen alanı kaydet (JPEG 95)",
|
||||||
"cropSaved": "Kaydedildi: {path}",
|
"cropSaved": "Kaydedildi: {path}",
|
||||||
"@cropSaved": {
|
"@cropSaved": {
|
||||||
"placeholders": {
|
"placeholders": {
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ void main(List<String> args) async {
|
|||||||
|
|
||||||
final windowOptions = WindowOptions(
|
final windowOptions = WindowOptions(
|
||||||
size: saved?.size ?? defaultSize,
|
size: saved?.size ?? defaultSize,
|
||||||
minimumSize: const Size(400, 300),
|
minimumSize: const Size(160, 100),
|
||||||
backgroundColor: Colors.transparent,
|
backgroundColor: Colors.transparent,
|
||||||
titleBarStyle: TitleBarStyle.hidden,
|
titleBarStyle: TitleBarStyle.hidden,
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,21 +1,28 @@
|
|||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
|
import 'dart:math' as math;
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:path/path.dart' as p;
|
||||||
import 'package:window_manager/window_manager.dart';
|
import 'package:window_manager/window_manager.dart';
|
||||||
import 'package:desktop_drop/desktop_drop.dart';
|
import 'package:desktop_drop/desktop_drop.dart';
|
||||||
import 'package:pdf/pdf.dart';
|
import 'package:pdf/pdf.dart';
|
||||||
import 'package:pdf/widgets.dart' as pw;
|
import 'package:pdf/widgets.dart' as pw;
|
||||||
import 'package:printing/printing.dart';
|
import 'package:printing/printing.dart';
|
||||||
|
import '../services/image_header.dart';
|
||||||
import '../services/image_manager.dart';
|
import '../services/image_manager.dart';
|
||||||
import '../services/file_handler.dart';
|
import '../services/file_handler.dart';
|
||||||
import '../services/crop_save_service.dart';
|
import '../services/crop_save_service.dart';
|
||||||
|
import '../services/hover_color.dart';
|
||||||
import '../widgets/custom_title_bar.dart';
|
import '../widgets/custom_title_bar.dart';
|
||||||
import '../widgets/image_canvas.dart';
|
import '../widgets/image_canvas.dart';
|
||||||
import '../widgets/window_resize_zones.dart';
|
import '../widgets/window_resize_zones.dart';
|
||||||
|
import '../widgets/window_size_selector.dart';
|
||||||
import '../shortcuts/app_shortcuts.dart';
|
import '../shortcuts/app_shortcuts.dart';
|
||||||
import '../services/window_persistence.dart';
|
import '../services/window_persistence.dart';
|
||||||
import '../l10n/app_localizations.dart';
|
import '../l10n/app_localizations.dart';
|
||||||
|
|
||||||
|
const appVersion = '1.9.2';
|
||||||
|
|
||||||
class ViewerScreen extends StatefulWidget {
|
class ViewerScreen extends StatefulWidget {
|
||||||
final List<String> initialFiles;
|
final List<String> initialFiles;
|
||||||
const ViewerScreen({super.key, this.initialFiles = const []});
|
const ViewerScreen({super.key, this.initialFiles = const []});
|
||||||
@@ -29,6 +36,7 @@ class _ViewerScreenState extends State<ViewerScreen> with WindowListener {
|
|||||||
bool _controlsVisible = false;
|
bool _controlsVisible = false;
|
||||||
Timer? _saveDebounce;
|
Timer? _saveDebounce;
|
||||||
Rect _lastBounds = Rect.zero;
|
Rect _lastBounds = Rect.zero;
|
||||||
|
final ValueNotifier<double> _zoomPercent = ValueNotifier<double>(100);
|
||||||
final GlobalKey<ImageCanvasState> _canvasKey = GlobalKey<ImageCanvasState>();
|
final GlobalKey<ImageCanvasState> _canvasKey = GlobalKey<ImageCanvasState>();
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@@ -40,7 +48,10 @@ class _ViewerScreenState extends State<ViewerScreen> with WindowListener {
|
|||||||
if (widget.initialFiles.isNotEmpty) {
|
if (widget.initialFiles.isNotEmpty) {
|
||||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||||
FileHandler.loadImagesFromPaths(widget.initialFiles);
|
FileHandler.loadImagesFromPaths(widget.initialFiles);
|
||||||
|
_updateTitle();
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
WidgetsBinding.instance.addPostFrameCallback((_) => _updateTitle());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -49,6 +60,7 @@ class _ViewerScreenState extends State<ViewerScreen> with WindowListener {
|
|||||||
windowManager.removeListener(this);
|
windowManager.removeListener(this);
|
||||||
ImageManager.instance.removeListener(_onImageManagerChanged);
|
ImageManager.instance.removeListener(_onImageManagerChanged);
|
||||||
_saveDebounce?.cancel();
|
_saveDebounce?.cancel();
|
||||||
|
_zoomPercent.dispose();
|
||||||
super.dispose();
|
super.dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -79,6 +91,18 @@ class _ViewerScreenState extends State<ViewerScreen> with WindowListener {
|
|||||||
|
|
||||||
void _onImageManagerChanged() {
|
void _onImageManagerChanged() {
|
||||||
setState(() => _hasImages = ImageManager.instance.images.isNotEmpty);
|
setState(() => _hasImages = ImageManager.instance.images.isNotEmpty);
|
||||||
|
_updateTitle();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Taskbar/alt-tab başlığı = açılan dosyanın adı (görsel yoksa uygulama adı).
|
||||||
|
Future<void> _updateTitle() async {
|
||||||
|
final image = ImageManager.instance.currentImagePath;
|
||||||
|
final name = image.isEmpty ? 'imajViewer' : p.basename(image);
|
||||||
|
try {
|
||||||
|
await windowManager.setTitle(name);
|
||||||
|
} catch (_) {
|
||||||
|
// Başlık güncellenemezse sessizce geç.
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> _doSave() async {
|
Future<void> _doSave() async {
|
||||||
@@ -92,81 +116,325 @@ class _ViewerScreenState extends State<ViewerScreen> with WindowListener {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static const double _shortcutKeyColumnWidth = 126;
|
||||||
|
|
||||||
|
int _settingsTab = 0;
|
||||||
|
|
||||||
void _showSettings() {
|
void _showSettings() {
|
||||||
showDialog(
|
showDialog(
|
||||||
context: context,
|
context: context,
|
||||||
builder: (context) => StatefulBuilder(
|
builder: (context) => StatefulBuilder(
|
||||||
builder: (context, setDialogState) => AlertDialog(
|
builder: (context, setDialogState) {
|
||||||
backgroundColor: const Color(0xFF2a2a2a),
|
final l10n = AppLocalizations.of(context)!;
|
||||||
title: Text(AppLocalizations.of(context)!.settingsTitle,
|
return Dialog(
|
||||||
style: const TextStyle(color: Colors.white, fontSize: 18)),
|
insetPadding: EdgeInsets.zero,
|
||||||
content: SingleChildScrollView(
|
backgroundColor: Colors.transparent,
|
||||||
|
shape: const RoundedRectangleBorder(borderRadius: BorderRadius.zero),
|
||||||
|
child: LayoutBuilder(
|
||||||
|
builder: (context, c) => Container(
|
||||||
|
width: math.min(c.maxWidth, 520),
|
||||||
|
height: math.min(c.maxHeight, 560),
|
||||||
|
padding: const EdgeInsets.fromLTRB(14, 4, 14, 10),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: const Color(0xFF2a2a2a),
|
||||||
|
border: Border.all(color: Colors.white12),
|
||||||
|
),
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisSize: MainAxisSize.min,
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Text(AppLocalizations.of(context)!.sortBy,
|
Row(
|
||||||
style: const TextStyle(color: Colors.white70, fontSize: 13)),
|
children: [
|
||||||
RadioListTile<bool>(
|
Text(l10n.settingsTitle,
|
||||||
value: false,
|
style: const TextStyle(color: Colors.white, fontSize: 18)),
|
||||||
groupValue: ImageManager.instance.sortByName,
|
const Spacer(),
|
||||||
dense: true,
|
IconButton(
|
||||||
activeColor: Colors.blueAccent,
|
tooltip: l10n.print,
|
||||||
title: Text(AppLocalizations.of(context)!.sortByTime,
|
icon: const Icon(Icons.print, color: Colors.white70, size: 18),
|
||||||
style: const TextStyle(color: Colors.white, fontSize: 14)),
|
|
||||||
onChanged: (v) {
|
|
||||||
ImageManager.instance.setSortByName(v!);
|
|
||||||
setDialogState(() {});
|
|
||||||
},
|
|
||||||
),
|
|
||||||
RadioListTile<bool>(
|
|
||||||
value: true,
|
|
||||||
groupValue: ImageManager.instance.sortByName,
|
|
||||||
dense: true,
|
|
||||||
activeColor: Colors.blueAccent,
|
|
||||||
title: Text(AppLocalizations.of(context)!.sortByName,
|
|
||||||
style: const TextStyle(color: Colors.white, fontSize: 14)),
|
|
||||||
onChanged: (v) {
|
|
||||||
ImageManager.instance.setSortByName(v!);
|
|
||||||
setDialogState(() {});
|
|
||||||
},
|
|
||||||
),
|
|
||||||
const Divider(color: Colors.white24, height: 24),
|
|
||||||
const Text('imajViewer', style: TextStyle(color: Colors.white, fontSize: 15)),
|
|
||||||
const SizedBox(height: 4),
|
|
||||||
Text(
|
|
||||||
AppLocalizations.of(context)!.appDescription,
|
|
||||||
style: const TextStyle(color: Colors.white70, fontSize: 13, height: 1.5),
|
|
||||||
),
|
|
||||||
const SizedBox(height: 12),
|
|
||||||
Text(AppLocalizations.of(context)!.shortcuts,
|
|
||||||
style: const TextStyle(color: Colors.white70, fontSize: 13)),
|
|
||||||
const SizedBox(height: 4),
|
|
||||||
Text(
|
|
||||||
AppLocalizations.of(context)!.shortcutsList,
|
|
||||||
style: const TextStyle(color: Colors.white70, fontSize: 13, height: 1.6),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
actions: [
|
|
||||||
TextButton.icon(
|
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
Navigator.pop(context);
|
Navigator.pop(context);
|
||||||
_printImage();
|
_printImage();
|
||||||
},
|
},
|
||||||
icon: const Icon(Icons.print, color: Colors.white70, size: 18),
|
|
||||||
label: Text(AppLocalizations.of(context)!.print,
|
|
||||||
style: const TextStyle(color: Colors.white70)),
|
|
||||||
),
|
),
|
||||||
TextButton(
|
IconButton(
|
||||||
|
tooltip: l10n.close,
|
||||||
|
icon: const Icon(Icons.close, color: Colors.white70, size: 18),
|
||||||
onPressed: () => Navigator.pop(context),
|
onPressed: () => Navigator.pop(context),
|
||||||
child: Text(AppLocalizations.of(context)!.close, style: const TextStyle(color: Colors.white70)),
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
const SizedBox(height: 4),
|
||||||
|
Align(
|
||||||
|
alignment: Alignment.center,
|
||||||
|
child: SegmentedButton<int>(
|
||||||
|
expandedInsets: EdgeInsets.zero,
|
||||||
|
segments: [
|
||||||
|
ButtonSegment(
|
||||||
|
value: 0,
|
||||||
|
label: Text(l10n.tabGeneral,
|
||||||
|
style: const TextStyle(fontSize: 13)),
|
||||||
|
),
|
||||||
|
ButtonSegment(
|
||||||
|
value: 1,
|
||||||
|
label: Text(l10n.sizeSection,
|
||||||
|
style: const TextStyle(fontSize: 13)),
|
||||||
|
),
|
||||||
|
ButtonSegment(
|
||||||
|
value: 2,
|
||||||
|
label: Text(l10n.shortcuts,
|
||||||
|
style: const TextStyle(fontSize: 13)),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
selected: {_settingsTab},
|
||||||
|
showSelectedIcon: false,
|
||||||
|
style: _segmentedStyle,
|
||||||
|
onSelectionChanged: (selection) =>
|
||||||
|
setDialogState(() => _settingsTab = selection.first),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 10),
|
||||||
|
Expanded(
|
||||||
|
child: _settingsTabBody(l10n, setDialogState),
|
||||||
|
),
|
||||||
|
const Divider(color: Colors.white10, height: 12),
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
Text('imajViewer $appVersion',
|
||||||
|
style: const TextStyle(color: Colors.white54, fontSize: 11)),
|
||||||
|
const SizedBox(width: 16),
|
||||||
|
Expanded(
|
||||||
|
child: Text(l10n.appDescription,
|
||||||
|
maxLines: 1,
|
||||||
|
overflow: TextOverflow.ellipsis,
|
||||||
|
textAlign: TextAlign.right,
|
||||||
|
style: const TextStyle(color: Colors.white54, fontSize: 11)),
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget _settingsTabBody(AppLocalizations l10n, StateSetter setDialogState) {
|
||||||
|
switch (_settingsTab) {
|
||||||
|
case 1:
|
||||||
|
return WindowSizeSelector(workArea: _workArea, onPick: _applyWindowSize);
|
||||||
|
case 2:
|
||||||
|
return SingleChildScrollView(
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
for (final (key, action) in _shortcutRows(l10n))
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.only(bottom: 4),
|
||||||
|
child: Row(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
SizedBox(
|
||||||
|
width: _shortcutKeyColumnWidth,
|
||||||
|
child: Text(key,
|
||||||
|
style: const TextStyle(fontSize: 12, color: Colors.white)),
|
||||||
|
),
|
||||||
|
const SizedBox(width: 8),
|
||||||
|
Expanded(
|
||||||
|
child: Text(action,
|
||||||
|
style: const TextStyle(color: Colors.white70, fontSize: 13)),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
default:
|
||||||
|
return SingleChildScrollView(
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
if (_hasImages) ...[
|
||||||
|
_settingsCard(
|
||||||
|
Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
_sectionTitle(l10n.fileProperties),
|
||||||
|
const SizedBox(height: 4),
|
||||||
|
FutureBuilder<List<(String, String)>>(
|
||||||
|
future: _fileProperties(ImageManager.instance.currentImagePath),
|
||||||
|
builder: (context, snap) {
|
||||||
|
if (!snap.hasData) return const SizedBox(height: 20);
|
||||||
|
return Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: snap.data!.map((r) => Padding(
|
||||||
|
padding: const EdgeInsets.only(bottom: 2),
|
||||||
|
child: Text.rich(
|
||||||
|
TextSpan(children: [
|
||||||
|
TextSpan(text: '${r.$1}: ',
|
||||||
|
style: const TextStyle(color: Colors.white70, fontSize: 13)),
|
||||||
|
TextSpan(text: r.$2,
|
||||||
|
style: const TextStyle(color: Colors.white, fontSize: 13)),
|
||||||
|
]),
|
||||||
|
),
|
||||||
|
)).toList(),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 12),
|
||||||
|
],
|
||||||
|
_settingsCard(
|
||||||
|
Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
_sectionTitle(l10n.sortBy),
|
||||||
|
const SizedBox(height: 4),
|
||||||
|
SegmentedButton<bool>(
|
||||||
|
segments: [
|
||||||
|
ButtonSegment(
|
||||||
|
value: false,
|
||||||
|
label: Text(l10n.sortByTime, style: const TextStyle(fontSize: 13)),
|
||||||
|
),
|
||||||
|
ButtonSegment(
|
||||||
|
value: true,
|
||||||
|
label: Text(l10n.sortByName, style: const TextStyle(fontSize: 13)),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
selected: {ImageManager.instance.sortByName},
|
||||||
|
showSelectedIcon: false,
|
||||||
|
style: _segmentedStyle,
|
||||||
|
onSelectionChanged: (selection) {
|
||||||
|
ImageManager.instance.setSortByName(selection.first);
|
||||||
|
setDialogState(() {});
|
||||||
|
},
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 12),
|
||||||
|
_settingsCard(
|
||||||
|
Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
_sectionTitle(l10n.hoverColor),
|
||||||
|
const SizedBox(height: 8),
|
||||||
|
Wrap(
|
||||||
|
spacing: 10,
|
||||||
|
runSpacing: 10,
|
||||||
|
children: [
|
||||||
|
for (final color in HoverColor.palette)
|
||||||
|
GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
HoverColor.set(color);
|
||||||
|
setDialogState(() {});
|
||||||
|
},
|
||||||
|
child: MouseRegion(
|
||||||
|
cursor: SystemMouseCursors.click,
|
||||||
|
child: Container(
|
||||||
|
width: 24,
|
||||||
|
height: 24,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: color,
|
||||||
|
shape: BoxShape.circle,
|
||||||
|
border: Border.all(
|
||||||
|
color: HoverColor.notifier.value.toARGB32() ==
|
||||||
|
color.toARGB32()
|
||||||
|
? Colors.white
|
||||||
|
: Colors.white24,
|
||||||
|
width: 2,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 12),
|
||||||
|
_settingsCard(
|
||||||
|
Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
_sectionTitle(l10n.language),
|
||||||
|
const SizedBox(height: 6),
|
||||||
|
SegmentedButton<String>(
|
||||||
|
segments: const [
|
||||||
|
ButtonSegment(
|
||||||
|
value: 'en',
|
||||||
|
label: Text('English', style: TextStyle(fontSize: 13))),
|
||||||
|
ButtonSegment(
|
||||||
|
value: 'tr',
|
||||||
|
label: Text('Türkçe', style: TextStyle(fontSize: 13))),
|
||||||
|
ButtonSegment(
|
||||||
|
value: 'fr',
|
||||||
|
label: Text('Français', style: TextStyle(fontSize: 13))),
|
||||||
|
],
|
||||||
|
selected: const {'tr'},
|
||||||
|
showSelectedIcon: false,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget _sectionTitle(String text) {
|
||||||
|
return Text(text,
|
||||||
|
style: const TextStyle(color: Colors.white, fontSize: 14, fontWeight: FontWeight.w600));
|
||||||
|
}
|
||||||
|
|
||||||
|
ButtonStyle get _segmentedStyle => ButtonStyle(
|
||||||
|
backgroundColor: WidgetStateProperty.resolveWith(
|
||||||
|
(states) => states.contains(WidgetState.selected)
|
||||||
|
? Colors.blueAccent.withValues(alpha: 0.25)
|
||||||
|
: Colors.white10,
|
||||||
|
),
|
||||||
|
foregroundColor: const WidgetStatePropertyAll(Colors.white),
|
||||||
|
side: const WidgetStatePropertyAll(BorderSide(color: Colors.white24)),
|
||||||
|
);
|
||||||
|
|
||||||
|
Widget _settingsCard(Widget child) {
|
||||||
|
return Container(
|
||||||
|
width: double.infinity,
|
||||||
|
padding: const EdgeInsets.all(12),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: Colors.white.withValues(alpha: 0.05),
|
||||||
|
borderRadius: BorderRadius.circular(8),
|
||||||
|
),
|
||||||
|
child: child,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
List<(String, String)> _shortcutRows(AppLocalizations l10n) {
|
||||||
|
return [
|
||||||
|
(l10n.scNavKey, l10n.scNavAction),
|
||||||
|
(l10n.scOpenKey, l10n.scOpenAction),
|
||||||
|
(l10n.scSaveKey, l10n.scSaveAction),
|
||||||
|
(l10n.scFlipKey, l10n.scFlipAction),
|
||||||
|
(l10n.scCloseKey, l10n.scCloseAction),
|
||||||
|
(l10n.scCloseAllKey, l10n.scCloseAllAction),
|
||||||
|
(l10n.scFullscreenKey, l10n.scFullscreenAction),
|
||||||
|
(l10n.scExitFullscreenKey, l10n.scExitFullscreenAction),
|
||||||
|
(l10n.scZoomKey, l10n.scZoomAction),
|
||||||
|
(l10n.scFineZoomKey, l10n.scFineZoomAction),
|
||||||
|
(l10n.scPanKey, l10n.scPanAction),
|
||||||
|
(l10n.scFillKey, l10n.scFillAction),
|
||||||
|
(l10n.scResetKey, l10n.scResetAction),
|
||||||
|
(l10n.scContrastKey, l10n.scContrastAction),
|
||||||
|
(l10n.scRotateKey, l10n.scRotateAction),
|
||||||
|
(l10n.scSaturationKey, l10n.scSaturationAction),
|
||||||
|
(l10n.scBrightnessKey, l10n.scBrightnessAction),
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> _printImage() async {
|
Future<void> _printImage() async {
|
||||||
@@ -190,8 +458,59 @@ class _ViewerScreenState extends State<ViewerScreen> with WindowListener {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Future<List<(String, String)>> _fileProperties(String path) async {
|
||||||
|
final l10n = AppLocalizations.of(context)!;
|
||||||
|
final file = File(path);
|
||||||
|
final rows = <(String, String)>[];
|
||||||
|
final Size? size = pixelSizeOfFile(path);
|
||||||
|
rows.add((l10n.propResolution, size == null ? '—' : '${size.width.toInt()} × ${size.height.toInt()}'));
|
||||||
|
try {
|
||||||
|
rows.add((l10n.propFileSize, _fmtSize(file.statSync().size)));
|
||||||
|
} catch (_) {
|
||||||
|
rows.add((l10n.propFileSize, '—'));
|
||||||
|
}
|
||||||
|
rows.add((l10n.propFormat, path.toLowerCase().split('.').last.toUpperCase()));
|
||||||
|
try {
|
||||||
|
rows.add((l10n.propModified, _fmtDate(file.statSync().modified)));
|
||||||
|
} catch (_) {
|
||||||
|
rows.add((l10n.propModified, '—'));
|
||||||
|
}
|
||||||
|
rows.add((l10n.propPath, path));
|
||||||
|
return rows;
|
||||||
|
}
|
||||||
|
|
||||||
|
String _fmtSize(int bytes) {
|
||||||
|
if (bytes < 1024) return '$bytes B';
|
||||||
|
const units = ['KB', 'MB', 'GB', 'TB'];
|
||||||
|
double v = bytes / 1024;
|
||||||
|
var i = 0;
|
||||||
|
while (v >= 1024 && i < units.length - 1) {
|
||||||
|
v /= 1024;
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
return '${v.toStringAsFixed(v >= 100 ? 0 : 1)} ${units[i]}';
|
||||||
|
}
|
||||||
|
|
||||||
|
String _fmtDate(DateTime t) {
|
||||||
|
String two(int n) => n.toString().padLeft(2, '0');
|
||||||
|
return '${t.year}-${two(t.month)}-${two(t.day)} ${two(t.hour)}:${two(t.minute)}';
|
||||||
|
}
|
||||||
|
|
||||||
void _flipHorizontal() => _canvasKey.currentState?.toggleFlipH();
|
void _flipHorizontal() => _canvasKey.currentState?.toggleFlipH();
|
||||||
|
|
||||||
|
Future<Size?> _workArea() async {
|
||||||
|
final pos = await windowManager.getPosition();
|
||||||
|
return WindowPersistence.workAreaSize(windowPosition: pos);
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<void> _applyWindowSize(int rows, int cols, Size work) async {
|
||||||
|
try {
|
||||||
|
await windowManager.setSize(Size(work.width / cols, work.height / rows));
|
||||||
|
} catch (_) {
|
||||||
|
// Boyutlandırma başarısız olursa sessizce geç (buton saf eylem).
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Future<void> _cropSave() async {
|
Future<void> _cropSave() async {
|
||||||
final path = ImageManager.instance.currentImagePath;
|
final path = ImageManager.instance.currentImagePath;
|
||||||
final state = _canvasKey.currentState;
|
final state = _canvasKey.currentState;
|
||||||
@@ -274,6 +593,7 @@ class _ViewerScreenState extends State<ViewerScreen> with WindowListener {
|
|||||||
? ImageCanvas(
|
? ImageCanvas(
|
||||||
key: _canvasKey,
|
key: _canvasKey,
|
||||||
filePath: ImageManager.instance.currentImagePath,
|
filePath: ImageManager.instance.currentImagePath,
|
||||||
|
zoomPercent: _zoomPercent,
|
||||||
)
|
)
|
||||||
: Center(
|
: Center(
|
||||||
child: Column(
|
child: Column(
|
||||||
@@ -312,6 +632,36 @@ class _ViewerScreenState extends State<ViewerScreen> with WindowListener {
|
|||||||
onTap: () => ImageManager.instance.nextImage(),
|
onTap: () => ImageManager.instance.nextImage(),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
Positioned(
|
||||||
|
left: 0,
|
||||||
|
right: 0,
|
||||||
|
bottom: 12,
|
||||||
|
child: IgnorePointer(
|
||||||
|
child: Center(
|
||||||
|
child: ValueListenableBuilder<double>(
|
||||||
|
valueListenable: _zoomPercent,
|
||||||
|
builder: (context, zoom, _) {
|
||||||
|
final pct = zoom.round();
|
||||||
|
return Container(
|
||||||
|
padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 4),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: Colors.black.withValues(alpha: 0.35),
|
||||||
|
borderRadius: BorderRadius.circular(13),
|
||||||
|
),
|
||||||
|
child: Text(
|
||||||
|
pct < 1 ? '<1%' : '$pct%',
|
||||||
|
style: const TextStyle(
|
||||||
|
color: Colors.white,
|
||||||
|
fontSize: 12,
|
||||||
|
fontWeight: FontWeight.w500,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
if (_isDragging)
|
if (_isDragging)
|
||||||
Positioned.fill(
|
Positioned.fill(
|
||||||
@@ -362,18 +712,21 @@ class _NavButtonState extends State<_NavButton> {
|
|||||||
cursor: SystemMouseCursors.click,
|
cursor: SystemMouseCursors.click,
|
||||||
onEnter: (_) => setState(() => _hovered = true),
|
onEnter: (_) => setState(() => _hovered = true),
|
||||||
onExit: (_) => setState(() => _hovered = false),
|
onExit: (_) => setState(() => _hovered = false),
|
||||||
child: Container(
|
child: ValueListenableBuilder<Color>(
|
||||||
|
valueListenable: HoverColor.notifier,
|
||||||
|
builder: (context, hover, _) => Container(
|
||||||
width: 36,
|
width: 36,
|
||||||
height: 36,
|
height: 36,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: _hovered
|
color: _hovered
|
||||||
? Colors.red.withValues(alpha: 0.8)
|
? hover.withValues(alpha: 0.8)
|
||||||
: Colors.black.withValues(alpha: 0.35),
|
: Colors.black.withValues(alpha: 0.35),
|
||||||
shape: BoxShape.circle,
|
shape: BoxShape.circle,
|
||||||
),
|
),
|
||||||
child: Icon(widget.icon, color: Colors.white, size: 22),
|
child: Icon(widget.icon, color: Colors.white, size: 22),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -67,7 +67,7 @@ class CropSaveService {
|
|||||||
required img.Image source,
|
required img.Image source,
|
||||||
required CropViewParams vp,
|
required CropViewParams vp,
|
||||||
List<double>? matrix,
|
List<double>? matrix,
|
||||||
int jpegQuality = 93,
|
int jpegQuality = 95,
|
||||||
}) async {
|
}) async {
|
||||||
final outPath = buildOutputPath(srcPath);
|
final outPath = buildOutputPath(srcPath);
|
||||||
if (outPath == null) throw const CropSaveError('file_exists');
|
if (outPath == null) throw const CropSaveError('file_exists');
|
||||||
|
|||||||
@@ -0,0 +1,28 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
import 'window_persistence.dart';
|
||||||
|
|
||||||
|
/// Arayüzdeki tüm hover vurgularının rengi. Ayarlar > Genel'den seçilir,
|
||||||
|
/// window.json'da kalıcıdır.
|
||||||
|
class HoverColor {
|
||||||
|
HoverColor._();
|
||||||
|
|
||||||
|
static const List<Color> palette = [
|
||||||
|
Color(0xFFF44336), // kırmızı
|
||||||
|
Color(0xFFFF9800), // turuncu
|
||||||
|
Color(0xFFFFD54F), // sarı
|
||||||
|
Color(0xFF4CAF50), // yeşil
|
||||||
|
Color(0xFF009688), // turkuaz
|
||||||
|
Color(0xFF2196F3), // mavi
|
||||||
|
Color(0xFF9C27B0), // mor
|
||||||
|
Color(0xFFE91E63), // pembe
|
||||||
|
];
|
||||||
|
|
||||||
|
static final ValueNotifier<Color> notifier =
|
||||||
|
ValueNotifier<Color>(Color(WindowPersistence.hoverColor));
|
||||||
|
|
||||||
|
static void set(Color color) {
|
||||||
|
notifier.value = color;
|
||||||
|
WindowPersistence.saveHoverColor(color.toARGB32());
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,80 @@
|
|||||||
|
import 'dart:io';
|
||||||
|
import 'dart:typed_data';
|
||||||
|
|
||||||
|
import 'package:flutter/widgets.dart' show Size;
|
||||||
|
import 'package:image/image.dart' as img;
|
||||||
|
|
||||||
|
/// Görüntü dosyasının gerçek piksel boyutu — tam decode yapmadan.
|
||||||
|
///
|
||||||
|
/// PNG/GIF/BMP/WebP: boyut ilk 33 baytta → elle parse.
|
||||||
|
/// JPEG: SOF büyük APP/EXIF segmentlerinin ardından gelebilir → package:image startDecode.
|
||||||
|
Size? pixelSizeOfFile(String path) {
|
||||||
|
try {
|
||||||
|
final file = File(path);
|
||||||
|
final stat = file.statSync();
|
||||||
|
const maxHead = 512 * 1024;
|
||||||
|
final raf = file.openSync();
|
||||||
|
final header = raf.readSync(stat.size < maxHead ? stat.size : maxHead);
|
||||||
|
raf.closeSync();
|
||||||
|
return _headerPixelSize(header);
|
||||||
|
} catch (_) {}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
Size? _headerPixelSize(Uint8List b) {
|
||||||
|
try {
|
||||||
|
if (b.length >= 24 && b[0] == 0x89 && b[1] == 0x50) {
|
||||||
|
// PNG
|
||||||
|
final w = (b[16] << 24) | (b[17] << 16) | (b[18] << 8) | b[19];
|
||||||
|
final h = (b[20] << 24) | (b[21] << 16) | (b[22] << 8) | b[23];
|
||||||
|
return Size(w.toDouble(), h.toDouble());
|
||||||
|
}
|
||||||
|
if (b.length >= 10 && b[0] == 0x47 && b[1] == 0x49 && b[2] == 0x46) {
|
||||||
|
// GIF (WBMP da GIF tabanlı olabilir)
|
||||||
|
final w = b[6] | (b[7] << 8);
|
||||||
|
final h = b[8] | (b[9] << 8);
|
||||||
|
return Size(w.toDouble(), h.toDouble());
|
||||||
|
}
|
||||||
|
if (b.length >= 26 && b[0] == 0x42 && b[1] == 0x4D) {
|
||||||
|
// BMP
|
||||||
|
final w = b[18] | (b[19] << 8) | (b[20] << 16) | (b[21] << 24);
|
||||||
|
final h = b[22] | (b[23] << 8) | (b[24] << 16) | (b[25] << 24);
|
||||||
|
return Size(w.toDouble(), h.abs().toDouble());
|
||||||
|
}
|
||||||
|
if (b.length >= 30 &&
|
||||||
|
b[0] == 0x52 &&
|
||||||
|
b[1] == 0x49 &&
|
||||||
|
b[2] == 0x46 &&
|
||||||
|
b[3] == 0x46 &&
|
||||||
|
b[8] == 0x57 &&
|
||||||
|
b[9] == 0x45 &&
|
||||||
|
b[10] == 0x42 &&
|
||||||
|
b[11] == 0x50) {
|
||||||
|
// WebP
|
||||||
|
if (b[12] == 0x56 && b[13] == 0x50 && b[15] == 0x58) {
|
||||||
|
// VP8X
|
||||||
|
final w = b[24] | (b[25] << 8) | (b[26] << 16);
|
||||||
|
final h = b[27] | (b[28] << 8) | (b[29] << 16);
|
||||||
|
return Size((w + 1).toDouble(), (h + 1).toDouble());
|
||||||
|
}
|
||||||
|
if (b.length >= 25 && b[12] == 0x56 && b[13] == 0x50 && b[15] == 0x4C && b[20] == 0x2F) {
|
||||||
|
// VP8L
|
||||||
|
final w = (b[21] & 0x3F) | ((b[22] & 0x0F) << 6);
|
||||||
|
final h = (b[23] & 0x3F) | ((b[24] & 0x0F) << 6);
|
||||||
|
return Size((w + 1).toDouble(), (h + 1).toDouble());
|
||||||
|
}
|
||||||
|
if (b[12] == 0x56 && b[13] == 0x50 && b[15] == 0x20) {
|
||||||
|
// VP8 (lossy)
|
||||||
|
final w = (b[26] | (b[27] << 8)) & 0x3FFF;
|
||||||
|
final h = (b[28] | (b[29] << 8)) & 0x3FFF;
|
||||||
|
return Size(w.toDouble(), h.toDouble());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (_) {}
|
||||||
|
try {
|
||||||
|
// JPEG
|
||||||
|
final info = img.JpegDecoder().startDecode(b);
|
||||||
|
if (info != null) return Size(info.width.toDouble(), info.height.toDouble());
|
||||||
|
} catch (_) {}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
@@ -25,6 +25,11 @@ class WindowPersistence {
|
|||||||
/// Sadece modu günceller; x/y/w/h korunur.
|
/// Sadece modu günceller; x/y/w/h korunur.
|
||||||
static void saveFilled(bool value) => _write({'filled': value});
|
static void saveFilled(bool value) => _write({'filled': value});
|
||||||
|
|
||||||
|
/// Tüm arayüzdeki hover vurgu rengi (ARGB). Anahtar yoksa varsayılan kırmızı.
|
||||||
|
static int get hoverColor => (_read()?['hoverColor'] as num?)?.toInt() ?? 0xFFF44336;
|
||||||
|
|
||||||
|
static void saveHoverColor(int value) => _write({'hoverColor': value});
|
||||||
|
|
||||||
/// Save window rect synchronously (safe to call before destroy).
|
/// Save window rect synchronously (safe to call before destroy).
|
||||||
static void saveSync({
|
static void saveSync({
|
||||||
required Offset position,
|
required Offset position,
|
||||||
@@ -84,6 +89,36 @@ class WindowPersistence {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Work area (taskbar excluded) of the display containing the window,
|
||||||
|
/// in logical px. Returns null if screen info is unavailable.
|
||||||
|
static Future<Size?> workAreaSize({
|
||||||
|
required Offset windowPosition,
|
||||||
|
}) async {
|
||||||
|
try {
|
||||||
|
final displays = await screenRetriever.getAllDisplays();
|
||||||
|
|
||||||
|
// Pencerenin bulunduğu monitörü bul (çoklu monitör desteği)
|
||||||
|
Display display = await screenRetriever.getPrimaryDisplay();
|
||||||
|
for (final d in displays) {
|
||||||
|
final pos = d.visiblePosition;
|
||||||
|
final size = d.visibleSize ?? d.size;
|
||||||
|
if (pos != null &&
|
||||||
|
windowPosition.dx >= pos.dx &&
|
||||||
|
windowPosition.dx < pos.dx + size.width &&
|
||||||
|
windowPosition.dy >= pos.dy &&
|
||||||
|
windowPosition.dy < pos.dy + size.height) {
|
||||||
|
display = d;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return display.visibleSize ?? display.size;
|
||||||
|
} catch (_) {
|
||||||
|
// Fallback: screen info unavailable → caller silently no-ops.
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// Cascade: place new window to the right of the previous one.
|
/// Cascade: place new window to the right of the previous one.
|
||||||
/// Falls to the next row (row start) when it would overflow the screen,
|
/// Falls to the next row (row start) when it would overflow the screen,
|
||||||
/// and wraps to the top-left if the next row also overflows.
|
/// and wraps to the top-left if the next row also overflows.
|
||||||
|
|||||||
@@ -68,9 +68,10 @@ class AppShortcuts extends StatelessWidget {
|
|||||||
case LogicalKeyboardKey.arrowRight:
|
case LogicalKeyboardKey.arrowRight:
|
||||||
ImageManager.instance.nextImage();
|
ImageManager.instance.nextImage();
|
||||||
return KeyEventResult.handled;
|
return KeyEventResult.handled;
|
||||||
|
case LogicalKeyboardKey.f11:
|
||||||
case LogicalKeyboardKey.escape:
|
case LogicalKeyboardKey.escape:
|
||||||
windowManager.isFullScreen().then((isFullscreen) {
|
windowManager.isFullScreen().then((isFullscreen) {
|
||||||
if (isFullscreen) windowManager.setFullScreen(false);
|
windowManager.setFullScreen(event.logicalKey == LogicalKeyboardKey.f11 ? !isFullscreen : false);
|
||||||
});
|
});
|
||||||
return KeyEventResult.handled;
|
return KeyEventResult.handled;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,13 +1,22 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:window_manager/window_manager.dart';
|
import 'package:window_manager/window_manager.dart';
|
||||||
|
|
||||||
class CustomTitleBar extends StatelessWidget {
|
import '../services/hover_color.dart';
|
||||||
|
|
||||||
|
class CustomTitleBar extends StatefulWidget {
|
||||||
final VoidCallback? onSettings;
|
final VoidCallback? onSettings;
|
||||||
final VoidCallback? onSaveCrop;
|
final VoidCallback? onSaveCrop;
|
||||||
final bool visible;
|
final bool visible;
|
||||||
|
|
||||||
const CustomTitleBar({super.key, this.onSettings, this.onSaveCrop, this.visible = true});
|
const CustomTitleBar({super.key, this.onSettings, this.onSaveCrop, this.visible = true});
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<CustomTitleBar> createState() => _CustomTitleBarState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _CustomTitleBarState extends State<CustomTitleBar> {
|
||||||
|
bool _barHovered = false;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Positioned(
|
return Positioned(
|
||||||
@@ -15,14 +24,22 @@ class CustomTitleBar extends StatelessWidget {
|
|||||||
left: 0,
|
left: 0,
|
||||||
right: 0,
|
right: 0,
|
||||||
child: AnimatedOpacity(
|
child: AnimatedOpacity(
|
||||||
opacity: visible ? 1.0 : 0.0,
|
opacity: widget.visible ? 1.0 : 0.0,
|
||||||
duration: const Duration(milliseconds: 150),
|
duration: const Duration(milliseconds: 150),
|
||||||
|
child: MouseRegion(
|
||||||
|
cursor: SystemMouseCursors.grab,
|
||||||
|
onEnter: (_) => setState(() => _barHovered = true),
|
||||||
|
onExit: (_) => setState(() => _barHovered = false),
|
||||||
|
child: AnimatedContainer(
|
||||||
|
duration: const Duration(milliseconds: 120),
|
||||||
|
color: _barHovered
|
||||||
|
? Colors.white.withValues(alpha: 0.06)
|
||||||
|
: Colors.transparent,
|
||||||
child: DragToMoveArea(
|
child: DragToMoveArea(
|
||||||
child: SizedBox(
|
child: SizedBox(
|
||||||
height: 24,
|
height: 24,
|
||||||
child: Stack(
|
child: Stack(
|
||||||
children: [
|
children: [
|
||||||
if (onSettings != null)
|
|
||||||
Positioned(
|
Positioned(
|
||||||
left: 0,
|
left: 0,
|
||||||
top: 0,
|
top: 0,
|
||||||
@@ -30,9 +47,15 @@ class CustomTitleBar extends StatelessWidget {
|
|||||||
child: Row(
|
child: Row(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
|
if (widget.onSettings != null)
|
||||||
_BarButton(
|
_BarButton(
|
||||||
icon: Icons.settings,
|
icon: Icons.settings,
|
||||||
onTap: onSettings!,
|
onTap: widget.onSettings!,
|
||||||
|
),
|
||||||
|
if (widget.onSaveCrop != null)
|
||||||
|
_BarButton(
|
||||||
|
icon: Icons.save_outlined,
|
||||||
|
onTap: widget.onSaveCrop!,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
@@ -44,11 +67,6 @@ class CustomTitleBar extends StatelessWidget {
|
|||||||
child: Row(
|
child: Row(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
if (onSaveCrop != null)
|
|
||||||
_BarButton(
|
|
||||||
icon: Icons.save_outlined,
|
|
||||||
onTap: onSaveCrop!,
|
|
||||||
),
|
|
||||||
_BarButton(
|
_BarButton(
|
||||||
icon: Icons.horizontal_rule,
|
icon: Icons.horizontal_rule,
|
||||||
onTap: () => windowManager.minimize(),
|
onTap: () => windowManager.minimize(),
|
||||||
@@ -65,6 +83,8 @@ class CustomTitleBar extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -93,10 +113,12 @@ class _BarButtonState extends State<_BarButton> {
|
|||||||
cursor: SystemMouseCursors.click,
|
cursor: SystemMouseCursors.click,
|
||||||
onEnter: (_) => setState(() => _hovered = true),
|
onEnter: (_) => setState(() => _hovered = true),
|
||||||
onExit: (_) => setState(() => _hovered = false),
|
onExit: (_) => setState(() => _hovered = false),
|
||||||
child: Container(
|
child: ValueListenableBuilder<Color>(
|
||||||
|
valueListenable: HoverColor.notifier,
|
||||||
|
builder: (context, hover, _) => Container(
|
||||||
width: 32,
|
width: 32,
|
||||||
height: 24,
|
height: 24,
|
||||||
color: _hovered ? Colors.red.withValues(alpha: 0.8) : Colors.transparent,
|
color: _hovered ? hover.withValues(alpha: 0.8) : Colors.transparent,
|
||||||
child: Icon(
|
child: Icon(
|
||||||
widget.icon,
|
widget.icon,
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
@@ -104,6 +126,7 @@ class _BarButtonState extends State<_BarButton> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -6,11 +6,15 @@ import 'package:flutter/scheduler.dart';
|
|||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
import '../l10n/app_localizations.dart';
|
import '../l10n/app_localizations.dart';
|
||||||
import '../services/crop_save_service.dart';
|
import '../services/crop_save_service.dart';
|
||||||
|
import '../services/image_header.dart';
|
||||||
import '../services/window_persistence.dart';
|
import '../services/window_persistence.dart';
|
||||||
|
|
||||||
class ImageCanvas extends StatefulWidget {
|
class ImageCanvas extends StatefulWidget {
|
||||||
final String filePath;
|
final String filePath;
|
||||||
const ImageCanvas({super.key, required this.filePath});
|
|
||||||
|
/// Görüntünün gerçek piksel boyutuna göre ölçek yüzdesi (100% = 1:1).
|
||||||
|
final ValueNotifier<double>? zoomPercent;
|
||||||
|
const ImageCanvas({super.key, required this.filePath, this.zoomPercent});
|
||||||
@override
|
@override
|
||||||
State<ImageCanvas> createState() => ImageCanvasState();
|
State<ImageCanvas> createState() => ImageCanvasState();
|
||||||
}
|
}
|
||||||
@@ -37,6 +41,11 @@ class ImageCanvasState extends State<ImageCanvas> {
|
|||||||
double _startBrightness = 0;
|
double _startBrightness = 0;
|
||||||
DateTime? _lastRightTapTime;
|
DateTime? _lastRightTapTime;
|
||||||
Offset _lastRightTapPos = Offset.zero;
|
Offset _lastRightTapPos = Offset.zero;
|
||||||
|
/// Sağ tuş basılıyken anlamlı hareket oldu mu? (tıklama mı sürükleme mi)
|
||||||
|
bool _rightDragMoved = false;
|
||||||
|
int? _rightPointerId;
|
||||||
|
/// Sürükleme sayılma eşiği (px) — rotate/contrast ince ayarında el titremesi.
|
||||||
|
static const double _dragClickSlop = 4;
|
||||||
|
|
||||||
// ── Klavye modifier tracking ──
|
// ── Klavye modifier tracking ──
|
||||||
bool _ctrlPressed = false;
|
bool _ctrlPressed = false;
|
||||||
@@ -47,6 +56,44 @@ class ImageCanvasState extends State<ImageCanvas> {
|
|||||||
Size _imageSize = Size.zero;
|
Size _imageSize = Size.zero;
|
||||||
static const int _downsampleTarget = 2048;
|
static const int _downsampleTarget = 2048;
|
||||||
|
|
||||||
|
// ── Gerçek piksel boyutu + zoom yüzdesi ──
|
||||||
|
Size? _origSize;
|
||||||
|
bool _zoomSyncScheduled = false;
|
||||||
|
|
||||||
|
/// Yüzdeyi bir sonraki kare sonunda yayınla (build sırasında setState tetiklememek için).
|
||||||
|
void _syncZoom() {
|
||||||
|
if (_zoomSyncScheduled) return;
|
||||||
|
_zoomSyncScheduled = true;
|
||||||
|
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||||
|
_zoomSyncScheduled = false;
|
||||||
|
if (!mounted) return;
|
||||||
|
final n = widget.zoomPercent;
|
||||||
|
if (n == null) return;
|
||||||
|
final v = _zoomPercentValue();
|
||||||
|
if (n.value != v) n.value = v;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Ekrandaki ölçeğin görüntünün gerçek piksel boyutuna oranı (100% = 1:1).
|
||||||
|
double _zoomPercentValue() {
|
||||||
|
final o = _origSize;
|
||||||
|
if (o == null || o.isEmpty || _vpSize.isEmpty) return _sc * 100;
|
||||||
|
final double ratio;
|
||||||
|
if (_isFilled) {
|
||||||
|
// cover: kutu viewport, boya ölçeği max oran
|
||||||
|
ratio = math.max(_vpSize.width / o.width, _vpSize.height / o.height);
|
||||||
|
} else {
|
||||||
|
// contain: yerleşmiş görüntü kutusu (downsample sınırı dahil) → gerçek ölçek
|
||||||
|
final box = _imageKey.currentContext?.findRenderObject() as RenderBox?;
|
||||||
|
if (box != null && box.hasSize && box.size.width > 0) {
|
||||||
|
ratio = box.size.width / o.width;
|
||||||
|
} else {
|
||||||
|
ratio = math.min(_vpSize.width / o.width, _vpSize.height / o.height);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return _sc * ratio * 100;
|
||||||
|
}
|
||||||
|
|
||||||
// ── Kare hızına eşitlenmiş render tick ──
|
// ── Kare hızına eşitlenmiş render tick ──
|
||||||
final ValueNotifier<int> _renderTick = ValueNotifier(0);
|
final ValueNotifier<int> _renderTick = ValueNotifier(0);
|
||||||
bool _frameScheduled = false;
|
bool _frameScheduled = false;
|
||||||
@@ -128,8 +175,10 @@ class ImageCanvasState extends State<ImageCanvas> {
|
|||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
|
_origSize = pixelSizeOfFile(widget.filePath);
|
||||||
HardwareKeyboard.instance.addHandler(_onHardwareKey);
|
HardwareKeyboard.instance.addHandler(_onHardwareKey);
|
||||||
_startWarmup();
|
_startWarmup();
|
||||||
|
_syncZoom();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// İlk kullanım shader derlemesini açılışa çek: gizli katmanda sırayla
|
/// İlk kullanım shader derlemesini açılışa çek: gizli katmanda sırayla
|
||||||
@@ -189,6 +238,7 @@ class ImageCanvasState extends State<ImageCanvas> {
|
|||||||
void didUpdateWidget(ImageCanvas old) {
|
void didUpdateWidget(ImageCanvas old) {
|
||||||
super.didUpdateWidget(old);
|
super.didUpdateWidget(old);
|
||||||
if (old.filePath != widget.filePath) {
|
if (old.filePath != widget.filePath) {
|
||||||
|
_origSize = pixelSizeOfFile(widget.filePath);
|
||||||
_cachedFileImage?.evict();
|
_cachedFileImage?.evict();
|
||||||
_cachedProvider?.evict();
|
_cachedProvider?.evict();
|
||||||
_cachedFileImage = null;
|
_cachedFileImage = null;
|
||||||
@@ -207,6 +257,7 @@ class ImageCanvasState extends State<ImageCanvas> {
|
|||||||
_usingFullRes = false;
|
_usingFullRes = false;
|
||||||
_imageSize = Size.zero;
|
_imageSize = Size.zero;
|
||||||
_markRenderDirty();
|
_markRenderDirty();
|
||||||
|
_syncZoom();
|
||||||
}
|
}
|
||||||
|
|
||||||
void _toggleFillFit() {
|
void _toggleFillFit() {
|
||||||
@@ -215,6 +266,7 @@ class ImageCanvasState extends State<ImageCanvas> {
|
|||||||
_flipH = false;
|
_flipH = false;
|
||||||
WindowPersistence.saveFilled(_isFilled);
|
WindowPersistence.saveFilled(_isFilled);
|
||||||
_markRenderDirty();
|
_markRenderDirty();
|
||||||
|
_syncZoom();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Ctrl+R: sağ çift tık gibi efektleri sıfırlar ve yatay aynalar; tekrar basınca geri alır.
|
/// Ctrl+R: sağ çift tık gibi efektleri sıfırlar ve yatay aynalar; tekrar basınca geri alır.
|
||||||
@@ -233,7 +285,7 @@ class ImageCanvasState extends State<ImageCanvas> {
|
|||||||
final double vy = _angle == 0 ? e.localPosition.dy : _vpSize.height / 2;
|
final double vy = _angle == 0 ? e.localPosition.dy : _vpSize.height / 2;
|
||||||
final double cx = (vx - _tx) / _sc;
|
final double cx = (vx - _tx) / _sc;
|
||||||
final double cy = (vy - _ty) / _sc;
|
final double cy = (vy - _ty) / _sc;
|
||||||
const double factor = 1.1;
|
final double factor = _ctrlPressed ? 1.01 : 1.1;
|
||||||
final double rawSc = _sc * (e.scrollDelta.dy < 0 ? factor : 1.0 / factor);
|
final double rawSc = _sc * (e.scrollDelta.dy < 0 ? factor : 1.0 / factor);
|
||||||
final double newSc = rawSc.clamp(1.0, 20.0);
|
final double newSc = rawSc.clamp(1.0, 20.0);
|
||||||
if (_angle == 0) {
|
if (_angle == 0) {
|
||||||
@@ -250,6 +302,7 @@ class ImageCanvasState extends State<ImageCanvas> {
|
|||||||
_checkFullResSwap();
|
_checkFullResSwap();
|
||||||
_clamp();
|
_clamp();
|
||||||
_markRenderDirty();
|
_markRenderDirty();
|
||||||
|
_syncZoom();
|
||||||
}
|
}
|
||||||
|
|
||||||
void _onPanUpdate(DragUpdateDetails d) {
|
void _onPanUpdate(DragUpdateDetails d) {
|
||||||
@@ -263,23 +316,8 @@ class ImageCanvasState extends State<ImageCanvas> {
|
|||||||
if (e.buttons != kSecondaryMouseButton) return;
|
if (e.buttons != kSecondaryMouseButton) return;
|
||||||
|
|
||||||
_pointerDownPos = e.localPosition;
|
_pointerDownPos = e.localPosition;
|
||||||
|
_rightDragMoved = false;
|
||||||
final now = DateTime.now();
|
_rightPointerId = e.pointer;
|
||||||
if (_lastRightTapTime != null &&
|
|
||||||
now.difference(_lastRightTapTime!) < const Duration(milliseconds: 400) &&
|
|
||||||
(e.localPosition - _lastRightTapPos).distance < 20) {
|
|
||||||
_angle = 0;
|
|
||||||
_contrast = 1.0;
|
|
||||||
_saturation = 1.0;
|
|
||||||
_brightness = 0;
|
|
||||||
_flipH = false;
|
|
||||||
_interactionMode = 'none';
|
|
||||||
_markRenderDirty();
|
|
||||||
_lastRightTapTime = null;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
_lastRightTapTime = now;
|
|
||||||
_lastRightTapPos = e.localPosition;
|
|
||||||
|
|
||||||
if (_ctrlPressed && _shiftPressed) {
|
if (_ctrlPressed && _shiftPressed) {
|
||||||
_interactionMode = 'brightness';
|
_interactionMode = 'brightness';
|
||||||
@@ -298,6 +336,10 @@ class ImageCanvasState extends State<ImageCanvas> {
|
|||||||
|
|
||||||
void _onPointerMove(PointerMoveEvent e) {
|
void _onPointerMove(PointerMoveEvent e) {
|
||||||
if (e.buttons != kSecondaryMouseButton) return;
|
if (e.buttons != kSecondaryMouseButton) return;
|
||||||
|
if (!_rightDragMoved &&
|
||||||
|
(e.localPosition - _pointerDownPos).distance > _dragClickSlop) {
|
||||||
|
_rightDragMoved = true;
|
||||||
|
}
|
||||||
|
|
||||||
final dy = e.localPosition.dy - _pointerDownPos.dy;
|
final dy = e.localPosition.dy - _pointerDownPos.dy;
|
||||||
|
|
||||||
@@ -319,7 +361,30 @@ class ImageCanvasState extends State<ImageCanvas> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void _onPointerUp(PointerUpEvent e) {
|
void _onPointerUp(PointerUpEvent e) {
|
||||||
|
if (e.pointer != _rightPointerId) return;
|
||||||
|
_rightPointerId = null;
|
||||||
_interactionMode = 'none';
|
_interactionMode = 'none';
|
||||||
|
// Sürükleme ile biten etkileşim sağ çift tık zincirini keser; yalnızca
|
||||||
|
// gerçek tıklamalar (hareketsiz bas-bırak) çift tık sayılır.
|
||||||
|
if (_rightDragMoved) {
|
||||||
|
_lastRightTapTime = null;
|
||||||
|
_rightDragMoved = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
final now = DateTime.now();
|
||||||
|
final isDouble = _lastRightTapTime != null &&
|
||||||
|
now.difference(_lastRightTapTime!) < const Duration(milliseconds: 400) &&
|
||||||
|
(e.localPosition - _lastRightTapPos).distance < 20;
|
||||||
|
_lastRightTapTime = isDouble ? null : now;
|
||||||
|
_lastRightTapPos = e.localPosition;
|
||||||
|
if (isDouble) {
|
||||||
|
_angle = 0;
|
||||||
|
_contrast = 1.0;
|
||||||
|
_saturation = 1.0;
|
||||||
|
_brightness = 0;
|
||||||
|
_flipH = false;
|
||||||
|
_markRenderDirty();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// ── Combined color filter (brightness × saturation × contrast) ──
|
// ── Combined color filter (brightness × saturation × contrast) ──
|
||||||
@@ -502,7 +567,10 @@ class ImageCanvasState extends State<ImageCanvas> {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return LayoutBuilder(
|
return LayoutBuilder(
|
||||||
builder: (context, constraints) {
|
builder: (context, constraints) {
|
||||||
|
if (constraints.biggest != _vpSize) {
|
||||||
_vpSize = constraints.biggest;
|
_vpSize = constraints.biggest;
|
||||||
|
_syncZoom();
|
||||||
|
}
|
||||||
_clamp();
|
_clamp();
|
||||||
return RepaintBoundary(
|
return RepaintBoundary(
|
||||||
child: ValueListenableBuilder<int>(
|
child: ValueListenableBuilder<int>(
|
||||||
|
|||||||
@@ -0,0 +1,109 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
import '../services/hover_color.dart';
|
||||||
|
|
||||||
|
/// Ekran oranı buton ızgarası: 31 buton `a:b` (a dikeyi, b yatayı böler;
|
||||||
|
/// hedef boyut `W/b × H/a`). Sol-üst hücre `H:W` etiketi — buton değil
|
||||||
|
/// (1:1 yok: title bar çift tık zaten tam ekran).
|
||||||
|
///
|
||||||
|
/// Yerleşim: 8 satır × 4 sütun; hücreler mevcut alanı kaplayacak şekilde
|
||||||
|
/// esner (pencere/sekme alanı büyüdükçe butonlar büyür).
|
||||||
|
class WindowSizeSelector extends StatelessWidget {
|
||||||
|
final Future<Size?> Function() workArea;
|
||||||
|
final void Function(int rows, int cols, Size work) onPick;
|
||||||
|
|
||||||
|
const WindowSizeSelector({
|
||||||
|
super.key,
|
||||||
|
required this.workArea,
|
||||||
|
required this.onPick,
|
||||||
|
});
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Column(
|
||||||
|
children: [
|
||||||
|
for (var b = 1; b <= 8; b++)
|
||||||
|
Expanded(
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
for (var a = 1; a <= 4; a++) Expanded(child: _cell(a, b)),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Satır = `b` (1..8, yatay bölün); satır içinde `a` (1..4, dikey bölün).
|
||||||
|
Widget _cell(int a, int b) {
|
||||||
|
return Padding(
|
||||||
|
padding: const EdgeInsets.only(right: 3, bottom: 3),
|
||||||
|
child: a == 1 && b == 1
|
||||||
|
? _gridLabel('H:W')
|
||||||
|
: _SizeCell(
|
||||||
|
a: a,
|
||||||
|
b: b,
|
||||||
|
onTap: () async {
|
||||||
|
final work = await workArea();
|
||||||
|
if (work != null) onPick(a, b, work);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget _gridLabel(String text) {
|
||||||
|
return Container(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: Colors.white10,
|
||||||
|
borderRadius: BorderRadius.circular(4),
|
||||||
|
),
|
||||||
|
alignment: Alignment.center,
|
||||||
|
child: Text(
|
||||||
|
text,
|
||||||
|
style: const TextStyle(color: Colors.white54, fontSize: 11),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class _SizeCell extends StatefulWidget {
|
||||||
|
final int a;
|
||||||
|
final int b;
|
||||||
|
final VoidCallback onTap;
|
||||||
|
|
||||||
|
const _SizeCell({required this.a, required this.b, required this.onTap});
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<_SizeCell> createState() => _SizeCellState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _SizeCellState extends State<_SizeCell> {
|
||||||
|
bool _hover = false;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return MouseRegion(
|
||||||
|
cursor: SystemMouseCursors.click,
|
||||||
|
onEnter: (_) => setState(() => _hover = true),
|
||||||
|
onExit: (_) => setState(() => _hover = false),
|
||||||
|
child: GestureDetector(
|
||||||
|
onTap: widget.onTap,
|
||||||
|
child: ValueListenableBuilder<Color>(
|
||||||
|
valueListenable: HoverColor.notifier,
|
||||||
|
builder: (context, hover, _) => AnimatedContainer(
|
||||||
|
duration: const Duration(milliseconds: 100),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: _hover ? hover.withValues(alpha: 0.4) : Colors.white10,
|
||||||
|
borderRadius: BorderRadius.circular(4),
|
||||||
|
),
|
||||||
|
alignment: Alignment.center,
|
||||||
|
child: Text(
|
||||||
|
'${widget.a}:${widget.b}',
|
||||||
|
style: const TextStyle(color: Colors.white, fontSize: 12),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
name: imajviewer
|
name: imajviewer
|
||||||
description: "Ultra-lightweight image viewer for Linux and Windows."
|
description: "Ultra-lightweight image viewer for Linux and Windows."
|
||||||
publish_to: 'none'
|
publish_to: 'none'
|
||||||
version: 1.6.1+13
|
version: 1.9.2+22
|
||||||
|
|
||||||
msix_config:
|
msix_config:
|
||||||
display_name: ImajViewer
|
display_name: ImajViewer
|
||||||
|
|||||||