81 Commits

Author SHA1 Message Date
Daniel Gao
711f274403 Get rid of relative include paths
* Use target_include_directories to specify include paths
* Specify project root (parent of rtgui and rtengine) as include path
* Replace relative includes with normal includes
2024-11-16 17:20:02 -05:00
Pandagrapher
d0743ef359 Merge with 'Beep6581/dev' 2023-08-12 18:03:41 +02:00
Christian-Kr
0507b0a26a Add a comment why setting the position of a not drawn thumb is needed here. 2023-06-25 06:50:13 +02:00
Christian-Kr
a4eeb66145 Set dummy width and height for ThumbBrowserEntry, cause height will be used to calculate the height of the scroll pane. Positions also need to be set as a dummy, cause no method allows only width or height. 2023-06-19 19:05:42 +02:00
Pandagrapher
c28d5aab97 Merge with "Beep6581/dev" 2023-03-11 11:02:29 +01:00
Niklas Haas
2101b846c3
Implement file sorting in thumbnail view (#6449)
* Use mtime as fallback timestamp for files without EXIF data

As suggested in #6449, with date-based sorting it can be useful to have
at least *some* sort of time-relevant information for EXIF-less files,
to prevent them from falling back to getting sorted alphabetically all
the time.

This commit simply defaults the file timestamp to the file's mtime as
returned by g_stat. For annoying reasons, it doesn't suffice to merely
forward the timestamp to the FileData structs - we also need to keep
track of it inside FilesData to cover the case of a file with 0 frames
in it.

* Add DateTime to Thumbnail

Putting it here facilitate easier sorting without having to re-construct
the DateTime on every comparison.

To simplify things moving forwards, use the Glib::DateTime struct right
away. This struct also contains timezone information, but we don't
currently care about timezone - so just use the local timezone as the
best approximation. (Nothing currently depends on getting the timezone
right, anyway)

In addition to the above, this commit also changes the logic to allow
generating datetime strings even for files with missing EXIF (which
makes sense as a result of the previous commit allowing the use of mtime
instead).

* Implement file sorting in thumbnail view

For simplicity, I decided to only implement the attributes that I could
verily easily reach from the existing metadata exported by Thumbnail.
Ideally, I would also like to be able to sort by "last modified" but I'm
not sure of the best way to reach this from this place in the code.

It's worth pointing out that, with the current implementation, the list
will not dynamically re-sort itself until you re-select the sorting
method - even if you make changes to the files that would otherwise
affect the sorting (e.g. changing the rank while sorting by rank). One
might even call this a feature, not a bug, since it prevents thumbnails
from moving around while you're trying to re-label them. You can always
re-select "sort by ..." from the context menu to force a re-sort.

Fixes #3317

Co-authored-by: Thanatomanic <6567747+Thanatomanic@users.noreply.github.com>
2023-01-02 21:27:12 +01:00
Pandagrapher
89d2bdce5b Initial commit for real hidpi support
Note: This commit has only been tested on MacOS

Changes:
- Icons now use the native hidpi support from Gtk (through Icon Theme)
- Icons are now directly generated from scalable file (i.e. SVG file)
- Widget sizes are scaled based on DPI and scale factor
- Font size is scaled based on DPI and scale factor
2022-08-19 16:47:28 +02:00
Thanatomanic
fc031ccb5a
Remove deprecated GTK3 code, fixes #6103 (#6113)
Replaces the following deprecated Gtk classes throughout the codebase by their non-deprecated counterparts. Style, HBox, VBox, HPaned, VPaned, HScrollbar, VScrollbar, VSeparator, HSeparator, Stock, Table, VScale and HScale.
2021-02-17 11:44:25 +01:00
rfranke
590ee199cc Fix scrolling in thumb browser under macOS, see #5599
The Quartz backend emits adjusted GdkEventScroll delta values.
This is why the RT thumb browser scrolls several hundred times too fast
if the deltas are additionally multiplied by thumb size under macOS.

See use of scroll_unit and GDK_WINDOWING_QUARTZ for Gtk scrollbars:
https://gitlab.gnome.org/GNOME/gtk/blob/gtk-3-24/gtk/gtkrange.c#L3080
2020-01-12 16:09:11 +01:00
Ingo Weyrich
79431ffa1d Some changes suggested by @Floessie 2019-11-26 19:42:48 +01:00
Ingo Weyrich
587652283d further reduction of include dependencies, also finalised some classes 2019-11-09 16:51:54 +01:00
Ingo Weyrich
e5258e6f60 reduce rtgui/inspector.h dependencies 2019-11-08 20:22:18 +01:00
Ingo Weyrich
b3b1008270 Further reduction of include dependencies 2019-11-02 17:29:26 +01:00
Ingo Weyrich
e682b364b5 Further reduction of include dependencies 2019-11-01 14:51:33 +01:00
Ingo Weyrich
068847eb5a Further cleanup of include dependencies 2019-10-29 21:06:27 +01:00
Morgan Hardwood
60b2196bce Updated gnu.org links to use HTTPS 2019-09-10 12:34:57 +02:00
Andy Dodd
a060b57ff6 rtgui/thumbbrowserbase - Improve behavior with smooth scrolling devices
Devices such as trackpads will emit smooth scrolling (GDK_SMOOTH_SCROLL) events with
deltas smaller than +/-1.0 at high frequency.

Quantizing these to +/-1.0 leads to significant amplification of scroll speed to the point
of unusability

Scroll by delta instead of +/-1.0 in these cases, permitting smooth scrolling through thumbnails

Some mice emit GDK_SMOOTH_SCROLL with deltas of +/-1.0 per detent.  This patch will not change behavior
with such devices.  However, if any mice emit deltas of smaller magnitude, the per-detent behavior will
change.
2019-08-30 16:55:29 -04:00
Ingo Weyrich
4bf4b818c0 cppcheck fixes 2019-08-08 13:41:14 +02:00
Ingo Weyrich
c82aafb748 Merge branch 'dev' into filebrowser-catalog-speedups 2019-07-30 16:16:46 +02:00
Ingo Weyrich
f85de946e6 Fix some corner cases in thumb selection, #5393 2019-07-30 14:44:18 +02:00
Ingo Weyrich
6b868a8d4d Make thumbnail range-selection more similar to OS behaviour, fixes #5393 2019-07-30 13:22:15 +02:00
Ingo Weyrich
287bd5bbe3 boolean > bool 2019-07-29 23:05:01 +02:00
Ingo Weyrich
0f0dc03849 Fix broken thumbnail butto tooltips 2019-07-29 15:21:23 +02:00
Ingo Weyrich
e748f42427 Some code cleanups 2019-07-27 21:26:00 +02:00
Ingo Weyrich
de963c54de Further speedups for filebrowser/catalog 2019-07-27 17:39:16 +02:00
Ingo Weyrich
1320791052 Backwards thumbnail selection using Shift-key unexpectedly shifts starting point of selection, fixes #5389 2019-07-27 11:40:01 +02:00
Morgan Hardwood
a9edbcf47b Improve page-up/down scrolling in File Browser
Patch by Ingo
2019-07-25 14:11:40 +02:00
Morgan Hardwood
4cbc2a9091 Fix missing filename tooltip
When hovering over a thumb which has characters in its filename which
are used in markup, such as '&', the tooltip was missing, due to the
ampersand being parsed as markup. Now the filename is treated as plain
text.
2019-07-25 12:04:45 +02:00
Morgan Hardwood
a6b1eb46fd Filmstrip horizontal scroll rate
When scrolling with the mouse scroll-wheel while hovering over a
thumbnail in the Filmstrip, now it scrolls by an amount equal to
the first thumb's width. Previously it used the height.
Spotted by Ingo.
2019-07-25 11:49:17 +02:00
Ingo Weyrich
cbb3f05b7e use empty() instead of comparison with an empty string 2019-07-22 13:49:08 +02:00
Ingo Weyrich
bbdd774afb Further speedups for filebrowser 2019-07-17 21:29:24 +02:00
heckflosse
bd2ee13e7b revert commit 6e364e4, fixes #5308 2019-04-25 21:09:35 +02:00
heckflosse
6e364e4c80 First doubleclick on an image after starting rt does not open the image. Patch provided by @Pandagrapher, fixes #5294 2019-04-22 21:18:44 +02:00
Hombre
97824da6de Histogram and Navigator now handle Hi-DPI.
+ widgets are now sized depending on Hi-DPI
see issue #3547
2019-01-04 15:32:35 +01:00
Hombre
78fa7dc063 SHCSelector, ThresholdSelector, LabGrid and Curves now handles HiDPI
see issue #3547
2019-01-02 18:04:58 +01:00
Hombre57
7e01976ab2 Bugfix and cleanup
See issue #3547
2018-12-14 01:05:11 +01:00
Hombre
7ab3893b2b Merge branch 'dev' into hidpi-icons 2018-12-09 00:13:01 +01:00
heckflosse
2ec094b1ce remove special windows code, #5058 2018-12-03 13:30:51 +01:00
Hombre
434e121f99 Merge branch 'dev' into hidpi-icons 2018-11-29 00:15:57 +01:00
heckflosse
d06e26356b Fix scrolling in wrong direction when using mouse wheel in filebrowser, #5036 2018-11-27 19:54:26 +01:00
heckflosse
e7a04bb77e Fix coverity issues 2018-11-20 21:23:37 +01:00
Hombre
785a0e6a46 Merge branch 'dev' into hidpi-icons 2018-10-25 20:43:41 +02:00
Hombre
4eb8a8f70c Adding HiDPI support (WIP) 2018-10-25 20:22:33 +02:00
Hombre
8a18300a76 Removing debug printf (no issue) 2018-10-15 23:13:57 +02:00
Hombre
0d61f14bae Added support for GDK_SCROLL_SMOOTH in some widgets
see #4781, #4786
2018-09-15 21:14:48 +02:00
heckflosse
bb9e7c5d66 Filmstrip height not high enough after latest dev, fixes #4655 2018-07-02 11:03:19 +02:00
Thanatomanic
cccfb02b51 Hide scrollbar if necessary 2018-07-01 15:53:29 +02:00
Thanatomanic
fc79968108 Sanity checks for height, horizontal thumb browser automatically scales. 2018-07-01 15:52:21 +02:00
Thanatomanic
3d7772d0c6 The scrolling distance now takes into account the effective height of the thumbnail (including exif if necessary) 2018-07-01 13:47:42 +02:00
Thanatomanic
b5310d4bc6 Scrolling speed changed to height of thumbnail.
This works really well in the browser. Horizontal scrolling has the same speed, which works reasonably well too (unless you have images with abnormal aspect ratio's).
2018-07-01 09:36:38 +02:00