summaryrefslogtreecommitdiff
path: root/cut-n-paste
diff options
context:
space:
mode:
authorStefano Karapetsas <[email protected]>2014-02-09 12:06:43 +0100
committerStefano Karapetsas <[email protected]>2014-02-09 12:06:43 +0100
commit142ebf79903cd71789c31ddc0c56b398c8e50e4e (patch)
tree5361ae85388269673e82e0b729ec8f40d2f00908 /cut-n-paste
parentd282ff3e6a5d6fb3d3e73a7ccf8c2dfc600720ad (diff)
parent7f21f2854ad69786568558db9c5d87ba17aa921c (diff)
downloadatril-142ebf79903cd71789c31ddc0c56b398c8e50e4e.tar.bz2
atril-142ebf79903cd71789c31ddc0c56b398c8e50e4e.tar.xz
Merge pull request #64 from bl0ckeduser/expandwin
Implement window expand functionality (#53)
Diffstat (limited to 'cut-n-paste')
-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 },