Browse Source

Gui alpha version 🎨

pull/17/head
oZ-Zo 5 years ago
parent
commit
c5a8507c64
  1. 45
      Hamburger Icons.txt
  2. 24
      W10SS_GUI_2/W10SS_GUI/Controls/ToggleSwitch.xaml
  3. 2
      W10SS_GUI_2/W10SS_GUI/Controls/TogglesCategoryPanel.xaml
  4. 2
      W10SS_GUI_2/W10SS_GUI/Localized/EN.xaml
  5. 118
      W10SS_GUI_2/W10SS_GUI/MainWindow.xaml
  6. 14
      W10SS_GUI_2/W10SS_GUI/Resource/Animations.xaml
  7. 18
      W10SS_GUI_2/W10SS_GUI/Resource/controlsSize.xaml
  8. 2
      W10SS_GUI_2/W10SS_GUI/Resource/icons.xaml

45
Hamburger Icons.txt

@ -1,45 +0,0 @@
"Privacy & Telemetry" U+F103
"UI & Personalization" U+E771
"OneDrive" U+E754
"System" U+E770
"Start Menu" U+ECA5
"UWP Apps" U+E8D9
"Windows Game Recording" U+E7FC;
"Task Scheduler" U+E823
"Microsoft Defender" U+E83D
"Context Menu" U+E292
Сменить язык U+F2B7
Перейти на Github U+E71B
Применить U+E8FB
Сохранить U+E74E
Загрузить U+E896
--------------------------------------
Конфиденциальность и телеметрия
UI и персонализация
OneDrive
Система
Меню "Пуск"
UWP-приложения
Запись и трансляция игр Windows
Планировщик заданий
Microsoft Defender
Контекстное меню
Text="{Binding RelativeSource={RelativeSource AncestorType={x:Type UserControl}}, Path=Icon}"
Text="{Binding RelativeSource={RelativeSource AncestorType={x:Type UserControl}}, Path=Text}"

24
W10SS_GUI_2/W10SS_GUI/Controls/ToggleSwitch.xaml

@ -5,7 +5,7 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:W10SS_GUI.Controls" xmlns:local="clr-namespace:W10SS_GUI.Controls"
mc:Ignorable="d" mc:Ignorable="d"
d:DesignHeight="{StaticResource toggleSwitchHeight}" d:DesignWidth="{StaticResource toggleSwitchWidth}"> d:DesignHeight="{StaticResource toggleSwitchHeight}" d:DesignWidth="{StaticResource toggleSwitchMinWidth}">
<UserControl.Resources> <UserControl.Resources>
<!--#region Brushes --> <!--#region Brushes -->
@ -176,26 +176,12 @@
</Style> </Style>
<!--#endregion Toggle Switch Style--> <!--#endregion Toggle Switch Style-->
<!--#region Toggle Background Hover-->
<!--<Style TargetType="Grid">
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="{DynamicResource colorToggleBackgroundHover}"/>
</Trigger>
<Trigger Property="IsMouseOver" Value="False">
<Setter Property="Background" Value="{DynamicResource colorToggleBackground}"/>
</Trigger>
</Style.Triggers>
</Style>-->
<!--#endregion Toggle Background Hover-->
</UserControl.Resources> </UserControl.Resources>
<Grid Name="gridToggleSwitch" <Grid Name="gridToggleSwitch"
Width="{StaticResource toggleSwitchWidth}" MinWidth="{StaticResource toggleSwitchMinWidth}"
Height="{StaticResource toggleSwitchHeight}" Height="{StaticResource toggleSwitchHeight}"
HorizontalAlignment="Left" Margin="10 0 10 0"
Margin="{Binding RelativeSource={RelativeSource AncestorType={x:Type UserControl}}, Path=Margin}"
MouseEnter="GridToggleSwitch_MouseEnter" MouseLeave="GridToggleSwitch_MouseLeave" MouseEnter="GridToggleSwitch_MouseEnter" MouseLeave="GridToggleSwitch_MouseLeave"
> >
@ -217,8 +203,7 @@
FontSize="{StaticResource fontSizeToggleSwitchHeader}" FontSize="{StaticResource fontSizeToggleSwitchHeader}"
TextWrapping="Wrap" TextWrapping="Wrap"
Text="{Binding RelativeSource={RelativeSource AncestorType={x:Type UserControl}}, Path=Header}" Text="{Binding RelativeSource={RelativeSource AncestorType={x:Type UserControl}}, Path=Header}"
MaxHeight="{StaticResource toggleSwitchHeaderMaxHeight}" MaxHeight="{StaticResource toggleSwitchHeaderMaxHeight}"/>
MaxWidth="{StaticResource toggleSwitchTextMaxWidth}"/>
<TextBlock Name="textToggleSwitchDescription" <TextBlock Name="textToggleSwitchDescription"
FontFamily="{StaticResource fontToggleSwitchDescription}" FontFamily="{StaticResource fontToggleSwitchDescription}"
@ -226,7 +211,6 @@
Foreground="{DynamicResource colorToggleDescription}" Foreground="{DynamicResource colorToggleDescription}"
Padding="0 3 0 3" Padding="0 3 0 3"
MaxHeight="{StaticResource toggleSwitchDescriptionMaxHeight}" MaxHeight="{StaticResource toggleSwitchDescriptionMaxHeight}"
MaxWidth="{StaticResource toggleSwitchTextMaxWidth}"
TextWrapping="Wrap" TextWrapping="Wrap"
Text="{Binding RelativeSource={RelativeSource AncestorType={x:Type UserControl}}, Path=Description}" /> Text="{Binding RelativeSource={RelativeSource AncestorType={x:Type UserControl}}, Path=Description}" />
</StackPanel> </StackPanel>

2
W10SS_GUI_2/W10SS_GUI/Controls/TogglesCategoryPanel.xaml

@ -11,7 +11,7 @@
Width="{Binding RelativeSource={RelativeSource AncestorType={x:Type UserControl}}, Path=Width}" Width="{Binding RelativeSource={RelativeSource AncestorType={x:Type UserControl}}, Path=Width}"
Tag="{Binding RelativeSource={RelativeSource AncestorType={x:Type UserControl}}, Path=Tag}" Tag="{Binding RelativeSource={RelativeSource AncestorType={x:Type UserControl}}, Path=Tag}"
Orientation="Vertical" Orientation="Vertical"
Background="{DynamicResource windowBackground}"> Background="{DynamicResource colorWindowBackground}">
<StackPanel Name="panelTogglesHeader" <StackPanel Name="panelTogglesHeader"
Height="{StaticResource togglesCategoryPanelHeaderHeight}" Height="{StaticResource togglesCategoryPanelHeaderHeight}"

2
W10SS_GUI_2/W10SS_GUI/Localized/EN.xaml

@ -17,5 +17,7 @@
<system:String x:Key="textHamburgerApply">Apply Settings</system:String> <system:String x:Key="textHamburgerApply">Apply Settings</system:String>
<system:String x:Key="textHamburgerSave">Save Settings</system:String> <system:String x:Key="textHamburgerSave">Save Settings</system:String>
<system:String x:Key="textHamburgerLoad">Load Settings</system:String> <system:String x:Key="textHamburgerLoad">Load Settings</system:String>
<system:String x:Key="textHamburgerLanguage">Change Language</system:String>
<system:String x:Key="textHamburgerOpenGithub">Follow to GitHub</system:String>
</ResourceDictionary> </ResourceDictionary>

118
W10SS_GUI_2/W10SS_GUI/MainWindow.xaml

@ -12,12 +12,14 @@
Height="{StaticResource windowHeight}" Height="{StaticResource windowHeight}"
Width="{StaticResource windowWidth}" Width="{StaticResource windowWidth}"
FontFamily="{StaticResource fontWindow}" FontFamily="{StaticResource fontWindow}"
FontSize="{DynamicResource windowFontSize}" TextOptions.TextFormattingMode="Display" FontSize="{DynamicResource windowFontSize}"
WindowStartupLocation="CenterScreen" SnapsToDevicePixels="True" WindowStartupLocation="CenterScreen"
ResizeMode="CanResize" ShowInTaskbar="True" SnapsToDevicePixels="True"
ResizeMode="CanResize"
ShowInTaskbar="True"
Background="{DynamicResource colorWindowBackground}" Background="{DynamicResource colorWindowBackground}"
Foreground="{DynamicResource colorWindowForeground}" Foreground="{DynamicResource colorWindowForeground}"
Initialized="Window_Initialized" SizeToContent="WidthAndHeight"> Initialized="Window_Initialized" SizeToContent="Manual">
<Window.Style> <Window.Style>
<Style TargetType="{x:Type Window}"> <Style TargetType="{x:Type Window}">
<Setter Property="TextOptions.TextFormattingMode" Value="Display"/> <Setter Property="TextOptions.TextFormattingMode" Value="Display"/>
@ -26,19 +28,18 @@
</Window.Style> </Window.Style>
<Grid Name="gridWindow"> <Grid Name="gridWindow">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<!--#region Hamburger Panel--> <!--#region Hamburger Panel-->
<Canvas Name="panelHamburger" <Canvas Name="panelHamburger"
Grid.Column="0"
MinWidth="{StaticResource panelHamburgerMinWidth}" MinWidth="{StaticResource panelHamburgerMinWidth}"
Width="{StaticResource panelHamburgerMinWidth}" Width="{StaticResource panelHamburgerMinWidth}"
MaxWidth="{StaticResource panelHamburgerMaxWidth}" MaxWidth="{StaticResource panelHamburgerMaxWidth}"
Background="{DynamicResource colorButtonHamburgerBackground}" Background="{DynamicResource colorButtonHamburgerBackground}"
HorizontalAlignment="Left"> HorizontalAlignment="Left"
Panel.ZIndex="10">
<Canvas.Effect>
<DropShadowEffect Direction="380" BlurRadius="10" Opacity="0.6"/>
</Canvas.Effect>
<Canvas.Triggers> <Canvas.Triggers>
<EventTrigger RoutedEvent="MouseEnter"> <EventTrigger RoutedEvent="MouseEnter">
<BeginStoryboard Storyboard="{StaticResource animationHamburgerOpen}"/> <BeginStoryboard Storyboard="{StaticResource animationHamburgerOpen}"/>
@ -150,18 +151,60 @@
TextMargin="0 0 10 3" TextMargin="0 0 10 3"
Canvas.Bottom="80" Canvas.Left="0"/> Canvas.Bottom="80" Canvas.Left="0"/>
<uc:HamburgerCategoryButton x:Name="buttonHamburgerLanguageSettings"
Icon="{StaticResource iconHamburgerLanguageSettings}"
Text="{DynamicResource textHamburgerLanguage}"
Width="{Binding ElementName=panelHamburger, Path=Width}"
TextMargin="0 0 10 3"
Canvas.Bottom="160" Canvas.Left="0"/>
<uc:HamburgerCategoryButton x:Name="buttonHamburgerOpenGithub"
Icon="{StaticResource iconHamburgerOpenGithub}"
Text="{DynamicResource textHamburgerOpenGithub}"
Width="{Binding ElementName=panelHamburger, Path=Width}"
TextMargin="0 0 10 3"
Canvas.Bottom="200" Canvas.Left="0"/>
</Canvas> </Canvas>
<!--#endregion Hamburger Panel--> <!--#endregion Hamburger Panel-->
<!--#region Toggles Category Panels --> <!--#region Toggles Header-->
<Grid Name="gridTogglesCategoryPanels"
Grid.Column="1"
VerticalAlignment="Top">
<StackPanel> <StackPanel Name="panelTogglesHeader"
Height="{StaticResource togglesCategoryPanelHeaderHeight}"
Orientation="Horizontal"
VerticalAlignment="Top"
Margin="40 0 0 0">
<uc:ToggleSwitch <TextBlock Name="iconTogglesHeader"
Icon="&#xE196;" FontSize="{StaticResource iconTogglesCategoryPanelHeaderFontSize}"
FontFamily="{StaticResource fontToggleIcon}"
Margin="15 5 10 5"
Text="{StaticResource iconHamburgerPrivacy}"/>
<TextBlock Name="textTogglesHeader"
FontSize="{StaticResource fontSizeTogglesCategoryPanelHeader}"
FontFamily="{StaticResource fontTogglesPanelHeader}"
VerticalAlignment="Center"
Text="{DynamicResource textHamburgerPrivacy}"/>
</StackPanel>
<!--#endregion Toggles Header-->
<!--#region Toggles Category Panels-->
<ScrollViewer Name="scrollTogglesCategoryPrivacy"
Margin="40 40 0 0"
HorizontalScrollBarVisibility="Disabled"
VerticalScrollBarVisibility="Auto" >
<StackPanel Name="panelTogglesCategoryContainer">
<StackPanel Name="paneTogglesCategoryPrivacy"
Tag="{StaticResource tagCategoryPrivacy}">
<uc:ToggleSwitch Icon="&#xE196;"
Header="Change Windows Feedback frequency to Never" Header="Change Windows Feedback frequency to Never"
Description="Изменить частоту формирования отзывов на Никогда" /> Description="Изменить частоту формирования отзывов на Никогда" />
@ -179,17 +222,52 @@
Icon="&#xE909;" Icon="&#xE909;"
Header="Do not let websites provide locally relevant content by accessing language list" Header="Do not let websites provide locally relevant content by accessing language list"
Description="Не позволять веб-сайтам предоставлять местную информацию за счет доступа к списку языков"/> Description="Не позволять веб-сайтам предоставлять местную информацию за счет доступа к списку языков"/>
</StackPanel>
<uc:ToggleSwitch
Icon="&#xE196;"
Header="Change Windows Feedback frequency to Never"
Description="Изменить частоту формирования отзывов на Никогда" />
<uc:ToggleSwitch
Icon="&#xE192;"
Header="Do not allow apps to use advertising ID"
Description="Не разрешать приложениям использовать идентификатор рекламы"/>
<uc:ToggleSwitch
Icon="&#xE70C;"
Header="Do not let apps on other devices open and message apps on this device, and vice versa"
Description="Не разрешать приложениям на других устройствах запускать приложения и отправлять сообщения на этом устройстве и наоборот"/>
<uc:ToggleSwitch
Icon="&#xE909;"
Header="Do not let websites provide locally relevant content by accessing language list"
Description="Не позволять веб-сайтам предоставлять местную информацию за счет доступа к списку языков"/>
<uc:ToggleSwitch
Icon="&#xE196;"
Header="Change Windows Feedback frequency to Never"
Description="Изменить частоту формирования отзывов на Никогда" />
<uc:ToggleSwitch
Icon="&#xE192;"
Header="Do not allow apps to use advertising ID"
Description="Не разрешать приложениям использовать идентификатор рекламы"/>
<uc:ToggleSwitch
Icon="&#xE70C;"
Header="Do not let apps on other devices open and message apps on this device, and vice versa"
Description="Не разрешать приложениям на других устройствах запускать приложения и отправлять сообщения на этом устройстве и наоборот"/>
<uc:ToggleSwitch
Icon="&#xE909;"
Header="Do not let websites provide locally relevant content by accessing language list"
Description="Не позволять веб-сайтам предоставлять местную информацию за счет доступа к списку языков"/>
</StackPanel>
</Grid> </StackPanel>
<!--#endregion Toggles Category Panels -->
</ScrollViewer>
<!--#endregion TToggles Category Panels-->
</Grid> </Grid>
</Window> </Window>

14
W10SS_GUI_2/W10SS_GUI/Resource/Animations.xaml

@ -2,12 +2,20 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:W10SS_GUI.Resource"> xmlns:local="clr-namespace:W10SS_GUI.Resource">
<Storyboard x:Key="animationHamburgerOpen"> <Storyboard x:Key="animationHamburgerOpen" >
<DoubleAnimation Storyboard.TargetProperty="(FrameworkElement.Width)" To="{StaticResource panelHamburgerMaxWidth}" Duration="0:0:0.3"/> <DoubleAnimation Storyboard.TargetProperty="(FrameworkElement.Width)" To="{StaticResource panelHamburgerMaxWidth}" Duration="0:0:0.15" >
<DoubleAnimation.EasingFunction>
<SineEase EasingMode="EaseIn" />
</DoubleAnimation.EasingFunction>
</DoubleAnimation>
</Storyboard> </Storyboard>
<Storyboard x:Key="animationHamburgerClose"> <Storyboard x:Key="animationHamburgerClose">
<DoubleAnimation Storyboard.TargetProperty="(FrameworkElement.Width)" To="{StaticResource panelHamburgerMinWidth}" Duration="0:0:0.3"/> <DoubleAnimation Storyboard.TargetProperty="(FrameworkElement.Width)" To="{StaticResource panelHamburgerMinWidth}" Duration="0:0:0.30" >
<DoubleAnimation.EasingFunction>
<SineEase EasingMode="EaseInOut" />
</DoubleAnimation.EasingFunction>
</DoubleAnimation>
</Storyboard> </Storyboard>
<Storyboard x:Key="animationHamburgerApplyButtonIsEnabled" Storyboard.TargetProperty="(Panel.Background).(SolidColorBrush.Color)"> <Storyboard x:Key="animationHamburgerApplyButtonIsEnabled" Storyboard.TargetProperty="(Panel.Background).(SolidColorBrush.Color)">

18
W10SS_GUI_2/W10SS_GUI/Resource/controlsSize.xaml

@ -2,10 +2,10 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:system="clr-namespace:System;assembly=mscorlib" xmlns:system="clr-namespace:System;assembly=mscorlib"
xmlns:local="clr-namespace:W10SS_GUI.Controls"> xmlns:local="clr-namespace:W10SS_GUI.Controls">
<system:Double x:Key="windowMinHeight">863</system:Double> <system:Double x:Key="windowMinHeight">885</system:Double>
<system:Double x:Key="windowHeight">863</system:Double> <system:Double x:Key="windowHeight">885</system:Double>
<system:Double x:Key="windowMinWidth">800</system:Double> <system:Double x:Key="windowMinWidth">645</system:Double>
<system:Double x:Key="windowWidth">800</system:Double> <system:Double x:Key="windowWidth">645</system:Double>
<system:Double x:Key="windowFontSize">18</system:Double> <system:Double x:Key="windowFontSize">18</system:Double>
<system:Double x:Key="buttonHamburgerWidth">40</system:Double> <system:Double x:Key="buttonHamburgerWidth">40</system:Double>
@ -14,14 +14,16 @@
<system:Double x:Key="textHamburgerSize">16</system:Double> <system:Double x:Key="textHamburgerSize">16</system:Double>
<system:Double x:Key="panelHamburgerMinWidth">40</system:Double> <system:Double x:Key="panelHamburgerMinWidth">40</system:Double>
<system:Double x:Key="panelHamburgerWidth">220</system:Double> <system:Double x:Key="panelHamburgerWidth">200</system:Double>
<system:Double x:Key="panelHamburgerMaxWidth">220</system:Double> <system:Double x:Key="panelHamburgerMaxWidth">200</system:Double>
<system:Double x:Key="togglesCategoryPanelWidth">500</system:Double> <system:Double x:Key="togglesCategoryPanelWidth">500</system:Double>
<system:Double x:Key="togglesCategoryPanelHeaderHeight">40</system:Double> <system:Double x:Key="togglesCategoryPanelHeaderHeight">40</system:Double>
<system:Double x:Key="togglesCategoryPanelHeaderFontSize">20</system:Double> <system:Double x:Key="fontSizeTogglesCategoryPanelHeader">26</system:Double>
<system:Double x:Key="iconTogglesCategoryPanelHeaderFontSize">34</system:Double>
<system:Double x:Key="toggleSwitchWidth">550</system:Double> <system:Double x:Key="toggleSwitchMinWidth">550</system:Double>
<system:Double x:Key="toggleSwitchMaxWidth">1050</system:Double>
<system:Double x:Key="toggleSwitchHeight">100</system:Double> <system:Double x:Key="toggleSwitchHeight">100</system:Double>
<system:Double x:Key="toggleSwitchIconsFontSize">24</system:Double> <system:Double x:Key="toggleSwitchIconsFontSize">24</system:Double>
<system:Double x:Key="toggleSwitchIconsWidth">25</system:Double> <system:Double x:Key="toggleSwitchIconsWidth">25</system:Double>

2
W10SS_GUI_2/W10SS_GUI/Resource/icons.xaml

@ -15,4 +15,6 @@
<system:String x:Key="iconHamburgerApplySettings">&#xE713;</system:String> <system:String x:Key="iconHamburgerApplySettings">&#xE713;</system:String>
<system:String x:Key="iconHamburgerSaveSettings">&#xE74E;</system:String> <system:String x:Key="iconHamburgerSaveSettings">&#xE74E;</system:String>
<system:String x:Key="iconHamburgerLoadSettings">&#xE896;</system:String> <system:String x:Key="iconHamburgerLoadSettings">&#xE896;</system:String>
<system:String x:Key="iconHamburgerLanguageSettings">&#xF2B7;</system:String>
<system:String x:Key="iconHamburgerOpenGithub">&#xE128;</system:String>
</ResourceDictionary> </ResourceDictionary>
Loading…
Cancel
Save