Patch by Magnus Bergman to allow setting zoom level with keyboard shortcuts.

git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@971 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
Adrien Destugues
2009-08-03 17:38:59 +00:00
parent 7a8cea5af6
commit 951096eb86
7 changed files with 224 additions and 5 deletions

View File

@@ -362,3 +362,25 @@ void Zoom(short delta)
Display_cursor();
}
}
/**
Set zoom value. Negative value means no zoom.
*/
void Zoom_set(int index)
{
Hide_cursor();
if (index<0)
{
/* Zoom 1:1 */
if (Main_magnifier_mode)
Unselect_button(BUTTON_MAGNIFIER);
}
else
{
Change_magnifier_factor(index);
if (!Main_magnifier_mode)
Select_button(BUTTON_MAGNIFIER,1);
Display_all_screen();
}
Display_cursor();
}