aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk/TextButton.cc
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2004-09-11 23:01:34 (GMT)
committerfluxgen <fluxgen>2004-09-11 23:01:34 (GMT)
commit049e40c9eb6e6e8651b171a2a78465398c87f6a1 (patch)
tree7aef9d57e82336221d6d953617c7a5d53ee95db0 /src/FbTk/TextButton.cc
parentacd2176355876a7bb7afe9d026f9780a3d1c2737 (diff)
downloadfluxbox_paul-049e40c9eb6e6e8651b171a2a78465398c87f6a1.zip
fluxbox_paul-049e40c9eb6e6e8651b171a2a78465398c87f6a1.tar.bz2
Font::drawText takes reference to FbDrawable instead of X Drawable + some code cleaning
Diffstat (limited to 'src/FbTk/TextButton.cc')
-rw-r--r--src/FbTk/TextButton.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/FbTk/TextButton.cc b/src/FbTk/TextButton.cc
index a472349..6d93c92 100644
--- a/src/FbTk/TextButton.cc
+++ b/src/FbTk/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.5 2004/01/09 02:19:02 fluxgen Exp $ 22// $Id: TextButton.cc,v 1.6 2004/09/11 22:58:20 fluxgen Exp $
23 23
24#include "TextButton.hh" 24#include "TextButton.hh"
25#include "Font.hh" 25#include "Font.hh"
@@ -142,8 +142,11 @@ void TextButton::drawText(int x_offset, int y_offset) {
142 142
143 // center text by default 143 // center text by default
144 int center_pos = height()/2 + font().ascent()/2 - 1; 144 int center_pos = height()/2 + font().ascent()/2 - 1;
145 FbDrawable *drawable = &m_buffer;
146 if (backgroundPixmap() == ParentRelative)
147 drawable = this;
145 148
146 font().drawText(backgroundPixmap() == ParentRelative ? window() : m_buffer.drawable(), 149 font().drawText(*drawable,
147 screenNumber(), 150 screenNumber(),
148 gc(), // graphic context 151 gc(), // graphic context
149 text().c_str(), textlen, // string and string size 152 text().c_str(), textlen, // string and string size