Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FR] Improve visibility of handles in drawn mask. #16388

Open
difrkaguilar opened this issue Feb 26, 2024 · 31 comments
Open

[FR] Improve visibility of handles in drawn mask. #16388

difrkaguilar opened this issue Feb 26, 2024 · 31 comments
Labels
feature: enhancement current features to improve no-issue-activity priority: medium core features are degraded in a way that is still mostly usable, software stutters scope: UI user interface and interactions

Comments

@difrkaguilar
Copy link

difrkaguilar commented Feb 26, 2024

Is your feature request related to a problem? Please describe.

In many of my photo edits I make a lot of use of draw masks, even several masks on a single image. Something that happens to me is that I'm over 50 years old and my eyesight is exhausted, thanks to the use of prescription glasses I can continue with my work. In my case, having a 32" 4K monitor with 3840 x 2160 resolution, I often find it difficult to select the handlers in the draw masks in the image I am working on.

Describe the solution you'd like

These handles are not always active, only when the mouse passes or hovers over them, so I think it wouldn't be a bad thing if, when hovering over them to make modifications, they were a little larger than they currently are.

BTW I have created a layout specifically for the gradient mask with two additional handles, the start and finish compression, this is just an idea, because when using the scroll + Shift the compression changes the values in jumps, to be more precise go to the masks manager module menu and move the compression slider then holding down the Ctrl while using the mouse scroll. It is more intuitive if you enter these two handlers because visually and more quickly you can place the compression at the point where you want. It would also have the same level of interactivity as the other handlers.

I also put two additional handlers to modify the curvature without the need to use the mouse scroll or without having to go to the masks managers module. These two handlers would work only by placing the cursor over one of them and dragging until the desired curvature is achieved.

Alternatives

One solution would be to introduce a new option in the configuration window in darkroom/modules with the possibility to choose the size of the handler. (I particularly would not like this option as you developers yourselves are not in favor of cluttering the configuration window with options).

But I prefer another solution, a possibility would be to put in the global guide overlay settings popup the option to increase the size of the handles, as it is done now with the contrast option. This option would allow users to adjust the size of the handles to their liking.

Additional context

Draw masks without displaying the masks in yellow. The rotate mask handler is almost imperceptible.
Screenshot from 2024-02-26 15-41-54

Draw masks displaying the masks in yellow. The rotate mask handler is still almost imperceptible.
Screenshot from 2024-02-26 15-43-15

Draw masks displaying the handlers bigger than the actual size (this proposal shows the additional handlers for set the compression and curvature)
Screenshot from 2024-02-26 11-17-47

Popup menu with the option handlers size option
Screenshot from 2024-02-26 16-03-22

@ralfbrown
Copy link
Collaborator

You are talking about drawn masks - parametric masks do not have any on-image controls since they compute their effect strength based on the values of each individual pixel.

@ralfbrown ralfbrown changed the title [FR] Improve visibility of handles in parametric mask. [FR] Improve visibility of handles in drawn mask. Feb 27, 2024
@ralfbrown ralfbrown added the feature: enhancement current features to improve label Feb 27, 2024
@difrkaguilar
Copy link
Author

You are talking about drawn masks - parametric masks do not have any on-image controls since they compute their effect strength based on the values of each individual pixel.

Corrected the error. Thanks.

@TurboGit
Copy link
Member

Draw masks without displaying the masks in yellow. The rotate mask handler is almost imperceptible.

That's why you can change the color of the drawn masks (all overlays in fact). Use Ctrl+O to change the color. But you probably know that and is only a workaround for the visibility issue. Looking at your screenshot it seems that the handler are not properly scaled for HDPI display.

@TurboGit TurboGit added priority: medium core features are degraded in a way that is still mostly usable, software stutters scope: UI user interface and interactions labels Feb 27, 2024
@zisoft
Copy link
Collaborator

zisoft commented Feb 27, 2024

We had the same problem recently on macOS, where the OS always reports 72 DPI.
It was fixed with #15845

@TurboGit
Copy link
Member

It was fixed with #15845

So should be fixed since 4.6.0, seems like there is still an issue as reported here.

@difrkaguilar : Side question, is the size issue on all kind of masks?

@zisoft
Copy link
Collaborator

zisoft commented Feb 27, 2024

#15845 was a macOS specific bugfix.

@difrkaguilar what is your OS?

@difrkaguilar
Copy link
Author

is the size issue on all kind of masks?

Every draw mask have the same issue.

Screenshot from 2024-02-27 09-39-33

what is your OS?

OS: Fedora workstation release 37 (Thirty Seven) x86_64

@TurboGit
Copy link
Member

@difrkaguilar : That's a screenshot of a fit view of darkroom, right?

@difrkaguilar
Copy link
Author

difrkaguilar commented Feb 27, 2024

This is the screenshot of the screen and the fit view of darkroom. Screen resolution 3840 x 2160 (16:9) scale 100%

Screenshot from 2024-02-27 11-09-11

@TurboGit
Copy link
Member

And here is what I have on my HD screen 2560 x 1440 scale 100%:

image

Clearly more visible. What I also see on your screenshot is that the mouse cursor is very small. This is controlled outside of dt and clearly not what I have on my side.

@difrkaguilar
Copy link
Author

I changed the scaling factor to 1.30
Screenshot from 2024-02-27 11-48-45

But now the text is big too.
Screenshot from 2024-02-27 11-49-11

@TurboGit
Copy link
Member

TurboGit commented Feb 28, 2024

Do you have screen_dpi_overwrite defined in darktablerc?

$ grep screen_dpi_overwrite ~/.config/darktable/darktablerc

@difrkaguilar
Copy link
Author

screen_dpi_overwrite=-1.000000

@TurboGit
Copy link
Member

Ok, so all good on this side. As I don't have a 4k monitor it is hard to debug this on my side.

@gi-man
Copy link
Contributor

gi-man commented Feb 28, 2024

Are you using Wayland? I think that screen is to scale the font, but what happens if you scale the screen display?

@difrkaguilar
Copy link
Author

difrkaguilar commented Feb 28, 2024

Are you using Wayland?

X11 no Wayland.

OS: Fedora Linux release 37 (Thirty Seven) Workstation Edition x86_64
Host: Z390 AORUS MASTER
Kernel: 6.2.7-200.fc37.x86_64
Uptime: 1 min
Packages: 3122 (rpm), 32 (flatpak)
Shell: zsh 5.9
Resolution: 3840x2160
Windowwing System: X11
DE: GNOME 43.9
WM: Mutter
WM Theme: WhiteSur-Dark
Theme: WhiteSur-Dark [GTK2/3]
Icons: Mkos-Big-Sur [GTK2/3]
Terminal: alacritty
CPU: Intel i7-9700K (8) @ 4.900GHz
GPU: NVIDIA GeForce GTX 1070
GPU: NVIDIA GeForce GTX 1080 Ti
Memory: 2489MiB / 32012MiB

@gi-man
Copy link
Contributor

gi-man commented Feb 28, 2024

And what happens when you scale the display?

@difrkaguilar
Copy link
Author

And what happens when you scale the display?

The handlers increase their size a bit, but the whole system increase the windows and everything become a mess.

Screenshot from 2024-02-28 09-07-33

This is an screenshot of the desktop. I scaled the display to 200% but have to set the Scaling Factor to 0.8 for the fonts. Anyway this is not an option for me, I use Blender and other apps and need screen space.
Screenshot from 2024-02-28 09-09-13

This is an screenshot of Blender at 3840 x 2160
Screenshot from 2024-02-28 09-27-59

@gi-man
Copy link
Contributor

gi-man commented Feb 28, 2024

Gnome only lets you pick 200%. I'm in fedora KDE and I pick fractional (125%).

@difrkaguilar
Copy link
Author

Gnome only lets you pick 200%. I'm in fedora KDE and I pick fractional (125%).

That's good to know. But I use Gnome. I think I'm not the only darktable user with this problem. The vertex (vectors) or handles in some applications I think can be adjusted to different scales, not depending on the system, window manager or scale factor but by the applications if it's possible.

@TurboGit
Copy link
Member

What if you set screen_dpi_overwrite to 72 in darktablerc? (you need to do that without dt running).

@difrkaguilar
Copy link
Author

What if you set screen_dpi_overwrite to 72 in darktablerc?

I'll try this ASAP when return to home. Then I'll see and comment about it. Thanks.

@zisoft
Copy link
Collaborator

zisoft commented Feb 28, 2024

What if you set screen_dpi_overwrite to 72 in darktablerc?

The screen dpi is used to calculate the gui->dpi_factor by dividing the screen dpi by 96.
72 is the value macOS reports for the screen dpi, causing all GUI elements being shrinked by a factor of 0.75 (72/96) (fixed by #15845)

So setting screen_dpi_overwrite to a value > 96 should do the trick, but this will enlarge all elements of the GUI, including the fonts.

The macOS fix only changes the gui->dpi_factor which is used for control handles. gui->dpi is left as it is (72).

@difrkaguilar
Copy link
Author

Set screen_dpi_overwrite to 72 or 96 in darktablerc doesn't fix the issue. So I'll continue working with handlers as they are now.

@difrkaguilar
Copy link
Author

difrkaguilar commented Mar 1, 2024

Excuse my lack of knowledge about programming, a series of functions that for some seem simple, I know that it is far from being so. I don't know the amount of code that is behind the visualization to draw these masks, but it must be quite complex.

It must be recognized that darktable's gradient mask drawing system is even more powerful than the possibilities of gradients that graphic design programs have, for example Inkscape, where it is not possible to make a bend to the gradient, but darktable's gradient masks allow it.

Reading a post similar to this one about the possibility of improving the drawing of gradient masks #14728 I make a proposal from my point of view of how the drawing of gradient masks could work in a more effective way than the one used right now.

The handlers that I describe here can further enhance the use of these gradient masks, giving more control to the user when positioning these masks in a finer way.

The handlers at the start and end of the masks can allow to change the compression of the mask by dragging and dropping the mouse. Likewise, the handlers located in the central line could allow to bend the line until the desired position is achieved.

This mask could be used in reverse, also as discussed in #14728 put two position handles at both ends of the center line, these handles at the ends can make the position of the gradient mask more accurate to be able to move indistinctly.

This is just an idea. Anyway I make this feature request in case there is any developer interested in implementing it or making other modifications.

Screenshot of the gradient draw mask.

gradient

Screenshot of the gradient draw mask in reverse position.

gradient_01

@Mark-64
Copy link
Contributor

Mark-64 commented Mar 3, 2024

DT 4.6.1 on Windows 11, 4k display
Scaling of mask handles looks correct to me.

immagine

@difrkaguilar
Copy link
Author

darktable 4.7.0~git651.e458f34f-11391.1

Then the issue must be on my side, I don't know why.
This is an screenshot at 3840 x 2160

Screenshot from 2024-03-03 14-56-57

@zisoft
Copy link
Collaborator

zisoft commented Mar 3, 2024

@difrkaguilar Do you have the possibility to compile and debug dt yourself?

If so, can you set a breakpoint in src/gui/gtk.c at line 1434:

darktable/src/gui/gtk.c

Lines 1422 to 1443 in e458f34

void dt_configure_ppd_dpi(dt_gui_gtk_t *gui)
{
GtkWidget *widget = gui->ui->main_window;
gui->ppd = gui->ppd_thb = dt_get_system_gui_ppd(widget);
gui->filter_image = CAIRO_FILTER_GOOD;
if(dt_conf_get_bool("ui/performance"))
{
gui->ppd_thb *= DT_GUI_THUMBSIZE_REDUCE;
gui->filter_image = CAIRO_FILTER_FAST;
}
gui->dpi = dt_get_screen_resolution(widget);
#ifdef GDK_WINDOWING_QUARTZ
gui->dpi_factor
= gui->dpi / 72; // macOS has a fixed DPI of 72
#else
gui->dpi_factor
= gui->dpi / 96; // according to man xrandr and the docs of gdk_screen_set_resolution 96 is the default
#endif
}

and see what value gui->dpi gets.

@difrkaguilar
Copy link
Author

Do you have the possibility to compile and debug dt yourself?

I don't have to much skills but I'll try to do my best.

@difrkaguilar
Copy link
Author

Do you have the possibility to compile and debug dt yourself?

Ups... I tried but I don't have the skills to do those changes. So I'll have to continue working with draw masks as they are now. My fault. Thanks anyway to all for your attention and comments.

Copy link

github-actions bot commented May 6, 2024

This issue has been marked as stale due to inactivity for the last 60 days. It will be automatically closed in 300 days if no update occurs. Please check if the master branch has fixed it and report again or close the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature: enhancement current features to improve no-issue-activity priority: medium core features are degraded in a way that is still mostly usable, software stutters scope: UI user interface and interactions
Projects
None yet
Development

No branches or pull requests

6 participants