diff --git a/source/buffer.lisp b/source/buffer.lisp index ece9ca5a0a3..0875cd608f5 100644 --- a/source/buffer.lisp +++ b/source/buffer.lisp @@ -862,6 +862,9 @@ Also see `panel-page'.")) (height 24 :type integer + :writer nil + :reader height + :export t :documentation "The height of the status buffer in pixels.") (glyph-mode-presentation-p nil @@ -875,7 +878,7 @@ Also see `panel-page'.")) (glyph-lambda (gethash "lambda.svg" *static-data*)) (style (theme:themed-css (theme *browser*) `(body - :line-height "24px" + :line-height "100vh" :font-size "14px" :padding 0 :margin 0) @@ -906,20 +909,20 @@ Also see `panel-page'.")) `("#controls" :background-color ,theme:secondary :color ,theme:on-secondary - :padding-left "8px" :overflow "hidden" :white-space "nowrap" :z-index "3" - :height "24px" - :flex-basis "80px") + :flex-basis "80px" + :display "flex") `("#controls > button" - :width "22px" - :margin-left "-8px") - `("#reload" - :width "24px !important") + :margin-right "-3px" + :max-width "20px" + :height "100%" + :aspect-ratio "1/1") `("#url" :background-color ,theme:primary :color ,theme:on-primary + :font-size "60vh" :min-width "100px" :text-overflow "ellipsis" :overflow-x "hidden" @@ -936,7 +939,8 @@ Also see `panel-page'.")) `("#tabs" :background-color ,theme:secondary :color ,theme:on-secondary - :line-height "22px" + :line-height "95vh" + :font-size "60vh" :min-width "100px" :white-space "nowrap" :overflow-x "scroll" @@ -967,6 +971,7 @@ Also see `panel-page'.")) `("#modes" :background-color ,theme:primary :color ,theme:on-primary + :font-size "60vh" :text-align "right" :padding-left "10px" :padding-right "5px" @@ -999,6 +1004,10 @@ Also see `panel-page'.")) (:export-predicate-name-p t) (:metaclass user-class)) +(defmethod (setf height) (value (status-buffer status-buffer)) + (setf (ffi-height status-buffer) value) + (setf (slot-value status-buffer 'height) value)) + (define-class message-buffer (input-buffer) ((window nil @@ -1007,12 +1016,16 @@ Also see `panel-page'.")) (height 16 :type integer + :writer nil + :reader height + :export t :documentation "The height of the message buffer in pixels.") (style (theme:themed-css (theme *browser*) `(body :background-color ,theme:background-alt :color ,theme:on-background-alt - :font-size "12px" + :font-size "75vh" + :line-height "100vh" :padding 0 :padding-left "4px" :margin 0)))) @@ -1021,6 +1034,10 @@ Also see `panel-page'.")) (:export-predicate-name-p t) (:metaclass user-class)) +(defmethod (setf height) (value (message-buffer message-buffer)) + (setf (ffi-height message-buffer) value) + (setf (slot-value message-buffer 'height) value)) + (defmethod customize-instance :after ((buffer buffer) &key (browser *browser*) no-hook-p diff --git a/source/changelog.lisp b/source/changelog.lisp index c13acb50ca5..8913e7b05fb 100644 --- a/source/changelog.lisp +++ b/source/changelog.lisp @@ -922,4 +922,7 @@ Nyxt version exists. It is only raised when the major version differs.") (:ul (:li "Fix bug that made Nyxt display an out of date version in several places.") (:li "Add " (:nxref :class-name 'message-buffer) " as a user class, thus -enabling its customization."))) +enabling its customization.") + (:li "The height of the " (:nxref :class-name 'message-buffer) " and " + (:nxref :class-name 'status-buffer) " can be dynamically set and its UI +elements are scaled accordingly."))) diff --git a/source/prompt-buffer.lisp b/source/prompt-buffer.lisp index 93e6bf57695..4f63207ac34 100644 --- a/source/prompt-buffer.lisp +++ b/source/prompt-buffer.lisp @@ -15,6 +15,7 @@ :type (or keyword integer) :writer nil :reader height + :export t :documentation "The height occupied by the prompt buffer. The options are: - `:default', which sets it to the value of `prompt-buffer-open-height';