summaryrefslogtreecommitdiff
path: root/cut-n-paste/zoom-control
diff options
context:
space:
mode:
authorbl0ckeduser <[email protected]>2014-02-08 22:18:47 -0500
committerbl0ckeduser <[email protected]>2014-02-08 22:18:47 -0500
commit7f21f2854ad69786568558db9c5d87ba17aa921c (patch)
tree6a50c22a921509dc89b7591811a36714934ee0c8 /cut-n-paste/zoom-control
parent9ba2765d71e217254d2a3429b043430dbc9ff5d1 (diff)
downloadatril-7f21f2854ad69786568558db9c5d87ba17aa921c.tar.bz2
atril-7f21f2854ad69786568558db9c5d87ba17aa921c.tar.xz
Implement window expand functionality (#53)
Diffstat (limited to 'cut-n-paste/zoom-control')
-rw-r--r--cut-n-paste/zoom-control/ephy-zoom.c6
-rw-r--r--cut-n-paste/zoom-control/ephy-zoom.h4
2 files changed, 7 insertions, 3 deletions
diff --git a/cut-n-paste/zoom-control/ephy-zoom.c b/cut-n-paste/zoom-control/ephy-zoom.c
index 83bb8291..bc456ecc 100644
--- a/cut-n-paste/zoom-control/ephy-zoom.c
+++ b/cut-n-paste/zoom-control/ephy-zoom.c
@@ -35,11 +35,13 @@ ephy_zoom_get_zoom_level_index (float level)
return 0;
} else if (level == EPHY_ZOOM_FIT_WIDTH) {
return 1;
+ } else if (level == EPHY_ZOOM_EXPAND_WINDOW_TO_FIT) {
+ return 2;
}
- previous = zoom_levels[3].level;
+ previous = zoom_levels[4].level;
- for (i = 4; i < n_zoom_levels; i++)
+ for (i = 5; i < n_zoom_levels; i++)
{
current = zoom_levels[i].level;
mean = sqrt (previous * current);
diff --git a/cut-n-paste/zoom-control/ephy-zoom.h b/cut-n-paste/zoom-control/ephy-zoom.h
index 642e5ba9..1dcb4598 100644
--- a/cut-n-paste/zoom-control/ephy-zoom.h
+++ b/cut-n-paste/zoom-control/ephy-zoom.h
@@ -34,7 +34,8 @@ G_BEGIN_DECLS
#define EPHY_ZOOM_BEST_FIT (-3.0)
#define EPHY_ZOOM_FIT_WIDTH (-4.0)
-#define EPHY_ZOOM_SEPARATOR (-5.0)
+#define EPHY_ZOOM_EXPAND_WINDOW_TO_FIT (-5.0)
+#define EPHY_ZOOM_SEPARATOR (-6.0)
static const
struct
@@ -47,6 +48,7 @@ zoom_levels[] =
{
{ N_("Best Fit"), EPHY_ZOOM_BEST_FIT },
{ N_("Fit Page Width"), EPHY_ZOOM_FIT_WIDTH },
+ { N_("Expand Window To Fit"), EPHY_ZOOM_EXPAND_WINDOW_TO_FIT },
{ NULL, EPHY_ZOOM_SEPARATOR },
{ N_("50%"), 0.5 },
{ N_("70%"), 0.7071067811 },