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

@@ -6,26 +6,30 @@
#include "CustomFileInfoView.h"
CustomFileInfoView::CustomFileInfoView(const CustomThemeInfo* customThemeInfo, const IFontRepository* fontRepository)
: _firstLine(customThemeInfo->topBannerTextLine0Info.GetWidth(), 16, 50, fontRepository->GetFont(FontType::Medium11))
, _secondLine(customThemeInfo->topBannerTextLine1Info.GetWidth(), 16, 50, fontRepository->GetFont(FontType::Regular10))
, _thirdLine(customThemeInfo->topBannerTextLine2Info.GetWidth(), 16, 50, fontRepository->GetFont(FontType::Regular10))
, _filenameLabelView(customThemeInfo->topFileNameTextInfo.GetWidth(), 16, 256, fontRepository->GetFont(FontType::Medium7_5))
: _firstLine(Label2DView::CreateShared(
customThemeInfo->topBannerTextLine0Info.GetWidth(), 16, 50, fontRepository->GetFont(FontType::Medium11)))
, _secondLine(Label2DView::CreateShared(
customThemeInfo->topBannerTextLine1Info.GetWidth(), 16, 50, fontRepository->GetFont(FontType::Regular10)))
, _thirdLine(Label2DView::CreateShared(
customThemeInfo->topBannerTextLine2Info.GetWidth(), 16, 50, fontRepository->GetFont(FontType::Regular10)))
, _filenameLabelView(Label2DView::CreateShared(
customThemeInfo->topFileNameTextInfo.GetWidth(), 16, 256, fontRepository->GetFont(FontType::Medium7_5)))
, _customThemeInfo(customThemeInfo)
{
AddChildTail(&_firstLine);
AddChildTail(&_secondLine);
AddChildTail(&_thirdLine);
_filenameLabelView.SetEllipsisStyle(LabelView::EllipsisStyle::Marquee);
AddChildTail(&_filenameLabelView);
AddChildTail(_firstLine.GetPointer());
AddChildTail(_secondLine.GetPointer());
AddChildTail(_thirdLine.GetPointer());
_filenameLabelView->SetEllipsisStyle(LabelView::EllipsisStyle::Marquee);
AddChildTail(_filenameLabelView.GetPointer());
}
void CustomFileInfoView::Update()
{
BannerView::Update();
_firstLine.SetPosition(_customThemeInfo->topBannerTextLine0Info.GetPosition());
_secondLine.SetPosition(_customThemeInfo->topBannerTextLine1Info.GetPosition());
_thirdLine.SetPosition(_customThemeInfo->topBannerTextLine2Info.GetPosition());
_filenameLabelView.SetPosition(_customThemeInfo->topFileNameTextInfo.GetPosition());
_firstLine->SetPosition(_customThemeInfo->topBannerTextLine0Info.GetPosition());
_secondLine->SetPosition(_customThemeInfo->topBannerTextLine1Info.GetPosition());
_thirdLine->SetPosition(_customThemeInfo->topBannerTextLine2Info.GetPosition());
_filenameLabelView->SetPosition(_customThemeInfo->topFileNameTextInfo.GetPosition());
if (_icon)
{
_icon->SetPosition(_customThemeInfo->topIconInfo.GetPosition());
@@ -35,14 +39,14 @@ void CustomFileInfoView::Update()
void CustomFileInfoView::Draw(GraphicsContext& graphicsContext)
{
_firstLine.SetBackgroundColor(_customThemeInfo->topBannerTextLine0Info.GetBlendColor());
_firstLine.SetForegroundColor(_customThemeInfo->topBannerTextLine0Info.GetTextColor());
_secondLine.SetBackgroundColor(_customThemeInfo->topBannerTextLine1Info.GetBlendColor());
_secondLine.SetForegroundColor(_customThemeInfo->topBannerTextLine1Info.GetTextColor());
_thirdLine.SetBackgroundColor(_customThemeInfo->topBannerTextLine2Info.GetBlendColor());
_thirdLine.SetForegroundColor(_customThemeInfo->topBannerTextLine2Info.GetTextColor());
_filenameLabelView.SetBackgroundColor(_customThemeInfo->topFileNameTextInfo.GetBlendColor());
_filenameLabelView.SetForegroundColor(_customThemeInfo->topFileNameTextInfo.GetTextColor());
_firstLine->SetBackgroundColor(_customThemeInfo->topBannerTextLine0Info.GetBlendColor());
_firstLine->SetForegroundColor(_customThemeInfo->topBannerTextLine0Info.GetTextColor());
_secondLine->SetBackgroundColor(_customThemeInfo->topBannerTextLine1Info.GetBlendColor());
_secondLine->SetForegroundColor(_customThemeInfo->topBannerTextLine1Info.GetTextColor());
_thirdLine->SetBackgroundColor(_customThemeInfo->topBannerTextLine2Info.GetBlendColor());
_thirdLine->SetForegroundColor(_customThemeInfo->topBannerTextLine2Info.GetTextColor());
_filenameLabelView->SetBackgroundColor(_customThemeInfo->topFileNameTextInfo.GetBlendColor());
_filenameLabelView->SetForegroundColor(_customThemeInfo->topFileNameTextInfo.GetTextColor());
BannerView::Draw(graphicsContext);