diff --git a/recmenuitem.c b/recmenuitem.c index 33a6b6c..5b650a5 100644 --- a/recmenuitem.c +++ b/recmenuitem.c @@ -682,9 +682,9 @@ void cRecMenuItemSelectDirectory::Draw(void) { void cRecMenuItemSelectDirectory::DrawValue(void) { pixmapVal->Fill(clrTransparent); int iconSize = min(128, height); - int textX = width - font->Width(folders[currentVal].c_str()) - iconSize; + int textX = std::max(width - font->Width(folders[currentVal].c_str()) - iconSize, 10 + indent * 30 + font->Width(*text) + 2 * iconSize); int textY = (height - font->Height()) / 2; - pixmapVal->DrawText(cPoint(textX, textY), folders[currentVal].c_str(), colorText, clrTransparent, font); + pixmapVal->DrawText(cPoint(textX, textY), folders[currentVal].c_str(), colorText, clrTransparent, font, width - textX - iconSize, font->Height(), taTop | taRight); int iconLeftX = textX - iconSize; int iconRightX = width - iconSize; int iconY = (height - iconSize) / 2;