Add touch input support, add fast scrolling support for coverflow display mode, fix use after free bug in banner list mode

This commit is contained in:
Gericom
2026-04-04 19:24:39 +02:00
parent 21a8790ebc
commit 97762b14d3
119 changed files with 2251 additions and 762 deletions

View File

@@ -9,53 +9,53 @@ class CustomThemeInfo;
class CustomFileInfoView : public BannerView
{
public:
CustomFileInfoView(const CustomThemeInfo* customThemeInfo, const IFontRepository* fontRepository);
SHARED_ONLY(CustomFileInfoView)
public:
void Update() override;
void Draw(GraphicsContext& graphicsContext) override;
void SetFirstLineAsync(TaskQueueBase* taskQueue, const char* firstLine, bool ellipsis) override
{
_firstLine.SetEllipsisStyle(ellipsis ? LabelView::EllipsisStyle::Ellipsis : LabelView::EllipsisStyle::None);
_firstLine->SetEllipsisStyle(ellipsis ? LabelView::EllipsisStyle::Ellipsis : LabelView::EllipsisStyle::None);
if (taskQueue)
_firstLine.SetTextAsync(taskQueue, firstLine);
_firstLine->SetTextAsync(taskQueue, firstLine);
else
_firstLine.SetText(firstLine);
_firstLine->SetText(firstLine);
}
void SetFirstLineAsync(TaskQueueBase* taskQueue, const char16_t* firstLine, u32 length, bool ellipsis) override
{
_firstLine.SetEllipsisStyle(ellipsis ? LabelView::EllipsisStyle::Ellipsis : LabelView::EllipsisStyle::None);
_firstLine->SetEllipsisStyle(ellipsis ? LabelView::EllipsisStyle::Ellipsis : LabelView::EllipsisStyle::None);
if (taskQueue)
_firstLine.SetTextAsync(taskQueue, firstLine, length);
_firstLine->SetTextAsync(taskQueue, firstLine, length);
else
_firstLine.SetText(firstLine, length);
_firstLine->SetText(firstLine, length);
}
void SetSecondLineAsync(TaskQueueBase* taskQueue, const char16_t* secondLine, u32 length) override
{
if (taskQueue)
_secondLine.SetTextAsync(taskQueue, secondLine, length);
_secondLine->SetTextAsync(taskQueue, secondLine, length);
else
_secondLine.SetText(secondLine, length);
_secondLine->SetText(secondLine, length);
}
void SetThirdLineAsync(TaskQueueBase* taskQueue, const char16_t* thirdLine, u32 length) override
{
if (taskQueue)
_thirdLine.SetTextAsync(taskQueue, thirdLine, length);
_thirdLine->SetTextAsync(taskQueue, thirdLine, length);
else
_thirdLine.SetText(thirdLine, length);
_thirdLine->SetText(thirdLine, length);
}
void SetFileNameAsync(TaskQueueBase* taskQueue, const TCHAR* fileName, bool useAsTitle) override
{
BannerView::SetFileNameAsync(taskQueue, fileName, useAsTitle);
if (taskQueue)
_filenameLabelView.SetTextAsync(taskQueue, fileName);
_filenameLabelView->SetTextAsync(taskQueue, fileName);
else
_filenameLabelView.SetText(fileName);
_filenameLabelView->SetText(fileName);
}
Rectangle GetBounds() const override
@@ -64,9 +64,11 @@ public:
}
private:
Label2DView _firstLine;
Label2DView _secondLine;
Label2DView _thirdLine;
Label2DView _filenameLabelView;
SharedPtr<Label2DView> _firstLine;
SharedPtr<Label2DView> _secondLine;
SharedPtr<Label2DView> _thirdLine;
SharedPtr<Label2DView> _filenameLabelView;
const CustomThemeInfo* _customThemeInfo;
CustomFileInfoView(const CustomThemeInfo* customThemeInfo, const IFontRepository* fontRepository);
};