denemo-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Denemo-devel] [bug #30189] Zoom +10 or Zoom -10 as keybindings


From: anonymous
Subject: [Denemo-devel] [bug #30189] Zoom +10 or Zoom -10 as keybindings
Date: Tue, 13 Jul 2010 23:40:30 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.6) Gecko/20100625 Firefox/3.6.6 ( .NET CLR 3.5.30729)

Follow-up Comment #2, bug #30189 (project denemo):

I've made a couple of commands and an init script with a scheme global
variable that holds the current zoom level.  Zoom in zooms in by a factor of
1.1; zoom out by 10/11, i.e. ~91%, so that zooming in then out cancel out.  I
rewrote the basic Set Display Scale script as well.
These all seem to work together nicely.

Init Script for Zoom Menu:

(define ZoomFactor 1)
(d-Zoom ZoomFactor)
(d-RefreshDisplay)

Zoom Out:

(set! ZoomFactor (* ZoomFactor (/ 10 11)))
(d-Zoom ZoomFactor)
(d-RefreshDisplay)


Zoom In:
(set! ZoomFactor (* ZoomFactor 1.1))
(d-Zoom ZoomFactor)
(d-RefreshDisplay)

SetDisplayScale:

(let ((scale "100"))
        (set! scale (d-GetUserInput "Scale Display" "Give % scaling required"
(number->string (* 100 ZoomFactor))))
        (if (string? scale)
                (begin
                        (set! scale (/ (string->number scale) 100.0))
                        (format #t "Scaling by ~A~%" scale)
                        (if (d-Zoom scale) (set! ZoomFactor scale))
                        (d-RefreshDisplay);;;FIXME refresh display without 
marking score as
changed?
                        )))

-Dan W.

(file #20964, file #20965, file #20966, file #20967)
    _______________________________________________________

Additional Item Attachment:

File name: init.scm                       Size:0 KB
File name: ZoomDialog                     Size:0 KB
File name: ZoomIn                         Size:0 KB
File name: ZoomOut                        Size:0 KB


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?30189>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]