[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/sketch-mode c8dcf93 09/15: Orginal toolbar (almost fini
From: |
ELPA Syncer |
Subject: |
[elpa] externals/sketch-mode c8dcf93 09/15: Orginal toolbar (almost finished) |
Date: |
Wed, 20 Oct 2021 05:57:36 -0400 (EDT) |
branch: externals/sketch-mode
commit c8dcf93e26f0ebb0c830d2f05adc1e5d7c5c4e4d
Author: Daniel Nicolai <dalanicolai@gmail.com>
Commit: Daniel Nicolai <dalanicolai@gmail.com>
Orginal toolbar (almost finished)
---
sketch-clean.el | 123 ++++++++++++++++++++++++++------------------------------
1 file changed, 58 insertions(+), 65 deletions(-)
diff --git a/sketch-clean.el b/sketch-clean.el
index 1a062ff..a4b8e55 100644
--- a/sketch-clean.el
+++ b/sketch-clean.el
@@ -1084,7 +1084,7 @@ as backgrounds."
(defun sketch-toolbar-colors ()
;; STROKE COLOR
- (insert (propertize "STROKE COLOR: "))
+ (insert (propertize "STROKE COLOR\n"))
(insert-text-button " "
'action
(lambda (button) (interactive)
@@ -1118,17 +1118,15 @@ as backgrounds."
'face (list
:background (alist-get color
shr-color-html-colors-alist nil nil 'string=)))
(setq counter (1+ counter))
- (if (not (= counter 8))
+ (if (not (= counter 4))
(insert " ")
(insert "\n\n")
- ;; (when (= counter 8)
- ;; (insert "\n")
(setq counter 0))))
(insert "\n")
;; FILL COLOR
- (insert (propertize "FILL COLOR: "))
+ (insert (propertize "FILL COLOR\n"))
(apply #'insert-text-button " "
'action
(lambda (button) (interactive)
@@ -1163,7 +1161,7 @@ as backgrounds."
'face (list
:background (alist-get color
shr-color-html-colors-alist nil nil 'string=)))
(setq counter (1+ counter))
- (if (not (= counter 8))
+ (if (not (= counter 4))
(insert " ")
(insert "\n\n")
(setq counter 0)))))
@@ -1172,7 +1170,7 @@ as backgrounds."
(insert "STROKE WIDTH: ")
(insert (number-to-string sketch-stroke-width))
(insert "\n")
- (let* ((widths )
+ (let* ((widths 9)
(button-width (+ (* 4 (default-font-width)) 3))
(button-height (default-font-height))
(stroke-height (/ button-height 2)))
@@ -1193,7 +1191,7 @@ as backgrounds."
:stroke "black"
:stroke-width (1+ w))
svg)))
(setq counter (1+ counter))
- (if (not (= counter 6))
+ (if (not (= counter 3))
(insert " ")
(insert "\n\n")
(setq counter 0))))))
@@ -1202,66 +1200,61 @@ as backgrounds."
(insert "MOUSE ACTION\n")
(insert "draw\n")
(let ((objects '(line polyline circle ellipse rectangle polygon)))
- (let ((counter 0))
- (while objects
- (let ((o (car objects)))
- (apply #'insert-text-button
- (symbol-name o)
- 'action (lambda (button) (interactive)
- (setq sketch-action (intern (button-label button)))
- (sketch-toolbar-refresh))
- (when (eq o sketch-action)
- (list 'face 'custom-button-unraised)))
- (setq counter (1+ counter))
- (cond ((/= counter 4)
- (dotimes (_ (- 10 (length (symbol-name o))))
- (insert " ")))
- ;; (let ((o (cadr objects)))
- ;; (apply #'insert-text-button
- ;; (symbol-name o)
- ;; 'action (lambda (button) (interactive)
- ;; (setq sketch-action (intern
(button-label button)))
- ;; (sketch-toolbar-refresh))
- ;; (when (eq o sketch-action)
- ;; (list 'face 'custom-button-unraised))))
- ;; ;; (list 'face (if (eq o sketch-action)
- ;; ;; 'widget-button-pressed
- ;; ;; 'widget-button)))
- (t
- (insert "\n")
- (setq counter 0)))
- (setq objects (cdr objects))))))
- (apply #'insert-text-button
- "freehand"
- 'action (lambda (button) (interactive)
- (setq sketch-action (intern (button-label button)))
- (sketch-toolbar-refresh))
- (when (eq 'freehand sketch-action)
- (list 'face 'custom-button-unraised)))
- (insert " ")
- (apply #'insert-text-button
- "text"
- 'action (lambda (button) (interactive)
- (setq sketch-action (intern (button-label button)))
- (sketch-toolbar-refresh))
- (when (eq 'text sketch-action)
- (list 'face 'custom-button-unraised)))
- (insert "\n\n")
- (insert "edit\n")
- (dolist (e '(select move translate))
+ (while objects
+ (let ((o (car objects)))
+ (apply #'insert-text-button
+ (symbol-name o)
+ 'action (lambda (button) (interactive)
+ (setq sketch-action (intern (button-label button)))
+ (sketch-toolbar-refresh))
+ (when (eq o sketch-action)
+ (list 'face 'custom-button-unraised)))
+ (dotimes (_ (- 10 (length (symbol-name o))))
+ (insert " ")))
+ (let ((o (cadr objects)))
+ (apply #'insert-text-button
+ (symbol-name o)
+ 'action (lambda (button) (interactive)
+ (setq sketch-action (intern (button-label button)))
+ (sketch-toolbar-refresh))
+ (when (eq o sketch-action)
+ (list 'face 'custom-button-unraised))))
+ ;; (list 'face (if (eq o sketch-action)
+ ;; 'widget-button-pressed
+ ;; 'widget-button)))
+ (insert "\n")
+ (setq objects (cddr objects)))
+ (apply #'insert-text-button
+ "freehand"
+ 'action (lambda (button) (interactive)
+ (setq sketch-action (intern (button-label button)))
+ (sketch-toolbar-refresh))
+ (when (eq 'freehand sketch-action)
+ (list 'face 'custom-button-unraised)))
+ (insert " ")
(apply #'insert-text-button
- (symbol-name e)
+ "text"
'action (lambda (button) (interactive)
(setq sketch-action (intern (button-label button)))
(sketch-toolbar-refresh))
- (when (eq e sketch-action)
+ (when (eq 'text sketch-action)
(list 'face 'custom-button-unraised)))
- (insert " ")
- ))
+ (insert "\n\n")
+ (insert "edit\n")
+ (dolist (e '(select move translate))
+ (apply #'insert-text-button
+ (symbol-name e)
+ 'action (lambda (button) (interactive)
+ (setq sketch-action (intern (button-label button)))
+ (sketch-toolbar-refresh))
+ (when (eq e sketch-action)
+ (list 'face 'custom-button-unraised)))
+ (insert " ")
+ )))
(defun sketch-toolbar-toggles ()
(insert "TOGGLES\n")
- (insert "Grid: ")
+ (insert "Grid: ")
(apply #'insert-text-button (if sketch-show-grid "show" "hide")
'action
(lambda (button) (interactive)
@@ -1272,8 +1265,8 @@ as backgrounds."
;; (list 'face (if sketch-grid
;; 'widget-button-pressed
;; 'widget-button)))
- (insert " ")
- (insert "Snap: ")
+ (insert "\n")
+ (insert "Snap: ")
(apply #'insert-text-button (if sketch-snap-to-grid "on" "off")
'action
(lambda (button) (interactive)
@@ -1281,7 +1274,7 @@ as backgrounds."
(sketch-toolbar-refresh))
(when sketch-snap-to-grid
(list 'face 'custom-button-unraised)))
- (insert " ")
+ (insert "\n")
(insert "Labels: ")
(apply #'insert-text-button (or sketch-show-labels "hide")
'action
@@ -1420,8 +1413,8 @@ color."
'action
(lambda (_) (interactive)
(sketch-set-font))))
- (insert" ")
- (insert "Size: ")
+ (insert"\n")
+ (insert "Size: ")
(insert-text-button (number-to-string sketch-font-size)
'action
(lambda (_) (interactive)
- [elpa] externals/sketch-mode updated (457ba48 -> 443e095), ELPA Syncer, 2021/10/20
- [elpa] externals/sketch-mode bcb639e 02/15: Transfrom transient object argument to local variable, ELPA Syncer, 2021/10/20
- [elpa] externals/sketch-mode d604e04 03/15: Implement real side-toolbar (instead of buttons in draw buffer), ELPA Syncer, 2021/10/20
- [elpa] externals/sketch-mode 443e095 15/15: Merge branch 'develop', publish package :tada:, ELPA Syncer, 2021/10/20
- [elpa] externals/sketch-mode 3214edb 13/15: Add hydra, ELPA Syncer, 2021/10/20
- [elpa] externals/sketch-mode d23fdd7 04/15: Minor cleanup and corrections, ELPA Syncer, 2021/10/20
- [elpa] externals/sketch-mode ad9c926 01/15: Add toolbars (transform transient arguments to local-variables), ELPA Syncer, 2021/10/20
- [elpa] externals/sketch-mode c8dcf93 09/15: Orginal toolbar (almost finished),
ELPA Syncer <=
- [elpa] externals/sketch-mode 5abc729 11/15: Fix coordinates (hinders interactivity), and make them togglable, ELPA Syncer, 2021/10/20
- [elpa] externals/sketch-mode 02b1c05 14/15: Ready for publish :tada: (small fixes + sketch Quit), ELPA Syncer, 2021/10/20
- [elpa] externals/sketch-mode f728eef 10/15: First 'reasonably complete' version of cleanedup sketch-mode, ELPA Syncer, 2021/10/20
- [elpa] externals/sketch-mode 726e923 08/15: Continue cleanup and create vertically compressed toolbar, ELPA Syncer, 2021/10/20
- [elpa] externals/sketch-mode f3d6f45 07/15: Further cleanup and finish toolbar, ELPA Syncer, 2021/10/20
- [elpa] externals/sketch-mode 47d8432 06/15: Add org-ctrl-c-ctrl-c-hook-function to toggle image in org file, ELPA Syncer, 2021/10/20
- [elpa] externals/sketch-mode ae8db54 05/15: Improve canvas (use viewport and defs), ELPA Syncer, 2021/10/20
- [elpa] externals/sketch-mode beb8bec 12/15: Add documentation (for non-transient version), ELPA Syncer, 2021/10/20