diff options
author | louis <louis.braun@gmx.de> | 2013-11-09 17:04:24 +0100 |
---|---|---|
committer | louis <louis.braun@gmx.de> | 2013-11-09 17:04:24 +0100 |
commit | c30c81a68219c33fade084300f77bc00c216f2cf (patch) | |
tree | e9d704faed0d385e0ebd1906537430b76f3148cd | |
parent | a8e2b2b74f070b97fdad44b9563b703c7ff99369 (diff) | |
download | skin-nopacity-c30c81a68219c33fade084300f77bc00c216f2cf.tar.gz skin-nopacity-c30c81a68219c33fade084300f77bc00c216f2cf.tar.bz2 |
Cutting too long recording name in displayreplay
-rw-r--r-- | HISTORY | 3 | ||||
-rw-r--r-- | displayreplay.c | 7 |
2 files changed, 8 insertions, 2 deletions
@@ -361,4 +361,5 @@ Version 0.1.4 - size of channel logos in main menu timers display configurable as percent of timer width - Added theme dependend background for status icon in displayreplay -- Fixed editing of text if text is scrolling (closes Bug 1572) +- Fixed editing of text if text is scrolling (closes Bug 1572) +- Cutting too long recording name in displayreplay diff --git a/displayreplay.c b/displayreplay.c index c11c543..0f331bb 100644 --- a/displayreplay.c +++ b/displayreplay.c @@ -316,8 +316,13 @@ void cNopacityDisplayReplay::SetRecording(const cRecording *Recording) { void cNopacityDisplayReplay::SetTitle(const char *Title) { pixmapInfo->Fill(clrTransparent); + int titleLength = fontManager->replayHeader->Width(Title); + int titleSpace = geoManager->replayInfoWidth - geoManager->replayHeaderHeight/2; + std::string strTitle = Title; + if (titleLength > titleSpace) + strTitle = CutText(strTitle, titleSpace, fontManager->replayHeader); pixmapInfo->DrawText(cPoint(geoManager->replayHeaderHeight/2, 0), - Title, + strTitle.c_str(), Theme.Color(clrReplayHead), clrTransparent, fontManager->replayHeader); |