aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/FbTk/TextBox.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/FbTk/TextBox.cc b/src/FbTk/TextBox.cc
index fa1600e..1c345c9 100644
--- a/src/FbTk/TextBox.cc
+++ b/src/FbTk/TextBox.cc
@@ -203,7 +203,10 @@ void TextBox::buttonPressEvent(XButtonEvent &event) {
203 int delta = width(); 203 int delta = width();
204 int tmp = 0; 204 int tmp = 0;
205 for(i = m_start_pos; i <= m_end_pos; i++) { 205 for(i = m_start_pos; i <= m_end_pos; i++) {
206 tmp = abs(event.x - font().textWidth(m_text.c_str() + m_start_pos, i - m_start_pos)); 206 tmp = abs(static_cast<int>
207 (event.x - font().
208 textWidth(m_text.c_str() + m_start_pos,
209 i - m_start_pos)));
207 210
208 if (tmp < delta) { 211 if (tmp < delta) {
209 delta = tmp; 212 delta = tmp;