| 420 | // ---------------------------------------------------------------------------------------- |
| 421 | |
| 422 | rectangle text_field:: |
| 423 | get_text_rect ( |
| 424 | ) const |
| 425 | { |
| 426 | // figure out where the text string should appear |
| 427 | unsigned long vertical_pad = (rect.height() - mfont->height())/2+1; |
| 428 | |
| 429 | rectangle text_rect; |
| 430 | text_rect.set_left(rect.left()+style->get_padding(*mfont)); |
| 431 | text_rect.set_top(rect.top()+vertical_pad); |
| 432 | text_rect.set_right(rect.right()-style->get_padding(*mfont)); |
| 433 | text_rect.set_bottom(text_rect.top()+mfont->height()-1); |
| 434 | return text_rect; |
| 435 | } |
| 436 | |
| 437 | // ---------------------------------------------------------------------------------------- |
| 438 |
nothing calls this directly
no test coverage detected