After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 496140 - Crop Window opens too large
Crop Window opens too large
Status: RESOLVED FIXED
Product: gthumb
Classification: Other
Component: general
2.10.x
Other Linux
: Normal normal
: ---
Assigned To: Paolo Bacchilega
Paolo Bacchilega
Depends on:
Blocks:
 
 
Reported: 2007-11-12 12:22 UTC by Rüdiger Schulz
Modified: 2007-12-01 22:38 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Xinerama-aware crop dialog sizing (1.09 KB, patch)
2007-12-01 18:33 UTC, dynamotwain
none Details | Review

Description Rüdiger Schulz 2007-11-12 12:22:29 UTC
When I open the crop window, it opens up way too large, hiding some of the controls. It took me quite some time to realize this, because the "crop" button in the upper left was visible, all other buttons at the right weren't.

This has probably something to do with me having a dual screen setup (Nvidia Twinview). But as no other application seems to have this bug, I think there can be done something in Gthumb.

My main monitor is at 1280x1024, my secondary is at 1024x768 to the left to it. The crop window appears on the main monitor; vertically centered, and horizontally on the left edge. It is 1612x614 pixels large when opening an image with 500x258px. To show the complete picture without zooming it would be enough if it were half that wide.

I am running Ubuntu 7.10, and had the same problem with 7.04
Comment 1 Michael Chudobiak 2007-11-12 12:42:32 UTC
Hmm,

The crop window size is set in src/dlg-crop.c, here:

gtk_window_set_default_size (GTK_WINDOW (data->dialog),
                             gdk_screen_get_width (screen) * 7 / 10,
                             gdk_screen_get_height (screen) * 6 / 10);

It is supposed to use 70% of the screen width and 60% of the height, as a reasonable starting size.

I don't have a dual-screen setup, so I can't test this. Feel free to submit a patch, however, if you see a better way of doing it.

Also, the crop dialog has been changed a bit in trunk, so that the location of the "Crop" button is more obvious.

- Mike

Comment 2 dynamotwain 2007-12-01 18:33:00 UTC
Created attachment 99986 [details] [review]
Xinerama-aware crop dialog sizing

This bug not very noticeable depending on which window manager you use. Both Metacity 2.18.5 and Openbox 3.4.4 limit initial window dimensions to keep the entire window on screen. Thus, when two monitors are in a left-right setup, the crop window is 60% of the vertical viewing area, and 100% of the width of *a single monitor*.

Compiz doesn't do this sort of correction by default, making this bug extremely apparent for its users, while other WM users might not even notice it.

The attached patch gets the current monitor's width and height instead of
the entire X11's screen's width and height.
Comment 3 Michael Chudobiak 2007-12-01 20:08:50 UTC
Thanks!

An expanded version of the patch has been committed to svn rev 2086. (The redeye removal dialog had the same problem.) The fix should appear in 2.10.8.

Do you want your name added to the contributors list? If so, what is it?

- Mike
Comment 4 dynamotwain 2007-12-01 22:38:52 UTC
Sure.

- Geoffrey Antos