[nautilus/wip/antoniof/flow-box-preparation: 26/31] 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/31] view-icon-controller: Implement .can_zoom_{in, out}()
- Date: Sat, 11 Dec 2021 17:04:41 +0000 (UTC)
commit 138c9334d92832d18c37ae554c8687f97d7a079a
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 7fb779508..2f71fcc47 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]