Skip to content

Commit

Permalink
Merge remote-tracking branch 'gh/minor-status-message-buffer-fix'
Browse files Browse the repository at this point in the history
  • Loading branch information
aadcg committed Nov 1, 2023
2 parents a46a43f + f0e3815 commit b072935
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 11 deletions.
37 changes: 27 additions & 10 deletions source/buffer.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand Down Expand Up @@ -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"
Expand All @@ -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"
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand All @@ -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))))
Expand All @@ -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
Expand Down
5 changes: 4 additions & 1 deletion source/changelog.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -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.")))
1 change: 1 addition & 0 deletions source/prompt-buffer.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down

0 comments on commit b072935

Please sign in to comment.