From: Abdelrazak Younes Date: Sun, 2 Mar 2008 10:20:13 +0000 (+0000) Subject: Hopefully fix monolithic build. X-Git-Tag: 1.6.10~5957 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=bced5446741879336e922c5a20b77035d1ce9581;p=features.git Hopefully fix monolithic build. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23380 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/frontends/qt4/GuiFontMetrics.cpp b/src/frontends/qt4/GuiFontMetrics.cpp index de83340cba..01c8ce7738 100644 --- a/src/frontends/qt4/GuiFontMetrics.cpp +++ b/src/frontends/qt4/GuiFontMetrics.cpp @@ -177,11 +177,11 @@ int GuiFontMetrics::signedWidth(docstring const & s) const } -static int const d = Inset::TEXT_TO_INSET_OFFSET / 2; - void GuiFontMetrics::rectText(docstring const & str, int & w, int & ascent, int & descent) const { + static int const d = Inset::TEXT_TO_INSET_OFFSET / 2; + w = width(str) + Inset::TEXT_TO_INSET_OFFSET; ascent = metrics_.ascent() + d; descent = metrics_.descent() + d; diff --git a/src/frontends/qt4/GuiPainter.cpp b/src/frontends/qt4/GuiPainter.cpp index c0a48411be..275c8d3eea 100644 --- a/src/frontends/qt4/GuiPainter.cpp +++ b/src/frontends/qt4/GuiPainter.cpp @@ -430,7 +430,6 @@ void GuiPainter::buttonFrame(int x, int y, int w, int h) line(x, y + h - 1, x - 1 + w, y + h - 1, Color_buttonframe); } -static int const d = Inset::TEXT_TO_INSET_OFFSET / 2; void GuiPainter::rectText(int x, int y, docstring const & str, FontInfo const & font, ColorCode back, ColorCode frame) @@ -463,6 +462,8 @@ void GuiPainter::buttonText(int x, int y, docstring const & str, FontMetrics const & fm = theFontMetrics(font); fm.buttonText(str, width, ascent, descent); + static int const d = Inset::TEXT_TO_INSET_OFFSET / 2; + button(x + d, y - ascent, width - d, descent + ascent, mouseHover); text(x + Inset::TEXT_TO_INSET_OFFSET, y, str, font); }