Browse Source

Gui alpha version 🎨

pull/17/head
oZ-Zo 5 years ago
parent
commit
c5a8507c64
  1. 45
      Hamburger Icons.txt
  2. 32
      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. 146
      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}"

32
W10SS_GUI_2/W10SS_GUI/Controls/ToggleSwitch.xaml

@ -5,7 +5,7 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:W10SS_GUI.Controls"
mc:Ignorable="d"
d:DesignHeight="{StaticResource toggleSwitchHeight}" d:DesignWidth="{StaticResource toggleSwitchWidth}">
d:DesignHeight="{StaticResource toggleSwitchHeight}" d:DesignWidth="{StaticResource toggleSwitchMinWidth}">
<UserControl.Resources>
<!--#region Brushes -->
@ -174,28 +174,14 @@
</Setter.Value>
</Setter>
</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-->
<!--#endregion Toggle Switch Style-->
</UserControl.Resources>
<Grid Name="gridToggleSwitch"
Width="{StaticResource toggleSwitchWidth}"
Height="{StaticResource toggleSwitchHeight}"
HorizontalAlignment="Left"
Margin="{Binding RelativeSource={RelativeSource AncestorType={x:Type UserControl}}, Path=Margin}"
<Grid Name="gridToggleSwitch"
MinWidth="{StaticResource toggleSwitchMinWidth}"
Height="{StaticResource toggleSwitchHeight}"
Margin="10 0 10 0"
MouseEnter="GridToggleSwitch_MouseEnter" MouseLeave="GridToggleSwitch_MouseLeave"
>
@ -217,16 +203,14 @@
FontSize="{StaticResource fontSizeToggleSwitchHeader}"
TextWrapping="Wrap"
Text="{Binding RelativeSource={RelativeSource AncestorType={x:Type UserControl}}, Path=Header}"
MaxHeight="{StaticResource toggleSwitchHeaderMaxHeight}"
MaxWidth="{StaticResource toggleSwitchTextMaxWidth}"/>
MaxHeight="{StaticResource toggleSwitchHeaderMaxHeight}"/>
<TextBlock Name="textToggleSwitchDescription"
FontFamily="{StaticResource fontToggleSwitchDescription}"
FontSize="{StaticResource fontSizeToggleSwitchDescription}"
Foreground="{DynamicResource colorToggleDescription}"
Padding="0 3 0 3"
MaxHeight="{StaticResource toggleSwitchDescriptionMaxHeight}"
MaxWidth="{StaticResource toggleSwitchTextMaxWidth}"
MaxHeight="{StaticResource toggleSwitchDescriptionMaxHeight}"
TextWrapping="Wrap"
Text="{Binding RelativeSource={RelativeSource AncestorType={x:Type UserControl}}, Path=Description}" />
</StackPanel>

2
W10SS_GUI_2/W10SS_GUI/Controls/TogglesCategoryPanel.xaml

@ -11,7 +11,7 @@
Width="{Binding RelativeSource={RelativeSource AncestorType={x:Type UserControl}}, Path=Width}"
Tag="{Binding RelativeSource={RelativeSource AncestorType={x:Type UserControl}}, Path=Tag}"
Orientation="Vertical"
Background="{DynamicResource windowBackground}">
Background="{DynamicResource colorWindowBackground}">
<StackPanel Name="panelTogglesHeader"
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="textHamburgerSave">Save 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>

146
W10SS_GUI_2/W10SS_GUI/MainWindow.xaml

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

14
W10SS_GUI_2/W10SS_GUI/Resource/Animations.xaml

@ -2,12 +2,20 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:W10SS_GUI.Resource">
<Storyboard x:Key="animationHamburgerOpen">
<DoubleAnimation Storyboard.TargetProperty="(FrameworkElement.Width)" To="{StaticResource panelHamburgerMaxWidth}" Duration="0:0:0.3"/>
<Storyboard x:Key="animationHamburgerOpen" >
<DoubleAnimation Storyboard.TargetProperty="(FrameworkElement.Width)" To="{StaticResource panelHamburgerMaxWidth}" Duration="0:0:0.15" >
<DoubleAnimation.EasingFunction>
<SineEase EasingMode="EaseIn" />
</DoubleAnimation.EasingFunction>
</DoubleAnimation>
</Storyboard>
<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 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:system="clr-namespace:System;assembly=mscorlib"
xmlns:local="clr-namespace:W10SS_GUI.Controls">
<system:Double x:Key="windowMinHeight">863</system:Double>
<system:Double x:Key="windowHeight">863</system:Double>
<system:Double x:Key="windowMinWidth">800</system:Double>
<system:Double x:Key="windowWidth">800</system:Double>
<system:Double x:Key="windowMinHeight">885</system:Double>
<system:Double x:Key="windowHeight">885</system:Double>
<system:Double x:Key="windowMinWidth">645</system:Double>
<system:Double x:Key="windowWidth">645</system:Double>
<system:Double x:Key="windowFontSize">18</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="panelHamburgerMinWidth">40</system:Double>
<system:Double x:Key="panelHamburgerWidth">220</system:Double>
<system:Double x:Key="panelHamburgerMaxWidth">220</system:Double>
<system:Double x:Key="panelHamburgerWidth">200</system:Double>
<system:Double x:Key="panelHamburgerMaxWidth">200</system:Double>
<system:Double x:Key="togglesCategoryPanelWidth">500</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="toggleSwitchIconsFontSize">24</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="iconHamburgerSaveSettings">&#xE74E;</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>
Loading…
Cancel
Save