Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

incr/decr font-sizes in multiple widgets for zoom in/out

somehow auto-refresh of doc-ta didn't work anymore () - added vars-lb-refresh-atom dependency for doc-ta bind
  • Loading branch information...
commit 16a653e6fe1c26595591d4038e878bb9279c1203 1 parent 529095f
@franks42 authored
View
19 src/clj_ns_browser/browser.clj
@@ -323,14 +323,25 @@
(add-app-action :zoom-in-action
(action :name "Zoom in"
:key "menu U"
- :handler (fn [e] (let [id (partial select-id (to-root e))](invoke-later (font-size+ (id :doc-ta)))))))
+ :handler (fn [e] (let [id (partial select-id (to-root e))]
+ (invoke-later (font-size+ (id :doc-ta))
+ (font-size+ (id :doc-tf))
+ (font-size+ (id :ns-lb))
+ (font-size+ (id :vars-lb)))))))
+
(add-app-action :zoom-out-action
(action :name "Zoom out"
:key "menu D"
- :handler (fn [e] (let [id (partial select-id (to-root e))](invoke-later (font-size- (id :doc-ta)))))))
+ :handler (fn [e] (let [id (partial select-id (to-root e))]
+ (invoke-later (font-size- (id :doc-ta))
+ (font-size- (id :doc-tf))
+ (font-size- (id :ns-lb))
+ (font-size- (id :vars-lb)))))))
+
(add-app-action :bring-all-windows-to-front-action
(action :name "Bring All to Front"
:handler (fn [e] (refresh-clj-ns-browser))))
+
(add-app-action :cycle-through-windows-action
(action :name "Cycle Through Windows"
:key "menu M"
@@ -346,10 +357,12 @@
(set-clip! fqn))
(if-let [fqn (config (id :doc-tf) :text)]
(set-clip! fqn)))))))
+
(add-app-action :fqn-from-clipboard-action
(action :name "Paste - FQN from clipboard"
:key "menu V"
:handler (fn [e] (if-let [fqn (get-clip)] (invoke-soon (browser-with-fqn *ns* fqn (to-root e)))))))
+
(add-app-action :fqn-from-selection-action
(action :name "FQN from selection"
:key "menu F"
@@ -739,7 +752,7 @@
;; new render-doc-text in doc-ta
(b/bind
; As the text of the fqn text field changes ...
- (apply b/funnel [(id :doc-tf) (id :doc-cbx)])
+ (apply b/funnel [(id :doc-tf) (id :doc-cbx) vars-lb-refresh-atom])
(b/filter (fn [[doc-tf doc-cbx]]
(not (or (nil? doc-tf) (= "" doc-tf)
(nil? doc-cbx) (= "" doc-cbx)))))
View
3  src/clj_ns_browser/utils.clj
@@ -441,8 +441,7 @@
""
(str (str/trim-newline s) "\n"))
(str "Sorry no " (name info-type) " available from clojuredoc for: "
- fqn))
- (str "Sorry, not a fully qualified clojure name: " fqn)))))
+ fqn))))))
(def ^:dynamic *max-value-display-size* 2500)
View
78 tmp/testing.clj
@@ -0,0 +1,78 @@
+(type reduce)
+(type #'reduce)
+(type @#'reduce)
+(fn? #'reduce)
+(fn? @#'reduce)
+(ifn? #'reduce)
+(ifn? @#'reduce)
+(defn? #'reduce)
+(defn? @#'reduce)
+(meta #'reduce)
+(meta @#'reduce)
+
+;(type ns)
+(type #'ns)
+(type @#'ns)
+(fn? #'ns)
+(fn? @#'ns)
+(ifn? #'ns)
+(ifn? @#'ns)
+(defn? #'ns)
+(defn? @#'ns)
+(macro? #'ns)
+(macro? @#'ns)
+(meta #'ns)
+(meta @#'ns)
+
+(defn xyz [a])
+(type xyz)
+(type #'xyz)
+(type @#'xyz)
+(fn? #'xyz)
+(fn? @#'xyz)
+(ifn? #'xyz)
+(ifn? @#'xyz)
+(defn? #'xyz)
+(defn? @#'xyz)
+(meta #'xyz)
+(meta @#'xyz)
+
+(def abc (fn [a]))
+(type abc)
+(type #'abc)
+(type @#'abc)
+(fn? #'abc)
+(fn? @#'abc)
+(ifn? #'abc)
+(ifn? @#'abc)
+(defn? #'abc)
+(defn? @#'abc)
+(meta #'abc)
+(meta @#'abc)
+
+(def qwe {:ja "ja"})
+(type qwe)
+(type #'qwe)
+(type @#'qwe)
+(fn? #'qwe)
+(fn? @#'qwe)
+(ifn? #'qwe)
+(ifn? @#'qwe)
+(defn? #'qwe)
+(defn? @#'qwe)
+(meta #'qwe)
+(meta @#'qwe)
+
+(def asd #'xyz)
+(type asd)
+(type #'asd)
+(type @#'asd)
+(fn? #'asd)
+(fn? @#'asd)
+(ifn? #'asd)
+(ifn? @#'asd)
+(defn? #'asd)
+(defn? @#'asd)
+(meta #'asd)
+(meta @#'asd)
+
Please sign in to comment.
Something went wrong with that request. Please try again.