[nautilus/wip/antoniof/flow-box-preparation: 40/48] 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: 40/48] view-icon-controller: Implement .can_zoom_{in, out}()
- Date: Fri, 10 Dec 2021 14:02:32 +0000 (UTC)
commit 3b77e79170d4afea805b7d08cc111197d9f426bf
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 fd7b59a1d..e9438c5eb 100644
--- a/src/nautilus-view-icon-controller.c
+++ b/src/nautilus-view-icon-controller.c
@@ -611,13 +611,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]