]> git.lyx.org Git - features.git/commitdiff
Hopefully fix monolithic build.
authorAbdelrazak Younes <younes@lyx.org>
Sun, 2 Mar 2008 10:20:13 +0000 (10:20 +0000)
committerAbdelrazak Younes <younes@lyx.org>
Sun, 2 Mar 2008 10:20:13 +0000 (10:20 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23380 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt4/GuiFontMetrics.cpp
src/frontends/qt4/GuiPainter.cpp

index de83340cba35f437babc8fcb8c303047c427385d..01c8ce7738df4fe2c63dad5ae2ce2993e20aaf2d 100644 (file)
@@ -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;
index c0a48411be5554e95eda1053d3ab43e7237fb6d8..275c8d3eeac774334b6a67f1008acd4ee595cff2 100644 (file)
@@ -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);
 }