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

Bad aspect ratio in error messages #186

Open
dtschump opened this issue Sep 11, 2023 · 1 comment
Open

Bad aspect ratio in error messages #186

dtschump opened this issue Sep 11, 2023 · 1 comment

Comments

@dtschump
Copy link
Collaborator

There are inconsistencies regarding how certain error messages are displayed in the preview widget.
For instance, if I add these two filters Error1 and Error2:

#@gui Error 1 : unknown_command, unknown_command

#@gui Error 2 : known_command, known_command
known_command :
  gui_error_preview "Une belle erreur !"

and I try to "apply" them on a square image, I get this preview error for Error1 (filter that calls an unknown command) :

image

and this one for Error2 (a filter that calls the gui_error_preview command from the stdlib):

image

The first screenshot clearly exhibits a problem with the aspect ratio that makes it harder to actually read the error message.

@dtschump
Copy link
Collaborator Author

Fixed (from the stdlib side), with GreycLab/gmic@e897652
Anyway, I'd recommend changing (at least) these two lines in Widgets/PreviewWidget.cpp:

fullCommandLine += QString(" _preview_width=%1").arg(width());
fullCommandLine += QString(" _preview_height=%1").arg(height());

by

fullCommandLine += QString(" _preview_area_width=%1").arg(width());
fullCommandLine += QString(" _preview_area_height=%1").arg(height());

Optionnally: for better coherence between the different calls to G'MIC done by the plug-in, it would be interesting to have also all the other variables defined with their correct values, s.a _preview_width, _preview_height, _preview_x0, _preview_y0, _preview_x1, _preview_y1, and so on. Not a big deal for the moment though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant