[eog/wip/baedert/gtkimageview] scroll-view: Reimplement get_zoom_mode
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [eog/wip/baedert/gtkimageview] scroll-view: Reimplement get_zoom_mode
- Date: Sat, 19 Mar 2016 21:20:57 +0000 (UTC)
commit 465ebcb5a472af7773a88d2071118a899cf646cd
Author: Timm Bäder <mail baedert org>
Date: Sat Mar 19 21:43:57 2016 +0100
scroll-view: Reimplement get_zoom_mode
src/eog-scroll-view.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/src/eog-scroll-view.c b/src/eog-scroll-view.c
index 36687bc..dc71edc 100644
--- a/src/eog-scroll-view.c
+++ b/src/eog-scroll-view.c
@@ -2107,9 +2107,12 @@ EogZoomMode
eog_scroll_view_get_zoom_mode (EogScrollView *view)
{
g_return_val_if_fail (EOG_IS_SCROLL_VIEW (view),
- EOG_ZOOM_MODE_SHRINK_TO_FIT);
+ EOG_ZOOM_MODE_SHRINK_TO_FIT);
- return view->priv->zoom_mode;
+ if (gtk_image_view_get_fit_allocation (GTK_IMAGE_VIEW (view->priv->display)))
+ return EOG_ZOOM_MODE_SHRINK_TO_FIT;
+ else
+ return EOG_ZOOM_MODE_FREE;
}
static gboolean
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]