[eog] Increase zoom level when toggling the zoom button
- From: Felix Riemann <friemann src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [eog] Increase zoom level when toggling the zoom button
- Date: Mon, 25 May 2015 17:14:38 +0000 (UTC)
commit 5bf0e3581e0b79ae217722f35d17f6021cc09871
Author: Felix Riemann <friemann gnome org>
Date: Mon May 25 19:12:23 2015 +0200
Increase zoom level when toggling the zoom button
Use the steps the zoom logic used in earlier eog versions.
Also add a zoom level at 133% to not have the zoom jump
to 200% when starting at 100% zoom.
https://bugzilla.gnome.org/show_bug.cgi?id=746802
src/eog-scroll-view.c | 2 +-
src/eog-window.c | 1 +
2 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/eog-scroll-view.c b/src/eog-scroll-view.c
index 0aa2b0f..5d7290f 100644
--- a/src/eog-scroll-view.c
+++ b/src/eog-scroll-view.c
@@ -2416,7 +2416,7 @@ eog_scroll_view_set_transparency (EogScrollView *view,
static double preferred_zoom_levels[] = {
1.0 / 100, 1.0 / 50, 1.0 / 20,
1.0 / 10.0, 1.0 / 5.0, 1.0 / 3.0, 1.0 / 2.0, 1.0 / 1.5,
- 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0,
+ 1.0, 1 / 0.75, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0,
11.0, 12.0, 13.0, 14.0, 15.0, 16.0, 17.0, 18.0, 19.0, 20.0
};
static const gint n_zoom_levels = (sizeof (preferred_zoom_levels) / sizeof (double));
diff --git a/src/eog-window.c b/src/eog-window.c
index 30b7069..f19990e 100644
--- a/src/eog-window.c
+++ b/src/eog-window.c
@@ -4234,6 +4234,7 @@ eog_window_zoom_button_toggled_cb (GtkToggleButton *button, gpointer user_data)
GTK_ICON_SIZE_BUTTON);
gtk_widget_set_tooltip_text (GTK_WIDGET (button),
_("Fit the image to the window"));
+ eog_scroll_view_zoom_in (EOG_SCROLL_VIEW (priv->view), FALSE);
} else {
zoom_image = gtk_image_new_from_icon_name ("zoom-in-symbolic",
GTK_ICON_SIZE_BUTTON);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]