diff options
Diffstat (limited to 'src/TextButton.cc')
-rw-r--r-- | src/TextButton.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/TextButton.cc b/src/TextButton.cc index 7498ee1..3424533 100644 --- a/src/TextButton.cc +++ b/src/TextButton.cc | |||
@@ -19,7 +19,7 @@ | |||
19 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 19 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
20 | // DEALINGS IN THE SOFTWARE. | 20 | // DEALINGS IN THE SOFTWARE. |
21 | 21 | ||
22 | // $Id: TextButton.cc,v 1.3 2003/08/11 14:34:46 fluxgen Exp $ | 22 | // $Id: TextButton.cc,v 1.4 2003/08/13 10:12:36 fluxgen Exp $ |
23 | 23 | ||
24 | #include "TextButton.hh" | 24 | #include "TextButton.hh" |
25 | #include "Font.hh" | 25 | #include "Font.hh" |
@@ -80,10 +80,12 @@ void TextButton::drawText(int x_offset, int y_offset) { | |||
80 | text().c_str(), text().size(), | 80 | text().c_str(), text().size(), |
81 | textlen // return new text len | 81 | textlen // return new text len |
82 | ); | 82 | ); |
83 | |||
83 | // center text by default | 84 | // center text by default |
84 | int center_pos = height()/2 + font().ascent()/2; | 85 | int center_pos = height()/2 + font().ascent()/2; |
85 | font().drawText(window().window(), // drawable | 86 | |
86 | window().screenNumber(), | 87 | font().drawText(window(), // drawable |
88 | screenNumber(), | ||
87 | gc(), // graphic context | 89 | gc(), // graphic context |
88 | text().c_str(), textlen, // string and string size | 90 | text().c_str(), textlen, // string and string size |
89 | align_x + x_offset, center_pos + y_offset); // position | 91 | align_x + x_offset, center_pos + y_offset); // position |