[nautilus/wip/antoniof/flow-box-preparation: 26/29] view-icon-controller: Implement .can_zoom_{in, out}()
- From: António Fernandes <antoniof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/wip/antoniof/flow-box-preparation: 26/29] view-icon-controller: Implement .can_zoom_{in, out}()
- Date: Fri, 10 Dec 2021 14:05:47 +0000 (UTC)
commit f271bd3895c9f616615f2c53655589ad715d60ed
Author: António Fernandes <antoniof gnome org>
Date: Tue Dec 7 18:22:28 2021 +0000
view-icon-controller: Implement .can_zoom_{in,out}()
Match the canvas view logic.
src/nautilus-view-icon-controller.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/src/nautilus-view-icon-controller.c b/src/nautilus-view-icon-controller.c
index 38b4e746a..93918b0a5 100644
--- a/src/nautilus-view-icon-controller.c
+++ b/src/nautilus-view-icon-controller.c
@@ -605,13 +605,17 @@ real_is_zoom_level_default (NautilusFilesView *files_view)
static gboolean
real_can_zoom_in (NautilusFilesView *files_view)
{
- return TRUE;
+ NautilusViewIconController *self = NAUTILUS_VIEW_ICON_CONTROLLER (files_view);
+
+ return self->zoom_level < NAUTILUS_CANVAS_ZOOM_LEVEL_LARGEST;
}
static gboolean
real_can_zoom_out (NautilusFilesView *files_view)
{
- return TRUE;
+ NautilusViewIconController *self = NAUTILUS_VIEW_ICON_CONTROLLER (files_view);
+
+ return self->zoom_level > NAUTILUS_CANVAS_ZOOM_LEVEL_SMALL;
}
static GdkRectangle *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]