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:
parent
3c85ace912
commit
90f2fcf031
4 changed files with 9 additions and 10 deletions
|
@ -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 bw = 2 * m_theme->bevelWidth();
|
||||||
int h = m_theme->font().height() + bw;
|
int h = m_theme->font().height() + bw;
|
||||||
|
|
|
@ -41,7 +41,7 @@ public:
|
||||||
m_pixmap(None), m_visible(false) { }
|
m_pixmap(None), m_visible(false) { }
|
||||||
|
|
||||||
void reconfigTheme();
|
void reconfigTheme();
|
||||||
void resize(const FbTk::BiDiString &text);
|
void resizeForText(const FbTk::BiDiString &text);
|
||||||
void showText(const FbTk::BiDiString &text);
|
void showText(const FbTk::BiDiString &text);
|
||||||
void hide();
|
void hide();
|
||||||
|
|
||||||
|
|
|
@ -1900,19 +1900,18 @@ void BScreen::renderGeomWindow() {
|
||||||
char buf[256];
|
char buf[256];
|
||||||
_FB_USES_NLS;
|
_FB_USES_NLS;
|
||||||
|
|
||||||
sprintf(buf,
|
const std::string msg = _FB_XTEXT(Screen, GeometrySpacing,
|
||||||
_FB_XTEXT(Screen, GeometrySpacing,
|
"W: %04d x H: %04d", "Representative maximum sized text for width and height dialog");
|
||||||
"W: %04d x H: %04d", "Representative maximum sized text for width and height dialog").c_str(),
|
const int n = snprintf(buf, msg.size(), msg.c_str(), 0, 0);
|
||||||
0, 0);
|
|
||||||
|
|
||||||
FbTk::BiDiString label(buf);
|
FbTk::BiDiString label(std::string(buf, n));
|
||||||
m_geom_window->resize(label);
|
m_geom_window->resizeForText(label);
|
||||||
m_geom_window->reconfigTheme();
|
m_geom_window->reconfigTheme();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void BScreen::renderPosWindow() {
|
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();
|
m_pos_window->reconfigTheme();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -53,7 +53,7 @@ void TooltipWindow::raiseTooltip() {
|
||||||
if (m_lastText.logical().empty())
|
if (m_lastText.logical().empty())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
resize(m_lastText);
|
resizeForText(m_lastText);
|
||||||
reconfigTheme();
|
reconfigTheme();
|
||||||
|
|
||||||
FbTk::Font& font = theme()->iconbarTheme().text().font();
|
FbTk::Font& font = theme()->iconbarTheme().text().font();
|
||||||
|
|
Loading…
Reference in a new issue