Skip to content

Commit

Permalink
mode/hint: Remove second loop fixing hint overlay positions
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxGyver83 committed Nov 14, 2023
1 parent 996b8f0 commit 756bdd7
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions source/mode/hint.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -163,21 +163,6 @@ A positive value shifts to the bottom.")
(when (ps:lisp (show-hint-scope-p (find-submode 'hint-mode)))
(ps:chain element class-list (add "nyxt-element-hint")))))
(ps:chain document body (append-child fragment))
;; fix position of hint overlays that are partly out of the viewport
(loop for hint-element in hint-elements do
(let* ((computed-style (ps:chain window (get-computed-style hint-element)))
(left (parse-float (ps:@ computed-style left)))
(right (parse-float (ps:@ computed-style right)))
(width (parse-float (ps:@ computed-style width)))
(user-x-alignment (ps:lisp (hints-alignment-x (find-submode 'hint-mode)))))
(when (and (eq user-x-alignment 'left) (< left width))
(setf
(ps:@ hint-element style transform) nil
(ps:@ hint-element style left) "0px"))
(when (and (eq user-x-alignment 'right) (< right 0))
(setf
(ps:@ hint-element style left) nil
(ps:@ hint-element style right) "0px"))))
;; Returning fragment makes WebKit choke.
nil))

Expand Down

0 comments on commit 756bdd7

Please sign in to comment.