Skip to content

Commit

Permalink
Improved Visuals
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderDotH committed Apr 26, 2023
1 parent 43ebace commit 9194516
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,7 @@ public LyricsSection(string filePath)

public async Task WriteToDisk()
{
await using FileStream stream = this._file.Open(FileMode.Create, FileAccess.Write);;
await using StreamWriter writer = new StreamWriter(stream);

await writer.WriteAsync(this._data?.ToString());
await File.WriteAllTextAsync(this._file.FullName, this._data.ToString());
}

public async Task ReadFromDisk()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,43 +68,43 @@
<StackPanel Orientation="Horizontal" Spacing="10">
<TextBlock Text="User Identification"
FontWeight="Light"
FontSize="15"/>
FontSize="14"/>

<TextBlock Text="0e65db204daf53b148eca6a0efb843b56716cf47"
FontWeight="Bold"
FontSize="15"/>
FontSize="14"/>
</StackPanel>

<StackPanel Orientation="Horizontal" Spacing="10">
<TextBlock Text="Secret"
FontWeight="Light"
FontSize="15"/>
FontSize="14"/>

<TextBlock Text="b/vExNSmPh1j+PBXPnf/LzYk2IY="
FontWeight="Bold"
FontSize="15"/>
FontSize="14"/>
</StackPanel>


<StackPanel Orientation="Horizontal" Spacing="10">
<TextBlock Text="Product"
FontWeight="Light"
Margin="0,5,0,0"
FontSize="15"/>
FontSize="14"/>

<Border CornerRadius="10" Background="{DynamicResource LightBackgroundBrush}">
<StackPanel Orientation="Horizontal" Spacing="0">
<TextBlock Text="OpenLyricsClient"
FontWeight="Light"
Margin="5,5,0,5"
FontSize="15"/>
FontSize="14"/>

<Border CornerRadius="10">
<TextBlock Text="Plus"
FontWeight="Bold"
VerticalAlignment="Bottom"
Margin="4,4,5,5"
FontSize="16">
FontSize="14">
<TextBlock.Foreground>
<ConicGradientBrush Center="0.5,0.5" >
<GradientStop Color="#d00000" Offset="0.0"/>
Expand Down
38 changes: 38 additions & 0 deletions OpenLyricsClient/Frontend/View/Pages/SettingsPage.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,42 @@

</StackPanel>

<TextBlock Text="Account"
FontSize="14"
Foreground="{DynamicResource SecondaryFontColorBrush}"
FontWeight="Normal"
Margin="0,0,0,0"/>

<StackPanel Orientation="Vertical"
Spacing="10">

<Button Name="BTN_Profile"
assists:ButtonAssist.CornerRadius="10"
Width="260"
Height="45"
Background="{DynamicResource SecondaryBackgroundBrush}"
Click="BTN_Profile_OnClick">
<StackPanel Orientation="Horizontal"
Spacing="10"
Margin="0,0,260,0"
HorizontalAlignment="Left">
<avalonia:MaterialIcon
Width="20"
Height="20"
VerticalAlignment="Center"
HorizontalAlignment="Left"
Margin="0,0,0,0"
Kind="User"/>

<TextBlock Text="Profile"
FontSize="13"
VerticalAlignment="Center"
HorizontalAlignment="Left"/>
</StackPanel>
</Button>

</StackPanel>

<TextBlock Text="Advanced"
FontSize="14"
Foreground="{DynamicResource SecondaryFontColorBrush}"
Expand Down Expand Up @@ -207,6 +243,8 @@
<providers:SettingsSpotify/>

<settings:SettingsCache/>

<settings:SettingsUserPage/>

</Carousel>

Expand Down
13 changes: 11 additions & 2 deletions OpenLyricsClient/Frontend/View/Pages/SettingsPage.axaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ public partial class SettingsPage : UserControl
private Button _btnLyrics;
private Button _btnSpotify;
private Button _btnCache;

private Button _btnProfile;

private Carousel _pageSelector;

private ATupleList<Button, int> _buttonList;
Expand All @@ -45,12 +46,15 @@ public SettingsPage()
this._btnLyrics = this.Get<Button>(nameof(BTN_Lyrics));
this._btnSpotify = this.Get<Button>(nameof(BTN_Spotify));
this._btnCache = this.Get<Button>(nameof(BTN_Cache));
this._btnProfile = this.Get<Button>(nameof(BTN_Profile));


this._buttonList.AddRange(
new Tuple<Button, int>(this._btnRomanization, 0),
new Tuple<Button, int>(this._btnLyrics, 1),
new Tuple<Button, int>(this._btnSpotify, 2),
new Tuple<Button, int>(this._btnCache, 3));
new Tuple<Button, int>(this._btnCache, 3),
new Tuple<Button, int>(this._btnProfile, 4));

this._pageSelector = this.Get<Carousel>(nameof(PageSelection));

Expand Down Expand Up @@ -121,4 +125,9 @@ private void BTN_Cache_OnClick(object? sender, RoutedEventArgs e)
{
SelectPage(3);
}

private void BTN_Profile_OnClick(object? sender, RoutedEventArgs e)
{
SelectPage(4);
}
}
3 changes: 3 additions & 0 deletions OpenLyricsClient/OpenLyricsClient.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@
<DependentUpon>LyricsScroller.axaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
<Compile Update="Frontend\View\Pages\Settings\SettingsUserPage.axaml.cs">
<DependentUpon>SettingsUserPage.axaml</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<Reference Include="CefNet">
Expand Down

0 comments on commit 9194516

Please sign in to comment.