]> 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>
Sun, 29 May 2016 21:55:46 +0000 (17:55 -0400)
commit516d5d29dce28deab4601ec6aa714ca7ff59e6cd
treec25a292bb720843e6479d31b08d66d8832683d91
parentccc8ad4744545bf08eb22454c0f6cb91a590f059
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.
src/frontends/qt4/GuiPainter.cpp