]> git.lyx.org Git - lyx.git/commit
Cleanup the caret geometry code
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 1 Oct 2020 11:17:01 +0000 (13:17 +0200)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 1 Oct 2020 11:17:01 +0000 (13:17 +0200)
commit7f1b1729b4ccdb16e35e6d5052890103f13bd747
treecb7d64d761ddb34e92f0989c0b8c4b321494d115
parent7d9653190918cffac883d0f0977564c0e11275df
Cleanup the caret geometry code

Intended changes:

* code is shorter and cleaner

* caret scales better with zoom when cursor_width=0: completion
  indicator, l-shaped cursor...

Details:

* Rename BufferView::getPosAndHeight to getPosAndDim because ascent is
  needed too and width could in the future be set depending on font.

* Get rid of rect_ in CaretWidget and record a Dimension (and y value) instead.
  Remove also caret_width_ and slant_, replace rtl_ with dir.

* Make CaretWidget members public and lose the trailing _.

* change CaretWidget::update to read its parameters from current bufferview.
src/BufferView.cpp
src/BufferView.h
src/LyXRC.h
src/frontends/qt/GuiWorkArea.cpp