From 08089dd064d626cb6d9f65dd201f6f9be5d5751b Mon Sep 17 00:00:00 2001 From: rathnor Date: Fri, 31 Oct 2003 20:02:49 +0000 Subject: out-by-one correction --- ChangeLog | 2 ++ src/FbTk/TextButton.cc | 4 ++-- src/IconButton.cc | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index ef5aa8d..9bae23b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,8 @@ (Format: Year/Month/Day) Changes for 0.9.6: *03/10/31: + * Fix textbutton text alignment (out by one) (Simon) + TextButton.cc * Tweak some positioning for winbutton drawn icons (Simon) WinButton.cc * Fix iconbar button alignment and squash inactive tools (Simon) diff --git a/src/FbTk/TextButton.cc b/src/FbTk/TextButton.cc index 4b2d45e..de8fad0 100644 --- a/src/FbTk/TextButton.cc +++ b/src/FbTk/TextButton.cc @@ -19,7 +19,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: TextButton.cc,v 1.3 2003/09/14 09:50:01 fluxgen Exp $ +// $Id: TextButton.cc,v 1.4 2003/10/31 20:02:49 rathnor Exp $ #include "TextButton.hh" #include "Font.hh" @@ -138,7 +138,7 @@ void TextButton::drawText(int x_offset, int y_offset) { textlen); // return new text len // center text by default - int center_pos = height()/2 + font().ascent()/2; + int center_pos = height()/2 + font().ascent()/2 - 1; font().drawText(backgroundPixmap() == ParentRelative ? window() : m_buffer.drawable(), screenNumber(), diff --git a/src/IconButton.cc b/src/IconButton.cc index 093298e..bc0c9d5 100644 --- a/src/IconButton.cc +++ b/src/IconButton.cc @@ -20,7 +20,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: IconButton.cc,v 1.10 2003/10/31 19:32:39 rathnor Exp $ +// $Id: IconButton.cc,v 1.11 2003/10/31 20:02:49 rathnor Exp $ #include "IconButton.hh" @@ -197,7 +197,7 @@ void IconButton::setupWindow() { void IconButton::drawText(int x, int y) { // offset text - FbTk::TextButton::drawText(m_icon_window.x() + m_icon_window.width() + 1, y); + FbTk::TextButton::drawText(m_icon_window.x() + m_icon_window.width() + 1, y); } -- cgit v0.11.2