summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlouis <louis.braun@gmx.de>2013-11-09 17:04:24 +0100
committerlouis <louis.braun@gmx.de>2013-11-09 17:04:24 +0100
commitc30c81a68219c33fade084300f77bc00c216f2cf (patch)
treee9d704faed0d385e0ebd1906537430b76f3148cd
parenta8e2b2b74f070b97fdad44b9563b703c7ff99369 (diff)
downloadskin-nopacity-c30c81a68219c33fade084300f77bc00c216f2cf.tar.gz
skin-nopacity-c30c81a68219c33fade084300f77bc00c216f2cf.tar.bz2
Cutting too long recording name in displayreplay
-rw-r--r--HISTORY3
-rw-r--r--displayreplay.c7
2 files changed, 8 insertions, 2 deletions
diff --git a/HISTORY b/HISTORY
index cf3bd44..5b550a7 100644
--- a/HISTORY
+++ b/HISTORY
@@ -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);