Minor API change for OSDWindow

OSDWindow::resize(const FbTk::BiDiString&) shadowed FbWindow::resize(x, y). To
fix this I renamed the function to OSDWindow::resizeForText() to make the
intention clear.
This commit is contained in:
Mathias Gumz 2015-01-03 21:45:14 +01:00
parent 3c85ace912
commit 90f2fcf031
4 changed files with 9 additions and 10 deletions

View file

@ -57,7 +57,7 @@ void OSDWindow::reconfigTheme() {
}
void OSDWindow::resize(const FbTk::BiDiString &text) {
void OSDWindow::resizeForText(const FbTk::BiDiString &text) {
int bw = 2 * m_theme->bevelWidth();
int h = m_theme->font().height() + bw;

View file

@ -41,7 +41,7 @@ public:
m_pixmap(None), m_visible(false) { }
void reconfigTheme();
void resize(const FbTk::BiDiString &text);
void resizeForText(const FbTk::BiDiString &text);
void showText(const FbTk::BiDiString &text);
void hide();

View file

@ -1900,19 +1900,18 @@ void BScreen::renderGeomWindow() {
char buf[256];
_FB_USES_NLS;
sprintf(buf,
_FB_XTEXT(Screen, GeometrySpacing,
"W: %04d x H: %04d", "Representative maximum sized text for width and height dialog").c_str(),
0, 0);
const std::string msg = _FB_XTEXT(Screen, GeometrySpacing,
"W: %04d x H: %04d", "Representative maximum sized text for width and height dialog");
const int n = snprintf(buf, msg.size(), msg.c_str(), 0, 0);
FbTk::BiDiString label(buf);
m_geom_window->resize(label);
FbTk::BiDiString label(std::string(buf, n));
m_geom_window->resizeForText(label);
m_geom_window->reconfigTheme();
}
void BScreen::renderPosWindow() {
m_pos_window->resize(FbTk::BiDiString("0:00000 x 0:00000"));
m_pos_window->resizeForText(FbTk::BiDiString("0:00000 x 0:00000"));
m_pos_window->reconfigTheme();
}

View file

@ -53,7 +53,7 @@ void TooltipWindow::raiseTooltip() {
if (m_lastText.logical().empty())
return;
resize(m_lastText);
resizeForText(m_lastText);
reconfigTheme();
FbTk::Font& font = theme()->iconbarTheme().text().font();