[mythtv] [mythtv-commits] mythtv commit: r16854 by nigel
Nigel Pearson
nigel at ind.tansu.com.au
Wed Apr 2 01:52:14 UTC 2008
> reduce the discoverability
> of the jump to the bottom.
>
> If you don't see how to restore that easily I'll look into it in the
> next days.
This does the trivial case
(add ellipsii top and bottom):
Index: playbackbox.cpp
===================================================================
--- playbackbox.cpp (revision 16868)
+++ playbackbox.cpp (working copy)
@@ -1372,7 +1373,7 @@
for (int cnt = 0; cnt < ltype->GetItems(); cnt++)
{
if (h < 0)
- tstring = "";
+ tstring = h < -1 ? "" : " ...";
else
{
tstring = titleList[h];
@@ -1430,7 +1431,7 @@
for (int cnt = 0; cnt < ltype->GetItems(); cnt++)
{
if (h >= titleList.count())
- tstring = "";
+ tstring = h - titleList.count() > 0 ? "" :
" ...";
else
{
tstring = titleList[h];
and this reverts to old behavior _except_ for small title lists:
Index: playbackbox.cpp
===================================================================
--- playbackbox.cpp (revision 16868)
+++ playbackbox.cpp (working copy)
@@ -1328,8 +1328,9 @@
QString tempTime;
QString tempSize;
+ bool repeatTitles = titleList.count() > 5;
QString match;
- QRect pr = drawListBounds;
+ QRect pr = drawListBounds;
QPixmap pix(pr.size());
LayerSet *container = NULL;
@@ -1368,9 +1369,13 @@
ltype->SetActive(inTitle);
int h = titleIndex - ltype->GetItems();
+ if (repeatTitles)
+ h += titleList.count();
for (int cnt = 0; cnt < ltype->GetItems(); cnt++)
{
+ if (repeatTitles)
+ h = h % titleList.count();
if (h < 0)
tstring = "";
else
@@ -1426,6 +1431,8 @@
ltype->SetActive(inTitle);
int h = titleIndex + 1;
+ if (repeatTitles)
+ h = h % titleList.count();
for (int cnt = 0; cnt < ltype->GetItems(); cnt++)
{
@@ -1444,6 +1451,8 @@
lcdItems.append(new LCDMenuItem(0,
NOTCHECKABLE, tstring));
h++;
+ if (repeatTitles)
+ h = h % titleList.count();
}
}
else if (ltype)
--
Nigel Pearson, nigel at ind.tansu.com.au|"Beware - I am a carrier
Telstra Net. Eng., Sydney, Australia | of surrealism"
Office: 9202 3900 Fax: 9261 3912 | D A
Mobile: 0408 664435 Home: 9792 6998 | L I
More information about the mythtv-dev
mailing list