Commit 0f2c4fb
committed
feat: make EXIF info panel draggable and persist location
- Replaced hardcoded info panel offset with configurable `InfoPanelX` and `InfoPanelY` logical coordinates in `AppConfig` and `RuntimeConfig`.
- Added `IsDraggingInfoPanel` boolean and `InfoPanelDragAnchor` point to `ViewState` structure.
- Introduced new `UIHitResult::InfoPanelDrag` type.
- Updated `DrawInfoPanel` and `DrawCompactInfo` logic to calculate display positions dynamically, scaling the new coordinates to `m_uiScale`.
- Upgraded `HitTest` logic in `UIRenderer` to return `InfoPanelDrag` when the cached panel bounds are dragged, outside of special sub-areas.
- Added comprehensive drag handlers inside `WM_LBUTTONDOWN`, `WM_MOUSEMOVE` and `WM_LBUTTONUP` in the WinProc loop (`main.cpp`) to handle relative delta offset logic, bounds clamping, and configuration persistance.1 parent 7ff6f2a commit 0f2c4fb
4 files changed
Lines changed: 71 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
196 | 196 | | |
197 | 197 | | |
198 | 198 | | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
199 | 203 | | |
200 | 204 | | |
201 | 205 | | |
| |||
375 | 379 | | |
376 | 380 | | |
377 | 381 | | |
| 382 | + | |
| 383 | + | |
378 | 384 | | |
379 | 385 | | |
380 | 386 | | |
| |||
396 | 402 | | |
397 | 403 | | |
398 | 404 | | |
| 405 | + | |
| 406 | + | |
399 | 407 | | |
400 | 408 | | |
401 | 409 | | |
| |||
475 | 483 | | |
476 | 484 | | |
477 | 485 | | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
478 | 489 | | |
479 | 490 | | |
480 | 491 | | |
| |||
510 | 521 | | |
511 | 522 | | |
512 | 523 | | |
| 524 | + | |
| 525 | + | |
513 | 526 | | |
514 | 527 | | |
515 | 528 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
271 | 271 | | |
272 | 272 | | |
273 | 273 | | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
274 | 281 | | |
275 | 282 | | |
276 | 283 | | |
| |||
2615 | 2622 | | |
2616 | 2623 | | |
2617 | 2624 | | |
2618 | | - | |
| 2625 | + | |
| 2626 | + | |
| 2627 | + | |
2619 | 2628 | | |
2620 | 2629 | | |
2621 | 2630 | | |
| |||
2635 | 2644 | | |
2636 | 2645 | | |
2637 | 2646 | | |
| 2647 | + | |
| 2648 | + | |
| 2649 | + | |
2638 | 2650 | | |
2639 | 2651 | | |
2640 | 2652 | | |
| |||
2835 | 2847 | | |
2836 | 2848 | | |
2837 | 2849 | | |
2838 | | - | |
2839 | | - | |
| 2850 | + | |
| 2851 | + | |
2840 | 2852 | | |
2841 | 2853 | | |
2842 | 2854 | | |
2843 | 2855 | | |
2844 | 2856 | | |
| 2857 | + | |
2845 | 2858 | | |
2846 | 2859 | | |
2847 | 2860 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
67 | | - | |
| 67 | + | |
| 68 | + | |
68 | 69 | | |
69 | 70 | | |
70 | 71 | | |
| |||
140 | 141 | | |
141 | 142 | | |
142 | 143 | | |
| 144 | + | |
| 145 | + | |
143 | 146 | | |
144 | 147 | | |
145 | 148 | | |
| |||
263 | 266 | | |
264 | 267 | | |
265 | 268 | | |
| 269 | + | |
266 | 270 | | |
267 | 271 | | |
268 | 272 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8078 | 8078 | | |
8079 | 8079 | | |
8080 | 8080 | | |
| 8081 | + | |
| 8082 | + | |
| 8083 | + | |
| 8084 | + | |
| 8085 | + | |
| 8086 | + | |
| 8087 | + | |
| 8088 | + | |
| 8089 | + | |
| 8090 | + | |
| 8091 | + | |
| 8092 | + | |
| 8093 | + | |
| 8094 | + | |
| 8095 | + | |
| 8096 | + | |
| 8097 | + | |
| 8098 | + | |
| 8099 | + | |
| 8100 | + | |
| 8101 | + | |
| 8102 | + | |
8081 | 8103 | | |
8082 | 8104 | | |
8083 | 8105 | | |
| |||
8925 | 8947 | | |
8926 | 8948 | | |
8927 | 8949 | | |
| 8950 | + | |
| 8951 | + | |
| 8952 | + | |
| 8953 | + | |
| 8954 | + | |
| 8955 | + | |
8928 | 8956 | | |
8929 | 8957 | | |
8930 | 8958 | | |
| |||
9148 | 9176 | | |
9149 | 9177 | | |
9150 | 9178 | | |
| 9179 | + | |
| 9180 | + | |
| 9181 | + | |
| 9182 | + | |
| 9183 | + | |
| 9184 | + | |
| 9185 | + | |
| 9186 | + | |
| 9187 | + | |
9151 | 9188 | | |
9152 | 9189 | | |
9153 | 9190 | | |
| |||
0 commit comments