Add marquee for long cheat names

This commit is contained in:
Gericom
2026-03-01 16:18:06 +01:00
parent a9425eea7c
commit e2e42115e7
10 changed files with 162 additions and 36 deletions

View File

@@ -22,7 +22,7 @@ MaterialFileInfoCardView::MaterialFileInfoCardView(const MaterialColorScheme* ma
AddChildTail(&_firstLine);
AddChildTail(&_secondLine);
AddChildTail(&_thirdLine);
_filenameLabelView.SetEllipsis(true);
_filenameLabelView.SetEllipsisStyle(LabelView::EllipsisStyle::Ellipsis);
AddChildTail(&_filenameLabelView);
}

View File

@@ -19,7 +19,7 @@ public:
void SetFirstLineAsync(TaskQueueBase* taskQueue, const char* firstLine, bool ellipsis) override
{
_firstLine.SetEllipsis(ellipsis);
_firstLine.SetEllipsisStyle(ellipsis ? LabelView::EllipsisStyle::Ellipsis : LabelView::EllipsisStyle::None);
if (taskQueue)
_firstLine.SetTextAsync(taskQueue, firstLine);
else
@@ -28,7 +28,7 @@ public:
void SetFirstLineAsync(TaskQueueBase* taskQueue, const char16_t* firstLine, u32 length, bool ellipsis) override
{
_firstLine.SetEllipsis(ellipsis);
_firstLine.SetEllipsisStyle(ellipsis ? LabelView::EllipsisStyle::Ellipsis : LabelView::EllipsisStyle::None);
if (taskQueue)
_firstLine.SetTextAsync(taskQueue, firstLine, length);
else

View File

@@ -14,7 +14,7 @@ CustomFileInfoView::CustomFileInfoView(const IFontRepository* fontRepository)
AddChildTail(&_firstLine);
AddChildTail(&_secondLine);
AddChildTail(&_thirdLine);
_filenameLabelView.SetEllipsis(true);
_filenameLabelView.SetEllipsisStyle(LabelView::EllipsisStyle::Ellipsis);
AddChildTail(&_filenameLabelView);
}

View File

@@ -16,7 +16,7 @@ public:
void SetFirstLineAsync(TaskQueueBase* taskQueue, const char* firstLine, bool ellipsis) override
{
_firstLine.SetEllipsis(ellipsis);
_firstLine.SetEllipsisStyle(ellipsis ? LabelView::EllipsisStyle::Ellipsis : LabelView::EllipsisStyle::None);
if (taskQueue)
_firstLine.SetTextAsync(taskQueue, firstLine);
else
@@ -25,7 +25,7 @@ public:
void SetFirstLineAsync(TaskQueueBase* taskQueue, const char16_t* firstLine, u32 length, bool ellipsis) override
{
_firstLine.SetEllipsis(ellipsis);
_firstLine.SetEllipsisStyle(ellipsis ? LabelView::EllipsisStyle::Ellipsis : LabelView::EllipsisStyle::None);
if (taskQueue)
_firstLine.SetTextAsync(taskQueue, firstLine, length);
else