Discussion:
"Enlarge to fit" button
todd rme
2010-03-07 00:38:02 UTC
Permalink
Currently in Gwenview there are two zoom options in the bottom right.
One is the "100%", which shows the image at its true size. The other
is "fit", which, by default, will shrink images that are too large but
will not enlarge images that are too small. There is a configuration
option to change this behavior, "enlarge smaller images, which makes
"fit" enlarge or shrink the image to make it fit the window. However,
at least personally there are some situations where I want to enlarge
smaller images and some that I don't. Having to go into the gwenview
settings to change this behavior does not seem to be the most
efficient approach. I think it would be better if there is three
buttons: "100%", "Fit", and "Enlarge". 100% keeps its current
behavior. Fit behaves as the current default Fit behavior, that is it
shrinks images but does not enlarge them. Enlarge will shrink or
enlarge images to make them fit. Alternatively, you could have
"100%", "Fit" and "Shrink", with "Shrink" behaving like the current
default for Fit and "Fit" now enlarging or shrinking. Obviously the
gwenview setting would be redundant and would be removed.

If you think this is a good idea I am willing to go ahead and program
it myself if that would help.

-Todd
Aurélien Gâteau
2010-03-13 09:33:02 UTC
Permalink
Post by todd rme
Currently in Gwenview there are two zoom options in the bottom right.
One is the "100%", which shows the image at its true size. The other
is "fit", which, by default, will shrink images that are too large but
will not enlarge images that are too small. There is a configuration
option to change this behavior, "enlarge smaller images, which makes
"fit" enlarge or shrink the image to make it fit the window. However,
at least personally there are some situations where I want to enlarge
smaller images and some that I don't. Having to go into the gwenview
settings to change this behavior does not seem to be the most
efficient approach. I think it would be better if there is three
buttons: "100%", "Fit", and "Enlarge". 100% keeps its current
behavior. Fit behaves as the current default Fit behavior, that is it
shrinks images but does not enlarge them.
Hi Todd (and sorry for the late answer)

I see your point, but I am a bit worried about adding more buttons which
will behave in subtle different ways. I am not sure what is the best
solution.

Maybe we could add a context menu to the "Fit" button so that you could
toggle its behavior from there. It's less discoverable, but avoid adding
too many buttons. It could also be an interesting way to turn "Zoom to
fit" into "Zoom to fill" (zooming so that the smallest dimension takes
the full available size, very useful for panoramic images)

What do you think of this?

Aurélien
todd rme
2010-03-15 21:06:28 UTC
Permalink
Post by Aurélien Gâteau
Hi Todd (and sorry for the late answer)
I see your point, but I am a bit worried about adding more buttons which
will behave in subtle different ways. I am not sure what is the best
solution.
Maybe we could add a context menu to the "Fit" button so that you could
toggle its behavior from there. It's less discoverable, but avoid adding
too many buttons. It could also be an interesting way to turn "Zoom to
fit" into "Zoom to fill" (zooming so that the smallest dimension takes
the full available size, very useful for panoramic images)
What do you think of this?
Aurélien
That's fine. As long as there is an easy way to do it without opening
the settings dialog it doesn't really matter to me. It would be good,
though, if there were some visual indication that this is possible.
Is there a way to bring up a menu if you click and hold on the button?

-Todd
Aurélien Gâteau
2010-03-20 10:44:41 UTC
Permalink
Post by todd rme
Post by Aurélien Gâteau
Hi Todd (and sorry for the late answer)
I see your point, but I am a bit worried about adding more buttons which
will behave in subtle different ways. I am not sure what is the best
solution.
Maybe we could add a context menu to the "Fit" button so that you could
toggle its behavior from there. It's less discoverable, but avoid adding
too many buttons. It could also be an interesting way to turn "Zoom to
fit" into "Zoom to fill" (zooming so that the smallest dimension takes
the full available size, very useful for panoramic images)
What do you think of this?
Aurélien
That's fine. As long as there is an easy way to do it without opening
the settings dialog it doesn't really matter to me. It would be good,
though, if there were some visual indication that this is possible.
Is there a way to bring up a menu if you click and hold on the button?
It is possible on a QToolButton, look at the ToolButtonPopupMode enum. I
am just not sure how it would behave on the custom buttons used for the
zoom buttons in Gwenview.

Aurélien
todd rme
2010-03-24 23:16:18 UTC
Permalink
Post by Aurélien Gâteau
That's fine.  As long as there is an easy way to do it without opening
the settings dialog it doesn't really matter to me.  It would be good,
though, if there were some visual indication that this is possible.
Is there a way to bring up a menu if you click and hold on the button?
It is possible on a QToolButton, look at the ToolButtonPopupMode enum. I
am just not sure how it would behave on the custom buttons used for the
zoom buttons in Gwenview.
Aurélien
I have this working, but I am having trouble submitting the patch to
reviewboard. I might be doing something wrong, but it seems to be no
different than any other patch I have submitted. Should I send the
patch to the mailing list to see if anyone can figure out what is
wrong or is there something special I have to do with gwenview and
reviewboard?

-Todd
Aurélien Gâteau
2010-03-25 08:00:25 UTC
Permalink
Post by todd rme
Post by Aurélien Gâteau
Post by todd rme
That's fine. As long as there is an easy way to do it without opening
the settings dialog it doesn't really matter to me. It would be good,
though, if there were some visual indication that this is possible.
Is there a way to bring up a menu if you click and hold on the button?
It is possible on a QToolButton, look at the ToolButtonPopupMode enum. I
am just not sure how it would behave on the custom buttons used for the
zoom buttons in Gwenview.
Aurélien
I have this working, but I am having trouble submitting the patch to
reviewboard. I might be doing something wrong, but it seems to be no
different than any other patch I have submitted. Should I send the
patch to the mailing list to see if anyone can figure out what is
wrong or is there something special I have to do with gwenview and
reviewboard?
Great! Please post it here for now. I think the problem you are having
with reviewboard is that I need to ask someone to set up a "gwenview"
group on it... will do so.

Aurélien
todd rme
2010-03-25 17:54:15 UTC
Permalink
Post by Aurélien Gâteau
Post by todd rme
I have this working, but I am having trouble submitting the patch to
reviewboard.  I might be doing something wrong, but it seems to be no
different than any other patch I have submitted.  Should I send the
patch to the mailing list to see if anyone can figure out what is
wrong or is there something special I have to do with gwenview and
reviewboard?
Great! Please post it here for now. I think the problem you are having
with reviewboard is that I need to ask someone to set up a "gwenview"
group on it... will do so.
Alright, it is attached. It is triggered by pressing and holding on
the "Fit" button. There should be a triangle or arrow next to the
word "Fit" to indicate this, but it isn't there for some reason
(probably how the button was overloaded) and I don't now how to get it
back, but that is a cosmetic issue that does not affect the actual
functionality.

As for the patch, the patch is accepted by reviewboard but when I try
to view it the site says that there was an error applying the patch.

-Todd
Aurélien Gâteau
2010-03-30 21:31:25 UTC
Permalink
Post by todd rme
Post by Aurélien Gâteau
Great! Please post it here for now. I think the problem you are having
with reviewboard is that I need to ask someone to set up a "gwenview"
group on it... will do so.
Alright, it is attached. It is triggered by pressing and holding on
the "Fit" button. There should be a triangle or arrow next to the
word "Fit" to indicate this, but it isn't there for some reason
(probably how the button was overloaded) and I don't now how to get it
back, but that is a cosmetic issue that does not affect the actual
functionality.
As for the patch, the patch is accepted by reviewboard but when I try
to view it the site says that there was an error applying the patch.
(Sorry for the late answer)
Thanks for sending this patch, but I think I have the same problem as
reviewboard: it does not apply against kde trunk. Which version of
Gwenview source code did you work with? Can you try to update your patch
to either trunk or latest stable release (2.4.x)?

Aurélien

Loading...