mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-10-06 00:30:10 -06:00
RichEdit: zooming
git-svn-id: svn://ultimatepp.org/upp/trunk@11921 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
3ca0017d93
commit
408157313b
7 changed files with 45 additions and 13 deletions
|
|
@ -18,9 +18,13 @@ void RichEdit::CancelMode()
|
|||
|
||||
void RichEdit::MouseWheel(Point p, int zdelta, dword keyflags)
|
||||
{
|
||||
if(keyflags == K_CTRL && !IsNull(floating_zoom)) {
|
||||
floating_zoom = minmax(floating_zoom + zdelta / 480.0, 0.5, 10.0);
|
||||
RefreshLayoutDeep();
|
||||
if(keyflags == K_CTRL) {
|
||||
if(IsNull(floating_zoom))
|
||||
ZoomView(sgn(zdelta));
|
||||
else {
|
||||
floating_zoom = minmax(floating_zoom + zdelta / 480.0, 0.5, 10.0);
|
||||
RefreshLayoutDeep();
|
||||
}
|
||||
}
|
||||
else
|
||||
sb.Wheel(zdelta);
|
||||
|
|
|
|||
Loading…
Reference in a new issue