]> git.vomp.tv Git - vompclient.git/commitdiff
Fix #1453263 using Philipp Mueller's long text patch
authorChris Tallon <chris@vomp.tv>
Sat, 12 Jan 2008 17:18:23 +0000 (17:18 +0000)
committerChris Tallon <chris@vomp.tv>
Sat, 12 Jan 2008 17:18:23 +0000 (17:18 +0000)
tbboxx.cc
tbboxx.h
vrecordinglist.cc

index 4019b7730bc568a5810997a7da0e6fa8b07b5124..84f6af01b0bcf80d0c2103b20ed5956a6b084377 100644 (file)
--- a/tbboxx.cc
+++ b/tbboxx.cc
@@ -27,6 +27,7 @@ TBBoxx::TBBoxx()
   titleBarOn = 0;
   borderOn = 0;
   titleText = NULL;
+  titleBarTextWidth = 0;
 }
 
 TBBoxx::~TBBoxx()
@@ -34,11 +35,12 @@ TBBoxx::~TBBoxx()
   if (titleText) delete[] titleText;
 }
 
-void TBBoxx::setTitleText(const char* takeText)
+void TBBoxx::setTitleText(const char* takeText, int width)
 {
   int length = strlen(takeText);
   titleText = new char[length + 1];
   strcpy(titleText, takeText);
+  titleBarTextWidth = width;
 }
 
 void TBBoxx::draw()
@@ -56,7 +58,11 @@ void TBBoxx::draw()
   if (titleBarOn)
   {
     rectangle(0, 0, area.w, 30, titleBarColour);
-    if (titleText) drawText(titleText, 5, 5, Colour::LIGHTTEXT);
+    if (titleText)
+    {
+      if (titleBarTextWidth) drawText(titleText, 5, 5, titleBarTextWidth, Colour::LIGHTTEXT);
+      else drawText(titleText, 5, 5, Colour::LIGHTTEXT);
+    }
   }
 
   Boxx::draw();  
index b1290c3c7717706aee3493f87ebbf5415700f3ac..39565ae3ba59f5154c4a237ff87431d70150094d 100644 (file)
--- a/tbboxx.h
+++ b/tbboxx.h
@@ -39,7 +39,7 @@ class TBBoxx : public Boxx
 
     void setBorderOn(UCHAR on);
     void setTitleBarOn(UCHAR on);
-    void setTitleText(const char* title);
+    void setTitleText(const char* title, int width=0);
 
     void setTitleBarColour(Colour& colour);
     char* getTitleText() { return titleText; };
@@ -47,6 +47,7 @@ class TBBoxx : public Boxx
   private:
     char* titleText;
     UCHAR borderOn;
+    int titleBarTextWidth;
 
   protected:
     Colour titleBarColour;
index 4a2667a2b75d5477ce4d05e0c36a991134f04f2c..4407ee61798ef99b73092524aa49aa4014dfc0a6 100644 (file)
@@ -134,7 +134,7 @@ void VRecordingList::draw(bool doIndexPop)
     {
       char title[300];
       SNPRINTF(title, 299, tr("Recordings - %s"), recman->getCurDirName());
-      setTitleText(title);
+      setTitleText(title, 364);
     }
     else
     {