]> git.lyx.org Git - features.git/commit
Fix drawing of buttonText (enforce same left/right spacing)
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Mon, 23 May 2016 13:24:13 +0000 (15:24 +0200)
committerRichard Heck <rgheck@lyx.org>
Wed, 15 Jun 2016 21:32:53 +0000 (22:32 +0100)
commitaa522e7071b1b7c8e168e703e6437dd3742c58b6
tree37168c540a92f9bda086d579c12a6cefdfc1d8e0
parentcba0b073aa32f4e4c35e4d789d02915326f5231d
Fix drawing of buttonText (enforce same left/right spacing)

The computation of the width of the button was wrong. If <--> stands
for TEXT_TO_INSET_OFFSET/2 spacing, and if `[]' marks the button's
limits, then the intent is
  <-->[<-->button text<-->]<-->

Therefore the physical grey rectangle width is
   width - Inset::TEXT_TO_INSET_OFFSET

With this change, the spacing on the right of the button is not larger
than the left one.

Fixes bug #10147.
(cherry picked from commit 516d5d29dce28deab4601ec6aa714ca7ff59e6cd)
src/frontends/qt4/GuiPainter.cpp
status.22x