]> git.lyx.org Git - lyx.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)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Wed, 1 Jun 2016 11:43:07 +0000 (13:43 +0200)
commit40f0659ec0cb0416ab94eb700f37f1b9a65d6212
tree9a5211ea5488c94eaba7a8be71cb49d51109fb77
parentf97f849e5cdeae8f960207fab760eb66fbbfde42
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