62 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
990e9c70a5 Merge with 'Beep6581/dev' 2023-09-05 09:48:43 +02:00
Lawrence Lee
0fdac3797a
Merge branch 'dev' into browser-preview-applied-pparams 2023-08-29 22:58:51 -07:00
Pandagrapher
bf988ad274 Updates font management for hidpi
Improvements:
- Cleanup of default options files to use OS font by default
- Comments updates
- Simplify font size management as Pango/Gtk directly manage pt/px conversions

Bug fix:
- If Preference panel is closed by "cancel", font size was not reinitialized to previously saved one
- Font size was specified in "RawTherapee.css" theme and so user choice could be ignored
2023-08-23 13:43:07 +02:00
Pandagrapher
d0743ef359 Merge with 'Beep6581/dev' 2023-08-12 18:03:41 +02:00
Hombre57
4f752154cf Moving FileBrowserEntry static variable initialization to a dedicated
method. Fixes a crash introduced by PR #5435.
2023-08-03 20:12:52 +02:00
Lawrence Lee
6787c53c9b
Show black level adjustments in file browser
File browser thumbnails for raw images start with a minimally-processed
images. These images are cached and image adjustments are applied on
top. The black level is "baked-into" the cached image. Therefore, to
reflect the black level adjustments in the thumbnail, one of two options
are required:
    1. Cache an image before the black level is applied and process the
       black level on top of this image.
    2. Recreate the base image with the new black level and cache it.
The first option yields better performance when the user changes the
black level. However, it requires other base adjustments to be applied
every time, such as the camera multipliers. The second option requires
the base image to be recreated every time the black level is changed.
This commit implements the second option. It minimizes code changes, and
therefore possible bugs. It does add a performance penalty when the
black level changes, but the black level adjustment is rarely used.
2023-07-29 17:37:13 -07: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
21ebb81ece Stop using scale factor for font and pixel size scaling 2022-12-09 16:09:03 +01:00
Pandagrapher
50e54aa395 Convert remaining RTPixbuf to RTSurface
Changes:
- Remove RTPixbuf use in directory browser to use native GTK mechanism
- Replace RTPixbuf by RTSurface for thumbnail icons
- Remove now useless RTPixbuf class

Fixes:
- Elaborate RTSurface width / height based on the type
2022-08-27 11:37:59 +02:00
Pandagrapher
36222d14a2 Fixes blur rendering with RTSurface on hidpi screen
Other fixes:
- Fixes splash image not rendered
- Cleans commented code
- Replaces deprecated librsvg functions
- Updates Makefile librsvg required minimum version
- Correctly uses RTSurface getWidth / getHeight functions
- Improves lwbutton aspect

Known issues:
- Blur rendering with RTPixbuf on hidpi screen
2022-08-21 15:45:07 +02:00
Pandagrapher
7ee6fd795b Add other font size scaling
Minor fixes:
- Fixes some incorrect cast
- fixes some incorrect comments
2022-08-19 19:05:06 +02: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
Ingo Weyrich
8bd9bddfc7
New crop guide: square center, closes #6342 (#6345)
* New crop guide: square center, closes #6342

* Turn `CropParams::guide` into an `enum`

This saves recurring string comparisons.

Co-authored-by: Flössie <floessie.mail@gmail.com>
2021-08-25 15:25:59 +02:00
Lawrence Lee
58995a052d Properly enable inspector window for film strip 2021-04-25 15:44:49 -07:00
Floessie
1318935a87
Better handle thumbnail generation of extreme aspect ratio images (fixes #3794)
* Backport fix taken from ART
* Enforce minimal thumbnail size of 1x1 px in two places, prevents divison by zero and empty image generation
2020-10-25 18:24:30 +01:00
Ingo Weyrich
a5c7713042 Cleanup: removed unused function; also murder instead of call for suicide (delete this) 2020-08-13 13:10:33 +02:00
Ingo Weyrich
2a4891827d Some cleanups 2019-11-26 15:25:11 +01:00
Ingo Weyrich
587652283d further reduction of include dependencies, also finalised some classes 2019-11-09 16:51:54 +01:00
Ingo Weyrich
c1f9120ef4 Further reduction of include dependencies 2019-11-01 21:20:52 +01:00
Morgan Hardwood
60b2196bce Updated gnu.org links to use HTTPS 2019-09-10 12:34:57 +02:00
Hombre
ce04447c7a Fix crash while rotating several thumbnails in File Browser
Fix issue #4858 and possibly #5310
2019-09-03 22:18:20 +02:00
Ingo Weyrich
4e4106b4e7 Minor cleanups 2019-07-29 14:41:36 +02:00
Ingo Weyrich
d9c93e77ae filecatalog/filebrowser: further optimizations 2019-07-19 23:45:02 +02:00
Hombre
52dcd08b97 Merge branch 'dev' into hidpi-icons 2019-03-13 01:00:14 +01:00
Flössie
0cbc4923bc Relax dependency from procparams.h 2019-02-28 20:44:50 +01:00
Hombre
cc1779a0ae Merge branch 'dev' into hidpi-icons 2019-01-24 22:02:44 +01:00
Flössie
b21d910573 Remove legacy IdleRegister::add<>() 2019-01-01 20:58:26 +01:00
Hombre
5ea0bacddd Icons are resized depending on the current scale/resolution
See issue #3547 and #4803
2018-12-08 22:48:15 +01:00
Flössie
5906329485 Review IdleRegister (#4892)
This turns `IdleRegister::add()` into a template function to make the
provided function pointers type safe. It also adds a `delete_data`
parameter to manage the provided data pointer even in `destroy()`.
2018-10-28 13:12:01 +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
Flössie
2125f42116 Turn almost all Listeners into abstract interfaces 2018-10-09 20:32:40 +02:00
heckflosse
04b2d42d46 Segfault when closing rt immediately after using batch edit, fixes #4806 2018-09-15 14:48:51 +02:00
Morgan Hardwood
c9e6a18fb8 Use small thumbnail icon for files in queue 2018-08-06 11:16:09 +02:00
Morgan Hardwood
a0021d3348 Icon tweaks and fixes, #4469
Ticks, used for edited image, are now theme-colored.
Missing ticks and missing CD-ROM icons fixed.
2018-07-17 00:00:32 +02:00
Morgan Hardwood
10af344672 Merge branch 'dev' into iconcleanup4 2018-07-13 18:14:48 +02:00
Morgan Hardwood
522495f4eb Icon cleanup #4469 #3547
Rebased in new branch to cleanup commit history.
2018-07-13 18:13:35 +02:00
Flössie
f9c0669c42 Try to fix thumbbrowser deadlock (#4576) 2018-06-27 20:11:18 +02:00
Alberto Griggio
8168611c23 added preferences to control the behaviour of the crop tool 2018-01-03 15:44:34 +01:00
Hombre57
86dac147c6 Adding icons on thumbnails and solving a bug in cacheimagedata.cc
See issue #4008.
The bug in cacheimagedata.cc was preventing correct cached thumbnail
loading, asking for a full processing at each loading of the directory.
2017-08-13 18:13:39 +02:00
heckflosse
41d3179f2c remove some gcc4.8/windows special code as minimum gcc version to build rt is 4.9 2017-06-21 01:09:16 +02:00
heckflosse
a9f769c5d7 Fix some coverity issues 2017-06-19 00:57:29 +02:00
heckflosse
642b4cc86c Fix some coverity issues 2017-06-16 21:21:22 +02:00
Alberto Griggio
3c7e797418 allow custom-ratio cropping (by holding shift) also when resizing from the thumbnail 2017-04-11 08:58:59 +02:00
heckflosse
92a46e9a3d Merge branch 'idle_harder' into dev 2017-04-09 02:18:09 +02:00
Alberto Griggio
6fe04e3990 fixed warnings in rtgui 2017-04-01 15:55:39 +02:00
Flössie
6e1f7df2fb Replace g_idle_add_full() with IdleRegister (#3767) 2017-03-30 21:40:09 +02:00
Alberto Griggio
4478c41eed candidate fix for #3087 2017-03-22 12:49:17 +01:00