From 3f7a9ef03bd33a3a54db43cbd4940345a94b8371 Mon Sep 17 00:00:00 2001
From: David Botton
Date: Wed, 1 Dec 2021 20:18:34 -0500
Subject: [PATCH] Change to clog-gui to allow positioning absolute to work
properly in the content area.
---
FUTURE.md | 2 ++
demos/03-demo.lisp | 2 +-
source/clog-gui.lisp | 19 ++++++++++---------
tools/clog-db-admin.lisp | 2 +-
tutorial/22-tutorial.lisp | 7 +++----
5 files changed, 17 insertions(+), 15 deletions(-)
diff --git a/FUTURE.md b/FUTURE.md
index 42c300d..f6b4263 100644
--- a/FUTURE.md
+++ b/FUTURE.md
@@ -1,5 +1,7 @@
Post 1.0
+GUI Builder
+
- clog-data
- binding html controls directly to fields for database use
diff --git a/demos/03-demo.lisp b/demos/03-demo.lisp
index 3acfe7c..3ce00f4 100644
--- a/demos/03-demo.lisp
+++ b/demos/03-demo.lisp
@@ -166,7 +166,7 @@
(c) 2021 - David Botton
"
:hidden t
:width 200
- :height 200)))
+ :height 215)))
(window-center about)
(setf (visiblep about) t)
(set-on-window-can-size about (lambda (obj)
diff --git a/source/clog-gui.lisp b/source/clog-gui.lisp
index 5f0b624..dada214 100644
--- a/source/clog-gui.lisp
+++ b/source/clog-gui.lisp
@@ -710,18 +710,18 @@ the window will be set to keep-on-top always."))
(let ((win (create-child (body app)
(format nil
"
+ style='position:absolute;top:0;right:0;left:0;height:25px'>
~A~A
+ style='position:absolute;top:0;right:20px;left:5px;
+ user-select:none;cursor:move;'>~A~A
×
+ style='position:absolute;top:0;right:5px;cursor:pointer;user-select:none;'>×
-
~A
-
~A
+
+
"
@@ -730,7 +730,8 @@ the window will be set to keep-on-top always."))
title ; title
(if has-pinner ; pinner
(format nil "
+ style='position:absolute;top:0;right:20px;
+ cursor:pointer;user-select:none;'>
☐ " html-id)
"")
html-id ; closer
@@ -1617,7 +1618,7 @@ if confirmed or nil if canceled."
(defun server-file-dialog (obj title initial-dir on-file-name
&key (modal t)
- (left nil) (top nil) (width 375) (height 420)
+ (left nil) (top nil) (width 390) (height 425)
(maximize nil)
(initial-filename nil)
(client-movement nil)
diff --git a/tools/clog-db-admin.lisp b/tools/clog-db-admin.lisp
index efbe33c..1a618b7 100644
--- a/tools/clog-db-admin.lisp
+++ b/tools/clog-db-admin.lisp
@@ -157,7 +157,7 @@
CLOG DB Admin
(c) 2021 - David Botton "
:width 200
- :height 200
+ :height 215
:hidden t)))
(window-center about)
(setf (visiblep about) t)
diff --git a/tutorial/22-tutorial.lisp b/tutorial/22-tutorial.lisp
index 863aceb..34d8ce4 100644
--- a/tutorial/22-tutorial.lisp
+++ b/tutorial/22-tutorial.lisp
@@ -15,7 +15,7 @@
(defun on-file-browse (obj)
(let ((win (create-gui-window obj :title "Browse")))
(create-child (window-content win)
- "")))
+ "")))
(defun on-file-drawing (obj)
(let* ((win (create-gui-window obj :title "Drawing"))
@@ -37,8 +37,7 @@
(let* ((win (create-gui-window obj :title "Movie"))
(movie (create-video (window-content win)
:source "https://www.w3schools.com/html/mov_bbb.mp4")))
- (setf (box-width movie) "100%")
- (setf (box-height movie) "100%")))
+ (set-geometry movie :units "%" :width 100 :height 100)))
(defun on-file-pinned (obj)
(let ((win (create-gui-window obj :title "Pin me!"
@@ -113,7 +112,7 @@
(c) 2021 - David Botton"
:hidden t
:width 200
- :height 200)))
+ :height 215)))
(window-center about)
(setf (visiblep about) t)
(set-on-window-can-size about (lambda (obj)