aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk/TextButton.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/FbTk/TextButton.cc')
-rw-r--r--src/FbTk/TextButton.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/FbTk/TextButton.cc b/src/FbTk/TextButton.cc
index 4d05ecd..0cc1b51 100644
--- a/src/FbTk/TextButton.cc
+++ b/src/FbTk/TextButton.cc
@@ -112,6 +112,10 @@ unsigned int TextButton::textWidth() const {
112 return font().textWidth(text()); 112 return font().textWidth(text());
113} 113}
114 114
115unsigned int TextButton::preferredWidth() const {
116 return m_bevel + m_left_padding + m_right_padding + textWidth();
117}
118
115void TextButton::renderForeground(FbWindow &win, FbDrawable &drawable) { 119void TextButton::renderForeground(FbWindow &win, FbDrawable &drawable) {
116 // (win should always be *this, no need to check) 120 // (win should always be *this, no need to check)
117 drawText(0, 0, &drawable); 121 drawText(0, 0, &drawable);