Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/src/header_buttonswin.c')
-rw-r--r--source/blender/src/header_buttonswin.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/source/blender/src/header_buttonswin.c b/source/blender/src/header_buttonswin.c
index a525a088c73..0d9f05672f0 100644
--- a/source/blender/src/header_buttonswin.c
+++ b/source/blender/src/header_buttonswin.c
@@ -483,7 +483,15 @@ static uiBlock *buts_view_alignmenu(void *arg_unused)
static void do_buts_viewmenu(void *arg, int event)
{
+ SpaceButs *sbuts= curarea->spacedata.first;
+
switch(event) {
+ case 1: /* zoom in */
+ view2d_zoom(&sbuts->v2d, 0.06f, curarea->winx, curarea->winy);
+ break;
+ case 2: /* zoom out */
+ view2d_zoom(&sbuts->v2d, -0.075f, curarea->winx, curarea->winy);
+ break;
case 3: /* View All */
do_buts_buttons(B_BUTSHOME);
break;
@@ -547,6 +555,11 @@ static uiBlock *buts_viewmenu(void *arg_unused)
uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Zoom In|NumPad +", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 1, "");
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Zoom Out|NumPad -", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 2, "");
+
+ uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
+
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "View All|Home", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 3, "");
if (!curarea->full)