feature: anime status icon
This commit is contained in:
parent
2469a5ba88
commit
03b83b16c4
@ -659,7 +659,7 @@ namespace Pixiview.Illust
|
|||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (y - lastRefreshY > 100)
|
if (y - lastRefreshY > 200)
|
||||||
{
|
{
|
||||||
if (CheckRefresh())
|
if (CheckRefresh())
|
||||||
{
|
{
|
||||||
|
@ -44,6 +44,15 @@
|
|||||||
FontSize="Micro" TextColor="White"
|
FontSize="Micro" TextColor="White"
|
||||||
IsVisible="{Binding IsPageVisible}"/>
|
IsVisible="{Binding IsPageVisible}"/>
|
||||||
|
|
||||||
|
<u:RoundLabel Text="{Binding AnimeStatus}"
|
||||||
|
BackgroundColor="{DynamicResource MaskColor}" Margin="0, 0, 6, 6"
|
||||||
|
Padding="13, 12, 0, 0" CornerRadius="22"
|
||||||
|
WidthRequest="44" HeightRequest="44"
|
||||||
|
HorizontalOptions="End" VerticalOptions="End"
|
||||||
|
FontFamily="{DynamicResource IconSolidFontFamily}"
|
||||||
|
FontSize="20" TextColor="White"
|
||||||
|
IsVisible="{Binding IsAnimateSliderVisible}"/>
|
||||||
|
|
||||||
<Slider Grid.Row="1" VerticalOptions="End"
|
<Slider Grid.Row="1" VerticalOptions="End"
|
||||||
Margin="{DynamicResource ScreenBottomPadding}"
|
Margin="{DynamicResource ScreenBottomPadding}"
|
||||||
MinimumTrackColor="{DynamicResource TintColor}"
|
MinimumTrackColor="{DynamicResource TintColor}"
|
||||||
|
@ -27,6 +27,8 @@ namespace Pixiview.Illust
|
|||||||
nameof(CurrentPage), typeof(int), typeof(ViewIllustPage), propertyChanged: OnCurrentPagePropertyChanged);
|
nameof(CurrentPage), typeof(int), typeof(ViewIllustPage), propertyChanged: OnCurrentPagePropertyChanged);
|
||||||
public static readonly BindableProperty IsScrollAnimatedProperty = BindableProperty.Create(
|
public static readonly BindableProperty IsScrollAnimatedProperty = BindableProperty.Create(
|
||||||
nameof(IsScrollAnimated), typeof(bool), typeof(ViewIllustPage), true);
|
nameof(IsScrollAnimated), typeof(bool), typeof(ViewIllustPage), true);
|
||||||
|
public static readonly BindableProperty AnimeStatusProperty = BindableProperty.Create(
|
||||||
|
nameof(AnimeStatus), typeof(string), typeof(ViewIllustPage), StyleDefinition.IconPlay);
|
||||||
public static readonly BindableProperty IsAnimateSliderVisibleProperty = BindableProperty.Create(
|
public static readonly BindableProperty IsAnimateSliderVisibleProperty = BindableProperty.Create(
|
||||||
nameof(IsAnimateSliderVisible), typeof(bool), typeof(ViewIllustPage));
|
nameof(IsAnimateSliderVisible), typeof(bool), typeof(ViewIllustPage));
|
||||||
public static readonly BindableProperty IsAnimateSliderEnabledProperty = BindableProperty.Create(
|
public static readonly BindableProperty IsAnimateSliderEnabledProperty = BindableProperty.Create(
|
||||||
@ -83,6 +85,11 @@ namespace Pixiview.Illust
|
|||||||
get => (int)GetValue(CurrentPageProperty);
|
get => (int)GetValue(CurrentPageProperty);
|
||||||
set => SetValue(CurrentPageProperty, value);
|
set => SetValue(CurrentPageProperty, value);
|
||||||
}
|
}
|
||||||
|
public string AnimeStatus
|
||||||
|
{
|
||||||
|
get => (string)GetValue(AnimeStatusProperty);
|
||||||
|
set => SetValue(AnimeStatusProperty, value);
|
||||||
|
}
|
||||||
public bool IsScrollAnimated
|
public bool IsScrollAnimated
|
||||||
{
|
{
|
||||||
get => (bool)GetValue(IsScrollAnimatedProperty);
|
get => (bool)GetValue(IsScrollAnimatedProperty);
|
||||||
@ -493,6 +500,7 @@ namespace Pixiview.Illust
|
|||||||
if (ugoira != null)
|
if (ugoira != null)
|
||||||
{
|
{
|
||||||
var playing = !ugoira.IsPlaying;
|
var playing = !ugoira.IsPlaying;
|
||||||
|
AnimeStatus = playing ? StyleDefinition.IconPause : StyleDefinition.IconPlay;
|
||||||
IsAnimateSliderEnabled = !playing;
|
IsAnimateSliderEnabled = !playing;
|
||||||
ugoira.TogglePlay(playing);
|
ugoira.TogglePlay(playing);
|
||||||
illustItem.IsPlaying = playing;
|
illustItem.IsPlaying = playing;
|
||||||
@ -506,6 +514,7 @@ namespace Pixiview.Illust
|
|||||||
|
|
||||||
ugoira = new Ugoira(ugoiraData, item);
|
ugoira = new Ugoira(ugoiraData, item);
|
||||||
ugoira.FrameChanged += OnUgoiraFrameChanged;
|
ugoira.FrameChanged += OnUgoiraFrameChanged;
|
||||||
|
AnimeStatus = StyleDefinition.IconPause;
|
||||||
illustItem.IsPlaying = true;
|
illustItem.IsPlaying = true;
|
||||||
ugoira.TogglePlay(true);
|
ugoira.TogglePlay(true);
|
||||||
}
|
}
|
||||||
|
@ -46,6 +46,7 @@ namespace Pixiview.UI
|
|||||||
//public const string IconCaretUp = "\uf0d8";
|
//public const string IconCaretUp = "\uf0d8";
|
||||||
public const string IconCircleCheck = "\uf058";
|
public const string IconCircleCheck = "\uf058";
|
||||||
public const string IconPlay = "\uf04b";
|
public const string IconPlay = "\uf04b";
|
||||||
|
public const string IconPause = "\uf04c";
|
||||||
public const string IconMore = "\uf142";
|
public const string IconMore = "\uf142";
|
||||||
public const string IconCaretCircleLeft = "\uf32e";
|
public const string IconCaretCircleLeft = "\uf32e";
|
||||||
public const string IconCaretCircleRight = "\uf330";
|
public const string IconCaretCircleRight = "\uf330";
|
||||||
|
@ -33,7 +33,7 @@ namespace Pixiview.UI.Theme
|
|||||||
Add(TextColor, Color.White);
|
Add(TextColor, Color.White);
|
||||||
Add(SubTextColor, Color.LightGray);
|
Add(SubTextColor, Color.LightGray);
|
||||||
Add(CardBackgroundColor, Color.FromRgb(0x33, 0x33, 0x33));
|
Add(CardBackgroundColor, Color.FromRgb(0x33, 0x33, 0x33));
|
||||||
Add(MaskColor, Color.FromRgba(0xff, 0xff, 0xff, 0x50));
|
Add(MaskColor, Color.FromRgba(0xff, 0xff, 0xff, 0x64));
|
||||||
Add(NavColor, Color.FromRgb(0x11, 0x11, 0x11));
|
Add(NavColor, Color.FromRgb(0x11, 0x11, 0x11));
|
||||||
Add(NavSelectedColor, Color.FromRgb(0x22, 0x22, 0x22));
|
Add(NavSelectedColor, Color.FromRgb(0x22, 0x22, 0x22));
|
||||||
Add(OptionBackColor, Color.Black);
|
Add(OptionBackColor, Color.Black);
|
||||||
|
@ -33,7 +33,7 @@ namespace Pixiview.UI.Theme
|
|||||||
Add(TextColor, Color.Black);
|
Add(TextColor, Color.Black);
|
||||||
Add(SubTextColor, Color.DimGray);
|
Add(SubTextColor, Color.DimGray);
|
||||||
Add(CardBackgroundColor, Color.FromRgb(0xf3, 0xf3, 0xf3));
|
Add(CardBackgroundColor, Color.FromRgb(0xf3, 0xf3, 0xf3));
|
||||||
Add(MaskColor, Color.FromRgba(0, 0, 0, 0x50));
|
Add(MaskColor, Color.FromRgba(0, 0, 0, 0x64));
|
||||||
Add(NavColor, Color.FromRgb(0xf0, 0xf0, 0xf0));
|
Add(NavColor, Color.FromRgb(0xf0, 0xf0, 0xf0));
|
||||||
Add(NavSelectedColor, Color.LightGray);
|
Add(NavSelectedColor, Color.LightGray);
|
||||||
Add(OptionBackColor, Color.FromRgb(0xf0, 0xf0, 0xf0));
|
Add(OptionBackColor, Color.FromRgb(0xf0, 0xf0, 0xf0));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user