1
0
Fork 0

- [GUI] added 'up' button.

This commit is contained in:
cage 2023-02-18 13:02:56 +01:00
parent f9240da5fb
commit 9802b18dc9
4 changed files with 25 additions and 18 deletions

BIN
data/icons/fmw_uparrow.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 732 B

View File

@ -12,6 +12,8 @@
(a:define-constant +refresh+ "fmw_refresh" :test #'string=)
(a:define-constant +up+ "fmw_uparrow" :test #'string=)
(defparameter *search* nil)
(defparameter *back* nil)
@ -22,6 +24,8 @@
(defparameter *refresh* nil)
(defparameter *up* nil)
(defun load-icon (filename)
(let ((path (if (not (re:scan "(?i)png$" filename))
(res:get-data-file (fs:cat-parent-dir +icon-dir+
@ -36,4 +40,5 @@
(setf *back* (load-icon +back+))
(setf *open-iri* (load-icon +go+))
(setf *open-tour* (load-icon +open-tour+))
(setf *refresh* (load-icon +refresh+)))
(setf *refresh* (load-icon +refresh+))
(setf *up* (load-icon +up+)))

View File

@ -154,6 +154,10 @@
:initform nil
:initarg :reload-button
:accessor reload-button)
(up-button
:initform nil
:initarg :up-button
:accessor up-button)
(go-button
:initform nil
:initarg :go-button
@ -176,28 +180,25 @@
(with-accessors ((iri-entry iri-entry)
(back-button back-button)
(reload-button reload-button)
(up-button up-button)
(go-button go-button)) object
(gui:configure object :relief :raised)
(setf iri-entry
(make-instance 'gui-mw:autocomplete-entry
:master object
:autocomplete-function (autocomplete-iri-clsr object)))
(setf back-button (make-instance 'gui:button
:master object
:image icons:*back*))
(setf reload-button (make-instance 'gui:button
:master object
:image icons:*refresh*))
(setf go-button (make-instance 'gui:button
:master object
:image icons:*open-iri*))
(setf iri-entry (make-instance 'gui-mw:autocomplete-entry
:master object
:autocomplete-function (autocomplete-iri-clsr object)))
(setf back-button (make-instance 'gui:button :master object :image icons:*back*))
(setf reload-button (make-instance 'gui:button :master object :image icons:*refresh*))
(setf go-button (make-instance 'gui:button :master object :image icons:*open-iri*))
(setf up-button (make-instance 'gui:button :master object :image icons:*up*))
(gui-goodies:attach-tooltips (back-button (_ "go back"))
(reload-button (_ "reload address"))
(go-button (_ "go to address"))
(reload-button (_ "reload address")))
(gui:grid back-button 0 1 :sticky :nsw :padx +minimum-padding+)
(up-button (_ "one level up")))
(gui:grid back-button 0 1 :sticky :nsw)
(gui:grid iri-entry 0 2 :sticky :we :padx +minimum-padding+)
(gui:grid go-button 0 3 :sticky :e :padx +minimum-padding+)
(gui:grid go-button 0 3 :sticky :e)
(gui:grid reload-button 0 4 :sticky :e)
(gui:grid up-button 0 5 :sticky :e)
(gui:grid-columnconfigure object 2 :weight 2)
object))

View File

@ -3279,7 +3279,8 @@
:*back*
:*open-iri*
:*open-tour*
:*refresh*))
:*refresh*
:*up*))
(defpackage :validation
(:use