Skip to content

Commit

Permalink
Исправлен дизайн настроек
Browse files Browse the repository at this point in the history
  • Loading branch information
Fooxboy committed Apr 26, 2024
1 parent 815a19c commit b018898
Show file tree
Hide file tree
Showing 5 changed files with 82 additions and 45 deletions.
2 changes: 1 addition & 1 deletion MusicX/Controls/BlockControl.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<blocks:TitleBlockControl />
</DataTemplate>
<DataTemplate x:Key="none_separator" DataType="models:Block">
<Rectangle Margin="5 10" Height="1" Opacity="0.1" Fill="White" />
<Rectangle Margin="5,5,5,10" Height="1" Opacity="0.1" Fill="White" />
</DataTemplate>

<DataTemplate x:Key="loader" DataType="models:Block">
Expand Down
4 changes: 2 additions & 2 deletions MusicX/Controls/Blocks/TitleBlockControl.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
Style="{StaticResource HeaderHyperlinkButtonStyle}"
FontFamily="{StaticResource VKSansDemiBold}"
FontSize="30"
FontWeight="DemiBold"
FontWeight="Bold"
Click="MoreButton_Click"
Content="{TemplateBinding Content}">
<wpfui:HyperlinkButton.Icon>
Expand All @@ -36,7 +36,7 @@

<Grid
x:Name="TitleBlock"
Margin="0,0,0,13"
Margin="0,-10,0,0"
HorizontalAlignment="Stretch">

<Grid.ColumnDefinitions>
Expand Down
4 changes: 2 additions & 2 deletions MusicX/Controls/PlayerControl.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -286,8 +286,8 @@ private void UpdateSpeakerIcon()
{
_ when PlayerService.IsMuted => new SymbolIcon(SymbolRegular.SpeakerOff28),
0.0 => new SymbolIcon(SymbolRegular.SpeakerOff28),
> 0.0 and < 0.30 => new SymbolIcon(SymbolRegular.Speaker032),
> 0.30 and < 0.60 => new SymbolIcon(SymbolRegular.Speaker132),
> 0.0 and < 0.10 => new SymbolIcon(SymbolRegular.Speaker032),
> 0.10 and < 0.60 => new SymbolIcon(SymbolRegular.Speaker132),
> 0.80 => new SymbolIcon(SymbolRegular.Speaker232),
_ => SpeakerIcon.Icon
};
Expand Down
108 changes: 68 additions & 40 deletions MusicX/Views/SettingsView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,37 +83,44 @@
FontSize="30"
Text="Настройки" />
</wpfui:CardExpander.Header>

<StackPanel>
<TextBlock
FontFamily="{StaticResource VKSansMedium}"
FontSize="24"
FontSize="20"
Text="Трансляция активности" />
<StackPanel Margin="15,10">

<StackPanel Margin="0,10">
<wpfui:ToggleSwitch
x:Name="ShowRPC"
Checked="ShowRPC_Checked"
Content="Показывать трек в Discord"
FontSize="18"
FontSize="15"
Unchecked="ShowRPC_Unchecked" />
<wpfui:ToggleSwitch
x:Name="BroacastVK"
Margin="0,5,0,0"
Checked="BroacastVK_Checked"
Content="Показывать трек в статусе ВКонтакте"
FontSize="18"
FontSize="15"
Unchecked="BroacastVK_Unchecked" />
</StackPanel>

<Rectangle Margin="0,10,0,10" Fill="White" HorizontalAlignment="Stretch" Height="1" Opacity="0.2" VerticalAlignment="Center"/>

<TextBlock>
<Run FontFamily="{StaticResource VKSansMedium}" FontSize="24">
<Run FontFamily="{StaticResource VKSansMedium}" FontSize="20">
Загрузка треков
</Run>
<Run
x:Name="MemoryTracks"
FontSize="18"
FontSize="14"
Foreground="Gray"
FontWeight="Light"
Text="0 КБ" />
</TextBlock>
<StackPanel Margin="15,10" Orientation="Horizontal">

<StackPanel Margin="0,10" Orientation="Horizontal">
<wpfui:Button
x:Name="DownloadPath"
Width="180"
Expand All @@ -130,14 +137,17 @@
Content="Открыть папку" />
</StackPanel>

<Rectangle Margin="0,10,0,10" Fill="White" HorizontalAlignment="Stretch" Height="1" Opacity="0.2" VerticalAlignment="Center"/>


<TextBlock
FontFamily="{StaticResource VKSansMedium}"
FontSize="24"
FontSize="20"
Text="Игнорируемые исполнители" />
<StackPanel Margin="15,10">
<TextBlock Text="Список исполнителей, треки которых автоматически пропускаются" />
<StackPanel Margin="0,0">
<TextBlock Opacity="0.7" Text="Список исполнителей, треки которых автоматически пропускаются" />

<StackPanel Margin="0,10,0,0" Orientation="Horizontal">
<StackPanel Margin="0,15,0,0" Orientation="Horizontal">
<wpfui:TextBox
x:Name="NameIgnoredArtist"
Width="200"
Expand Down Expand Up @@ -181,39 +191,47 @@
</wpfui:ListView>
</StackPanel>

<Rectangle Margin="0,10,0,10" Fill="White" HorizontalAlignment="Stretch" Height="1" Opacity="0.2" VerticalAlignment="Center"/>

<TextBlock
FontFamily="{StaticResource VKSansMedium}"
FontSize="24"
FontSize="20"
Text="Зима ❄️" />
<StackPanel Margin="15,10">
<TextBlock Margin="0,0,0,5" Text="Если включить все эти тумблеры в приложении наступит зима :)" />
<StackPanel Margin="0,0,0,0">
<TextBlock Margin="0,0,0,15" Opacity="0.7" Text="Если включить все эти тумблеры в приложении наступит зима :)" />

<wpfui:ToggleSwitch
x:Name="ShowAmimatedBackground"
Checked="ShowAmimatedBackground_Checked"
Content="Показывать анимированный фон"
FontSize="18"
FontSize="15"
Unchecked="ShowAmimatedBackground_Unchecked" />

<wpfui:ToggleSwitch
Margin="0,5,0,0"
x:Name="WinterTheme"
Checked="WinterTheme_Checked"
Content="Зима"
FontSize="18"
FontSize="15"
Unchecked="WinterTheme_Unchecked" />
</StackPanel>

<Rectangle Margin="0,10,0,10" Fill="White" HorizontalAlignment="Stretch" Height="1" Opacity="0.2" VerticalAlignment="Center"/>

<TextBlock>
<Run FontFamily="{StaticResource VKSansMedium}" FontSize="24">
<Run FontFamily="{StaticResource VKSansMedium}" FontSize="20">
Логи
</Run>
<Run
x:Name="MemoryLogs"
FontSize="18"
FontSize="14"
Foreground="Gray"
FontWeight="Light"
Text="0 КБ" />
</TextBlock>
<StackPanel Margin="15,10" Orientation="Horizontal">


<StackPanel Margin="0,10" Orientation="Horizontal">
<wpfui:Button
x:Name="OpenLogs"
Width="180"
Expand All @@ -235,43 +253,49 @@
IsEnabled="False" />
</StackPanel>

<Rectangle Margin="0,10,0,10" Fill="White" HorizontalAlignment="Stretch" Height="1" Opacity="0.2" VerticalAlignment="Center"/>

<TextBlock
FontFamily="{StaticResource VKSansMedium}"
FontSize="24"
FontSize="20"
Text="Обновления" />
<StackPanel Margin="15,10">
<StackPanel Margin="0,10,0,0">
<wpfui:ToggleSwitch
x:Name="GetBetaUpdates"
Checked="GetBetaUpdates_OnChecked"
Content="Получать бета версии"
FontSize="18"
FontSize="15"
Unchecked="GetBetaUpdates_OnUnchecked" />
</StackPanel>

<Rectangle Margin="0,10,0,10" Fill="White" HorizontalAlignment="Stretch" Height="1" Opacity="0.2" VerticalAlignment="Center"/>

<TextBlock
FontFamily="{StaticResource VKSansMedium}"
FontSize="24"
FontSize="20"
Text="Трей" />
<StackPanel Margin="15,10">
<TextBlock Margin="0,0,0,5" Text="При нажатии на кнопку 'Свернуть' Music X пропадет с панели задач, чтобы открыть его обратно, достаточно нажать на иконку в трее" />
<StackPanel>
<TextBlock Margin="0,0,0,15" Opacity="0.7" Text="При нажатии на кнопку 'Свернуть' Music X пропадет с панели задач, чтобы открыть его обратно, достаточно нажать на иконку в трее" />
<wpfui:ToggleSwitch
x:Name="MinimizeToTray"
Checked="MinimizeToTray_Checked"
Content="Всегда сворачивать в трей"
FontSize="18"
FontSize="15"
Unchecked="MinimizeToTray_Unchecked" />
</StackPanel>


<Rectangle Margin="0,10,0,10" Fill="White" HorizontalAlignment="Stretch" Height="1" Opacity="0.2" VerticalAlignment="Center"/>

<TextBlock
FontFamily="{StaticResource VKSansMedium}"
FontSize="24"
FontSize="20"
Text="Воспроизведение" />
<StackPanel Margin="15,10">
<StackPanel Margin="0,10">
<wpfui:ToggleSwitch
x:Name="SavePlayerState"
Checked="SavePlayerState_OnCheckChanged"
Content="Сохранять текущий трек между перезапусками приложения"
FontSize="18"
FontSize="15"
Unchecked="SavePlayerState_OnCheckChanged" />
</StackPanel>
</StackPanel>
Expand Down Expand Up @@ -331,7 +355,7 @@
Height="30"
Margin="10,0,0,0"
Appearance="Secondary"
Click="TelegramButton_Click"
Click="TelegramChat_Click"
Content="Телеграм чат" />
</StackPanel>

Expand Down Expand Up @@ -366,6 +390,9 @@
NavigateUri="https://github.com/lepoco/wpfui/blob/main/LICENSE" />
</StackPanel>


<Rectangle Margin="0,10,0,10" Fill="White" HorizontalAlignment="Stretch" Height="1" Opacity="0.2" VerticalAlignment="Center"/>

<StackPanel Margin="0,5,0,0" Orientation="Horizontal">
<TextBlock FontWeight="Bold" Text="VK NET" />
<TextBlock Text=" - библиотека для запросов к API ВКонтакте" />
Expand All @@ -383,6 +410,9 @@
NavigateUri="https://t.me/VkDotNet" />
</StackPanel>

<Rectangle Margin="0,10,0,10" Fill="White" HorizontalAlignment="Stretch" Height="1" Opacity="0.2" VerticalAlignment="Center"/>


<StackPanel Margin="0,5,0,0" Orientation="Horizontal">
<TextBlock FontWeight="Bold" Text="VkNet.AudioBypass" />
<TextBlock Text=" - библиотека для симуляции входа как андроид приложение" />
Expand All @@ -396,6 +426,9 @@
NavigateUri="https://github.com/flowersne/VkNet.AudioBypass/blob/master/LICENSE" />
</StackPanel>

<Rectangle Margin="0,10,0,10" Fill="White" HorizontalAlignment="Stretch" Height="1" Opacity="0.2" VerticalAlignment="Center"/>


<StackPanel Margin="0,5,0,0" Orientation="Horizontal">
<TextBlock FontWeight="Bold" Text="FFmpeg" />
<TextBlock Text=" - набор библиотек для конвертации/сохранения медиа" />
Expand All @@ -405,6 +438,8 @@
NavigateUri="https://ffmpeg.org/" />
</StackPanel>

<Rectangle Margin="0,10,0,10" Fill="White" HorizontalAlignment="Stretch" Height="1" Opacity="0.2" VerticalAlignment="Center"/>

<StackPanel Margin="0,5,0,0" Orientation="Horizontal">
<TextBlock FontWeight="Bold" Text="FFmpeg.NET" />
<TextBlock Text=" - библиотека враппер FFmpeg для .NET" />
Expand All @@ -418,6 +453,8 @@
NavigateUri="https://github.com/cmxl/FFmpeg.NET/blob/master/LICENSE.md" />
</StackPanel>

<Rectangle Margin="0,10,0,10" Fill="White" HorizontalAlignment="Stretch" Height="1" Opacity="0.2" VerticalAlignment="Center"/>

<StackPanel Margin="0,5,0,0" Orientation="Horizontal">
<TextBlock FontWeight="Bold" Text="DiscordRPC" />
<TextBlock Text=" - библиотека для управления Discrod RPC на .NET" />
Expand All @@ -431,15 +468,6 @@
NavigateUri="https://github.com/Lachee/discord-rpc-csharp/blob/master/LICENSE" />
</StackPanel>

<StackPanel Margin="0,5,0,0" Orientation="Horizontal">
<TextBlock FontWeight="Bold" Text="WpfAnimatedGif" />
<TextBlock Text=" - библиотека для воспроизведения .gif файлов " />
<wpfui:HyperlinkButton
Margin="5,0,0,0"
Content="Github"
NavigateUri="https://github.com/XamlAnimatedGif/WpfAnimatedGif" />
</StackPanel>

</StackPanel>
</wpfui:CardExpander>

Expand Down
9 changes: 9 additions & 0 deletions MusicX/Views/SettingsView.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,15 @@ private void TelegramButton_Click(object sender, RoutedEventArgs e)
});
}

private void TelegramChat_Click(object sender, RoutedEventArgs e)
{
Process.Start(new ProcessStartInfo
{
FileName = "https://t.me/+lO37psdwX2s3NjZi",
UseShellExecute = true
});
}

private void OpenLogs_Click(object sender, RoutedEventArgs e)
{
Process.Start(new ProcessStartInfo
Expand Down

0 comments on commit b018898

Please sign in to comment.