Skip to content

Commit

Permalink
Clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
Tyrrrz committed May 15, 2024
1 parent 3bc6110 commit 3207a95
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 20 deletions.
47 changes: 29 additions & 18 deletions YoutubeDownloader/App.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@

<!-- Toggle switch -->
<Style Selector="ToggleSwitch">
<Setter Property="materialAssists:ToggleSwitchAssist.SwitchThumbOffBackground" Value="{DynamicResource MaterialBackgroundBrush}" />
<Setter Property="materialAssists:ToggleSwitchAssist.SwitchThumbOffBackground" Value="{DynamicResource ToggleBackgroundBrush}" />
</Style>

<!-- Tooltip -->
Expand All @@ -164,24 +164,35 @@
</Application.Styles>

<Application.Resources>
<!-- Text box -->
<ControlTheme
x:Key="CompactTextBox"
BasedOn="{StaticResource {x:Type TextBox}}"
TargetType="{x:Type TextBox}">
<Styles>
<Style Selector="TextBox">
<Setter Property="Height" Value="22" />

<Style Selector="^ /template/ Panel#PART_TextFieldPanel">
<Setter Property="MinHeight" Value="0" />
</Style>
<ResourceDictionary>
<ResourceDictionary.ThemeDictionaries>
<ResourceDictionary x:Key="Default">
<SolidColorBrush x:Key="ToggleBackgroundBrush" Color="#FFFFFF" />
</ResourceDictionary>
<ResourceDictionary x:Key="Dark">
<SolidColorBrush x:Key="ToggleBackgroundBrush" Color="#8E8E8E" />
</ResourceDictionary>
</ResourceDictionary.ThemeDictionaries>

<!-- Text box -->
<ControlTheme
x:Key="CompactTextBox"
BasedOn="{StaticResource {x:Type TextBox}}"
TargetType="{x:Type TextBox}">
<Styles>
<Style Selector="TextBox">
<Setter Property="Height" Value="22" />

<Style Selector="^ /template/ Panel#PART_TextFieldPanel">
<Setter Property="MinHeight" Value="0" />
</Style>

<Style Selector="^ /template/ Panel#PART_TextContainer">
<Setter Property="Margin" Value="0" />
<Style Selector="^ /template/ Panel#PART_TextContainer">
<Setter Property="Margin" Value="0" />
</Style>
</Style>
</Style>
</Styles>
</ControlTheme>
</Styles>
</ControlTheme>
</ResourceDictionary>
</Application.Resources>
</Application>
4 changes: 2 additions & 2 deletions YoutubeDownloader/App.axaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ namespace YoutubeDownloader;

public class App : Application, IDisposable
{
private readonly DisposableCollector _eventRoot = new();

private readonly ServiceProvider _services;
private readonly SettingsService _settingsService;
private readonly MainViewModel _mainViewModel;

private readonly DisposableCollector _eventRoot = new();

public App()
{
var services = new ServiceCollection();
Expand Down

0 comments on commit 3207a95

Please sign in to comment.