Skip to content

Commit

Permalink
修改部分画笔
Browse files Browse the repository at this point in the history
修改了 之后UI可能会崩坏, 麻烦@aaaaaaccd 修改一下
  • Loading branch information
kengwang committed Feb 26, 2021
1 parent 528ce29 commit da23b23
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 25 deletions.
5 changes: 3 additions & 2 deletions HyPlayer/Controls/PlayBar.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ public sealed partial class PlayBar : UserControl
{
private bool canslide;
public TimeSpan nowtime => HyPlayList.Player.PlaybackSession.Position;
private Brush originPlaybarBrush;

public PlayBar()
{
Expand Down Expand Up @@ -182,7 +183,7 @@ private void ButtonExpand_OnClick(object sender, RoutedEventArgs e)
{
ButtonExpand.Visibility = Visibility.Collapsed;
ButtonCollapse.Visibility = Visibility.Visible;

originPlaybarBrush = Common.PageMain.GridPlayBar.Background;
Common.PageMain.GridPlayBar.Background = null;
//Common.PageMain.MainFrame.Visibility = Visibility.Collapsed;
Common.PageMain.ExpandedPlayer.Visibility = Visibility.Visible;
Expand Down Expand Up @@ -216,7 +217,7 @@ private void ButtonCollapse_OnClick(object sender, RoutedEventArgs e)
Common.PageMain.ExpandedPlayer.Navigate(typeof(BlankPage));
//Common.PageMain.MainFrame.Visibility = Visibility.Visible;
Common.PageMain.ExpandedPlayer.Visibility = Visibility.Collapsed;
Common.PageMain.GridPlayBar.Background = new Windows.UI.Xaml.Media.AcrylicBrush() { BackgroundSource = AcrylicBackgroundSource.Backdrop, TintOpacity = 0.67500003206078, TintLuminosityOpacity = 0.183000008692034, TintColor = Windows.UI.Color.FromArgb(255, 62, 62, 62), FallbackColor = Windows.UI.Color.FromArgb(255, 62, 62, 62) };
Common.PageMain.GridPlayBar.Background = originPlaybarBrush;
}

private void ButtonCleanAll_OnClick(object sender, RoutedEventArgs e)
Expand Down
28 changes: 9 additions & 19 deletions HyPlayer/Controls/SingleNCSong.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,20 @@ public sealed partial class SingleNCSong : UserControl
{
private NCSong ncsong;
private bool CanPlay;
public SingleNCSong(NCSong song,int order,bool canplay=true)
public SingleNCSong(NCSong song, int order, bool canplay = true)
{
this.InitializeComponent();
ncsong = song;
CanPlay = canplay;
if (!CanPlay) {BtnPlay.Visibility = Visibility.Collapsed;
if (!CanPlay)
{
BtnPlay.Visibility = Visibility.Collapsed;
TextBlockSongname.Foreground = new SolidColorBrush(Color.FromArgb(255, 128, 128, 128));
}
ImageRect.ImageSource = new BitmapImage(new Uri(song.Album.cover+ "?param="+StaticSource.PICSIZE_SINGLENCSONG_COVER));
ImageRect.ImageSource = new BitmapImage(new Uri(song.Album.cover + "?param=" + StaticSource.PICSIZE_SINGLENCSONG_COVER));
TextBlockSongname.Text = song.songname;
TextBlockAlbum.Text = song.Album.name;
OrderId.Text = order.ToString();
OrderId.Text = (order + 1).ToString();
TextBlockArtist.Text = string.Join(" / ", song.Artist.Select(ar => ar.name));
}

Expand All @@ -61,17 +63,11 @@ private void UIElement_OnDoubleTapped(object sender, DoubleTappedRoutedEventArgs
TintColor = Windows.UI.Color.FromArgb(255, 0, 142, 230),
FallbackColor = Windows.UI.Color.FromArgb(255, 54, 54, 210)
};

}

private void UIElement_OnPointerEntered(object sender, PointerRoutedEventArgs e)
{
Grid1.Background = new Windows.UI.Xaml.Media.AcrylicBrush()
{
BackgroundSource = AcrylicBackgroundSource.Backdrop, TintOpacity = 0.67500003206078,
TintLuminosityOpacity = 0.183000008692034, TintColor = Windows.UI.Color.FromArgb(255, 54, 54, 54),
FallbackColor = Windows.UI.Color.FromArgb(255, 54, 54, 54)
};
Grid1.Background = Application.Current.Resources["SystemControlAltLowAcrylicElementBrush"] as Brush;
}

private void Grid1_OnPointerExited(object sender, PointerRoutedEventArgs e)
Expand All @@ -81,14 +77,7 @@ private void Grid1_OnPointerExited(object sender, PointerRoutedEventArgs e)

private void Grid1_OnTapped(object sender, TappedRoutedEventArgs e)
{
Grid1.Background = new Windows.UI.Xaml.Media.AcrylicBrush()
{
BackgroundSource = AcrylicBackgroundSource.Backdrop,
TintOpacity = 0.67500003206078,
TintLuminosityOpacity = 0.183000008692034,
TintColor = Windows.UI.Color.FromArgb(10, 147, 205, 241),
FallbackColor = Windows.UI.Color.FromArgb(10, 135, 206, 235)
};
Grid1.Background = Application.Current.Resources["SystemControlChromeMediumAcrylicElementMediumBrush"] as Brush;
}

private void ButtonBase_OnClick(object sender, RoutedEventArgs e)
Expand All @@ -98,6 +87,7 @@ private void ButtonBase_OnClick(object sender, RoutedEventArgs e)

private void Grid1_OnDoubleTapped(object sender, DoubleTappedRoutedEventArgs e)
{
Grid1.Background = Application.Current.Resources["SystemControlAccentAcrylicElementAccentMediumHighBrush"] as Brush;
_ = AppendMe();
}
}
Expand Down
3 changes: 2 additions & 1 deletion HyPlayer/MainPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
xmlns:hyPlayer="using:HyPlayer"
xmlns:triggers="using:Microsoft.Toolkit.Uwp.UI.Triggers"
xmlns:hyPlayerPage="using:HyPlayer.Pages"
Background="{ThemeResource SystemControlChromeMediumAcrylicWindowMediumBrush}"
mc:Ignorable="d">
<Grid>
<Frame
Expand All @@ -27,7 +28,7 @@
Name="GridPlayBar"
Margin="16"
CornerRadius="4"
Background="{StaticResource PlaybackAcrylicInAppLuminosity}"
Background="{ThemeResource SystemControlAcrylicElementMediumHighBrush}"
VerticalAlignment="Bottom"
Height="100">
<controls2:PlayBar />
Expand Down
2 changes: 1 addition & 1 deletion HyPlayer/Pages/BasePage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
x:Name="NavMain"
Margin="0,0,0,0"
BackRequested="OnNavigateBack"
Background="{ThemeResource AccentPanelAcrylic}"
Background="{ThemeResource SystemControlChromeMediumAcrylicWindowMediumBrush}"
IsBackButtonVisible="Visible"
IsBackEnabled="True"
IsSettingsVisible="False"
Expand Down
2 changes: 1 addition & 1 deletion HyPlayer/Pages/SongListDetail.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@
<StackPanel
Orientation="Vertical">
<controls:DockPanel
Background="{ThemeResource AccentPanelAcrylic}"
LastChildFill="True"
x:Name="GridPersonalInformation">
<Rectangle
Expand Down Expand Up @@ -105,6 +104,7 @@
</StackPanel>
</controls:DockPanel>
<StackPanel
Background="{ThemeResource SystemControlAcrylicElementBrush}"
Margin="20,30,0,0"
Spacing="10"
Name="SongContainer"
Expand Down
2 changes: 1 addition & 1 deletion HyPlayer/Pages/SongListFrame.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:controls="using:Microsoft.Toolkit.Uwp.UI.Controls"
mc:Ignorable="d"
Background="{ThemeResource BackgroundInAppLuminosity}">
Background="{ThemeResource SystemControlAcrylicElementBrush}">

<Grid>
<controls:WrapPanel Margin="0,0,0,350" HorizontalAlignment="Center" HorizontalSpacing="15" VerticalSpacing="15" x:Name="GridContainer" />
Expand Down

0 comments on commit da23b23

Please sign in to comment.