aboutsummaryrefslogtreecommitdiff
path: root/src/OSDWindow.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/OSDWindow.cc')
-rw-r--r--src/OSDWindow.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/OSDWindow.cc b/src/OSDWindow.cc
index 005e07b..82090c5 100644
--- a/src/OSDWindow.cc
+++ b/src/OSDWindow.cc
@@ -57,19 +57,19 @@ void OSDWindow::reconfigTheme() {
57 57
58} 58}
59 59
60void OSDWindow::resize(const std::string &text) { 60void OSDWindow::resize(const FbTk::BiDiString &text) {
61 61
62 int h = m_theme->font().height() + m_theme->bevelWidth()*2; 62 int bw = 2 * m_theme->bevelWidth();
63 int w = m_theme->font().textWidth(text, text.size()) + 63 int h = m_theme->font().height() + bw;
64 m_theme->bevelWidth()*2; 64 int w = m_theme->font().textWidth(text) + bw;
65 FbTk::FbWindow::resize(w, h); 65 FbTk::FbWindow::resize(w, h);
66} 66}
67 67
68void OSDWindow::showText(const std::string &text) { 68void OSDWindow::showText(const FbTk::BiDiString &text) {
69 show(); 69 show();
70 clear(); 70 clear();
71 m_theme->font().drawText(*this, m_screen.screenNumber(), 71 m_theme->font().drawText(*this, m_screen.screenNumber(),
72 m_theme->iconbarTheme().text().textGC(), text, text.size(), 72 m_theme->iconbarTheme().text().textGC(), text,
73 m_theme->bevelWidth(), 73 m_theme->bevelWidth(),
74 m_theme->bevelWidth() + m_theme->font().ascent()); 74 m_theme->bevelWidth() + m_theme->font().ascent());
75} 75}