]> git.lyx.org Git - features.git/commit
Use the same code for editable and non-editable buttons
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 15 Jun 2017 13:30:23 +0000 (15:30 +0200)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 15 Jun 2017 13:40:30 +0000 (15:40 +0200)
commit62b06c64ed624d51cce785e083d59cab18b36b69
tree02f27b73f8c5923aee256ae9b3d6bf863be7d016
parent530fec453f870cd2e5d0c74b50367125768b5a45
Use the same code for editable and non-editable buttons

This removes the use of rectText in RenderButton. The fact that this
gave different spacing than buttonText was a problem.

Now buttonText requires to specify
* the offset, so that INSET_TO_TEXT_OFFSET is not used anymore in
  src/frontends/, which will be useful later.
* the background and frame color, in replacement for the hover state.

Remove the methods button() and buttonFrame() from GuiPainter.

Remove some unused header files.

Fixes bug #10704.
src/frontends/FontMetrics.h
src/frontends/Painter.h
src/frontends/qt4/GuiFontMetrics.cpp
src/frontends/qt4/GuiFontMetrics.h
src/frontends/qt4/GuiPainter.cpp
src/frontends/qt4/GuiPainter.h
src/insets/InsetCollapsable.cpp
src/insets/RenderButton.cpp