aboutsummaryrefslogtreecommitdiff
path: root/src/TooltipWindow.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/TooltipWindow.cc')
-rw-r--r--src/TooltipWindow.cc17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/TooltipWindow.cc b/src/TooltipWindow.cc
index 0fb7273..77a6e1e 100644
--- a/src/TooltipWindow.cc
+++ b/src/TooltipWindow.cc
@@ -55,8 +55,11 @@ void TooltipWindow::raiseTooltip() {
55 55
56 resize(m_lastText); 56 resize(m_lastText);
57 reconfigTheme(); 57 reconfigTheme();
58 int h = theme()->iconbarTheme().text().font().height() + theme()->bevelWidth() * 2; 58
59 int w = theme()->iconbarTheme().text().font().textWidth(m_lastText) + theme()->bevelWidth() * 2; 59 FbTk::Font& font = theme()->iconbarTheme().text().font();
60
61 int h = font.height() + theme()->bevelWidth() * 2;
62 int w = font.textWidth(m_lastText) + theme()->bevelWidth() * 2;
60 63
61 Window root_ret; // not used 64 Window root_ret; // not used
62 Window window_ret; // not used 65 Window window_ret; // not used
@@ -91,11 +94,11 @@ void TooltipWindow::raiseTooltip() {
91 show(); 94 show();
92 clear(); 95 clear();
93 // TODO: make this use a TextButton like TextDialog does 96 // TODO: make this use a TextButton like TextDialog does
94 theme()->iconbarTheme().text().font().drawText(*this, screen().screenNumber(), 97 font.drawText(*this, screen().screenNumber(),
95 theme()->iconbarTheme().text().textGC(), 98 theme()->iconbarTheme().text().textGC(),
96 m_lastText, 99 m_lastText,
97 theme()->bevelWidth(), 100 theme()->bevelWidth(),
98 theme()->bevelWidth() + theme()->iconbarTheme().text().font().ascent()); 101 theme()->bevelWidth() + font.ascent());
99} 102}
100 103
101void TooltipWindow::updateText(const FbTk::BiDiString& text) { 104void TooltipWindow::updateText(const FbTk::BiDiString& text) {