aboutsummaryrefslogtreecommitdiff
path: root/src/TextButton.cc
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2003-08-13 10:14:54 (GMT)
committerfluxgen <fluxgen>2003-08-13 10:14:54 (GMT)
commit662be09609358784d08f1aa6d01ae0c88047cafa (patch)
tree50e994e66fe823fe67c18292af0ae6c2206edc6e /src/TextButton.cc
parent225e89d7754f15fa5947548e552fa5ce03141f80 (diff)
downloadfluxbox-662be09609358784d08f1aa6d01ae0c88047cafa.zip
fluxbox-662be09609358784d08f1aa6d01ae0c88047cafa.tar.bz2
Button changed to a FbWindow
Diffstat (limited to 'src/TextButton.cc')
-rw-r--r--src/TextButton.cc8
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