Skip to content

Commit 9a103d9

Browse files
committed
1.5.1
Fix error when deleting auto-start task Extended logging UI changes
1 parent f8367d3 commit 9a103d9

File tree

9 files changed

+192
-112
lines changed

9 files changed

+192
-112
lines changed

Source/HDRProfile/App.xaml

Lines changed: 30 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,9 @@
3030
<Setter Property="Foreground" Value="Black"/>
3131
</Style>
3232

33-
34-
33+
<Style x:Key="RounedBorder" TargetType="Border">
34+
<Setter Property="CornerRadius" Value="{StaticResource CornerRadius}"/>
35+
</Style>
3536

3637
<Style x:Key="DefaultButton" TargetType="Button" >
3738
<Setter Property="Background" Value="{StaticResource AccentBrush}"/>
@@ -40,8 +41,8 @@
4041
<Setter Property="Template">
4142
<Setter.Value>
4243
<ControlTemplate TargetType="Button">
43-
<Border Height="Auto" Width="Auto" BorderBrush="{TemplateBinding Background}" Background="{TemplateBinding Background}" BorderThickness="1" CornerRadius="{StaticResource CornerRadius}">
44-
<TextBlock Background="Transparent" Margin="5" Foreground="{TemplateBinding Foreground}" Text="{TemplateBinding Content}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
44+
<Border Height="Auto" Width="Auto" BorderBrush="{TemplateBinding Background}" Background="{TemplateBinding Background}" BorderThickness="0" CornerRadius="{StaticResource CornerRadius}">
45+
<TextBlock FontSize="{TemplateBinding FontSize}" FontWeight="{TemplateBinding FontWeight}" Background="Transparent" Margin="5" Foreground="{TemplateBinding Foreground}" Text="{TemplateBinding Content}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
4546
</Border>
4647
</ControlTemplate>
4748
</Setter.Value>
@@ -102,36 +103,43 @@
102103
</Style.Triggers>
103104
</Style>
104105
<Style TargetType="Button" BasedOn="{StaticResource DefaultButton}"/>
105-
106-
<Style x:Key="DefaultTabItem" TargetType="TabItem">
106+
107+
108+
109+
<Style x:Key="DefaultTabHeader" TargetType="TabItem">
107110
<Setter Property="Background" Value="{StaticResource AccentBrush}"/>
108111
<Setter Property="Foreground" Value="{StaticResource ButtonForegroundBrush}"/>
112+
<Setter Property="BorderThickness" Value="0"/>
109113
<Setter Property="Template">
110114
<Setter.Value>
111115
<ControlTemplate TargetType="TabItem">
112-
<Border Height="Auto" Width="Auto" BorderBrush="{StaticResource AccentBrush}" Background="{TemplateBinding Background}" BorderThickness="1 1 1 0" CornerRadius="3 3 0 0">
113-
<TextBlock Padding="5,5,5,5" Foreground="{TemplateBinding Foreground}" Text="{TemplateBinding Header}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
116+
<Border x:Name="HeaderBorder" Height="Auto" Width="Auto" BorderBrush="{TemplateBinding Background}" CornerRadius="3 3 0 0">
117+
<TextBlock x:Name="HeaderContent" FontSize="{TemplateBinding FontSize}" FontWeight="{TemplateBinding FontWeight}" Background="Transparent" Margin="5" Foreground="{TemplateBinding Foreground}" Text="{TemplateBinding Header}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
114118
</Border>
119+
<ControlTemplate.Triggers>
120+
<DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=IsSelected}" Value="True" >
121+
<Setter TargetName="HeaderContent" Property="Foreground" Value="{StaticResource ButtonForegroundBrush}"/>
122+
<Setter TargetName="HeaderBorder" Property="Background" Value="{StaticResource AccentBrush}"/>
123+
<Setter TargetName="HeaderContent" Property="FontSize" Value="18"/>
124+
125+
</DataTrigger>
126+
127+
<DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=IsSelected}" Value="False" >
128+
<Setter TargetName="HeaderContent" Property="Foreground" Value="Black"/>
129+
130+
</DataTrigger>
131+
132+
</ControlTemplate.Triggers>
115133
</ControlTemplate>
116134
</Setter.Value>
117135
</Setter>
118-
<Style.Triggers>
119-
<DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=IsSelected}" Value="True" >
120-
<Setter Property="Background" Value="{StaticResource AccentBrush}"/>
121-
<Setter Property="Foreground" Value="{StaticResource ButtonForegroundBrush}"/>
122-
<Setter Property="BorderThickness" Value="0.8 1 1 1"/>
123136

124-
</DataTrigger>
125-
<DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=IsSelected}" Value="False" >
126-
<Setter Property="Background" Value="White"/>
127-
<Setter Property="Foreground" Value="Black"/>
128-
<Setter Property="BorderThickness" Value="0"/>
129-
130-
</DataTrigger>
131-
</Style.Triggers>
132137

133138
</Style>
134-
<Style TargetType="TabItem" BasedOn="{StaticResource DefaultTabItem}"/>
139+
140+
<Style TargetType="TabItem" BasedOn="{StaticResource DefaultTabHeader}"/>
141+
142+
135143

136144

137145
<local:EnumLocaleConverter x:Key="EnumLocaleConverter"/>

Source/HDRProfile/ApplicationItem.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ public class ApplicationItem : BaseViewModel, IEquatable<ApplicationItem>
1919
private System.Drawing.Bitmap icon = null;
2020
private bool _restartProcess = false;
2121

22-
2322
public string DisplayName { get => displayName; set { displayName = value; OnPropertyChanged(); } }
2423
public string ApplicationName { get => _applicationName; set { _applicationName = value; OnPropertyChanged(); } }
2524
public string ApplicationFilePath { get => _applicationFilePath; set { _applicationFilePath = value; try { Icon = System.Drawing.Icon.ExtractAssociatedIcon(value).ToBitmap(); } catch { } OnPropertyChanged(); } }
@@ -66,5 +65,10 @@ public override int GetHashCode()
6665
{
6766
return !(left == right);
6867
}
68+
69+
public override string ToString()
70+
{
71+
return $"{DisplayName} [{ApplicationName} |{ApplicationFilePath}]";
72+
}
6973
}
7074
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Text;
5+
using System.Threading.Tasks;
6+
7+
namespace HDRProfile
8+
{
9+
public enum ApplicationState
10+
{
11+
None,
12+
Running,
13+
Focused
14+
}
15+
}

Source/HDRProfile/HDRProfile.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@
155155
<Generator>MSBuild:Compile</Generator>
156156
<SubType>Designer</SubType>
157157
</ApplicationDefinition>
158+
<Compile Include="ApplicationState.cs" />
158159
<Compile Include="Tools.cs" />
159160
<Compile Include="TrayMenuHelper.cs" />
160161
<Page Include="HDRProfileSettingsView.xaml">

Source/HDRProfile/HDRProfileHandler.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,6 @@ private void UpdateHDRBasedOnCurrentApplication()
444444
}
445445
}
446446

447-
448447
private void CheckIfRestartIsNecessary(IDictionary<ApplicationItem, bool> applicationStates)
449448
{
450449
Dictionary<ApplicationItem, bool> newLastStates = new Dictionary<ApplicationItem, bool>();

0 commit comments

Comments
 (0)