Skip to content

Portable Tool for an Ideal Windows Setup

upd. Addons Page, FlowPanel, & locales fix button style (crash - scale issue) & add checkbox

Greedeks6f750b8d9ff8
diff --git a/.Source/GTweak/App.xaml b/.Source/GTweak/App.xaml
index a6a880e1..6cc7f9a4 100644
--- a/.Source/GTweak/App.xaml
+++ b/.Source/GTweak/App.xaml
@@ -1,4 +1,4 @@
-<Application x:Class="GTweak.App"
+<Application x:Class="GTweak.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:GTweak"
@@ -29,6 +29,7 @@
<ResourceDictionary Source="Styles/Inputs/ComboBox.xaml" />
<ResourceDictionary Source="Styles/Inputs/Slider.xaml" />
<ResourceDictionary Source="Styles/Inputs/TextBox.xaml" />
+ <ResourceDictionary Source="Styles/Inputs/CheckBox.xaml" />
<ResourceDictionary Source="Styles/Page.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
diff --git a/.Source/GTweak/Assets/UserControl/FlowColumnPanel.cs b/.Source/GTweak/Assets/UserControl/FlowColumnPanel.cs
deleted file mode 100644
index fc34c88a..00000000
--- a/.Source/GTweak/Assets/UserControl/FlowColumnPanel.cs
+++ /dev/null
@@ -1,263 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Media;
-using GTweak.Utilities.Animation;
-
-namespace GTweak.Assets.UserControl
-{
- internal sealed class FlowColumnPanel : Panel
- {
- private class ColumnInfo
- {
- internal List<UIElement> Elements { get; set; } = new List<UIElement>();
- internal double Width { get; set; }
- }
-
- internal static readonly DependencyProperty HorizontalSpacingProperty = DependencyProperty.Register(nameof(HorizontalSpacing), typeof(double), typeof(FlowColumnPanel),
- new FrameworkPropertyMetadata(20.0, FrameworkPropertyMetadataOptions.AffectsArrange));
-
- internal static readonly DependencyProperty VerticalSpacingProperty = DependencyProperty.Register(nameof(VerticalSpacing), typeof(double), typeof(FlowColumnPanel),
- new FrameworkPropertyMetadata(10.0, FrameworkPropertyMetadataOptions.AffectsArrange));
-
- internal static readonly DependencyProperty ContentAlignmentProperty = DependencyProperty.Register(nameof(ContentAlignment), typeof(HorizontalAlignment), typeof(FlowColumnPanel),
- new FrameworkPropertyMetadata(HorizontalAlignment.Left, FrameworkPropertyMetadataOptions.AffectsArrange));
-
- internal static readonly DependencyProperty UseMasonryLayoutProperty = DependencyProperty.Register(nameof(UseMasonryLayout), typeof(bool), typeof(FlowColumnPanel),
- new FrameworkPropertyMetadata(true, FrameworkPropertyMetadataOptions.AffectsArrange | FrameworkPropertyMetadataOptions.AffectsMeasure));
-
- internal double HorizontalSpacing
- {
- get => (double)GetValue(HorizontalSpacingProperty);
- set => SetValue(HorizontalSpacingProperty, value);
- }
-
- internal double VerticalSpacing
- {
- get => (double)GetValue(VerticalSpacingProperty);
- set => SetValue(VerticalSpacingProperty, value);
- }
-
- internal HorizontalAlignment ContentAlignment
- {
- get => (HorizontalAlignment)GetValue(ContentAlignmentProperty);
- set => SetValue(ContentAlignmentProperty, value);
- }
-
- internal bool UseMasonryLayout
- {
- get => (bool)GetValue(UseMasonryLayoutProperty);
- set => SetValue(UseMasonryLayoutProperty, value);
- }
-
- protected override Size MeasureOverride(Size availableSize)
- {
- var visibleChildren = InternalChildren.Cast<UIElement>()
- .Where(c => c != null && c.Visibility != Visibility.Collapsed)
- .ToList();
-
- if (visibleChildren.Count == 0)
- {
- return new Size(0, 0);
- }
-
- double availableWidth = double.IsInfinity(availableSize.Width) ? 1200 : availableSize.Width;
- double availableHeight = double.IsInfinity(availableSize.Height) ? 800 : availableSize.Height;
-
- foreach (UIElement child in visibleChildren)
- {
- child.Measure(new Size(double.PositiveInfinity, double.PositiveInfinity));
- }
-
- double neededHeight = CalculateNeededHeight(availableWidth, double.PositiveInfinity, visibleChildren);
-
-
- return new Size(availableWidth, neededHeight);
- }
-
- protected override Size ArrangeOverride(Size finalSize)
- {
- var visibleChildren = InternalChildren.Cast<UIElement>()
- .Where(c => c != null && c.Visibility != Visibility.Collapsed)
- .ToList();
-
- if (visibleChildren?.Count == 0)
- {
- return new Size(0, 0);
- }
-
- var columns = CreateOptimalColumns(finalSize.Width, finalSize.Height, visibleChildren);
- ArrangeAligned(columns ?? new List<ColumnInfo>(), finalSize.Width);
-
- return finalSize;
- }
-
- private void ArrangeAligned(List<ColumnInfo> columns, double availableWidth)
- {
- if (columns?.Count == 0)
- {
- return;
- }
-
- double contentWidth = (columns?.Sum(c => c.Width) ?? 0) + Math.Max(0, (columns?.Count ?? 0) - 1) * HorizontalSpacing;
- double extraSpace = Math.Max(0, availableWidth - contentWidth);
- double xStart = ContentAlignment switch
- {
- HorizontalAlignment.Center => (availableWidth - contentWidth) / 2.0,
- HorizontalAlignment.Right => availableWidth - contentWidth,
- _ => 0
- };
-
- double x = xStart;
-
- for (int i = 0; i < columns?.Count; i++)
- {
- var column = columns[i];
- if (column?.Elements == null || column?.Elements.Count == 0)
- {
- x += column?.Width ?? 0.0;
- x += HorizontalSpacing;
- continue;
- }
-
- double shift = (columns != null && i > 0 && columns.Count > 1) ? (extraSpace * (i / (double)(columns.Count - 1)) * 0.3) : 0;
- double columnX = x + shift;
- double y = 0;
-
- foreach (var child in column?.Elements)
- {
- if (child.Visibility == Visibility.Collapsed)
- {
- continue;
- }
-
- if (!(child.RenderTransform is TranslateTransform transform))
- {
- transform = new TranslateTransform(0, 0);
- child.RenderTransform = transform;
- }
-
- child.Arrange(new Rect(columnX, y, child.DesiredSize.Width, child.DesiredSize.Height));
-
- transform.BeginAnimation(TranslateTransform.XProperty, FactoryAnimation.CreateIn(transform.X, 0, 0.30, null, false, true));
- transform.BeginAnimation(TranslateTransform.YProperty, FactoryAnimation.CreateIn(transform.Y, 0, 0.30, null, false, true));
-
- y += child.DesiredSize.Height + VerticalSpacing;
- }
-
- x += column.Width + HorizontalSpacing;
- }
- }
-
-
- private double CalculateNeededHeight(double availableWidth, double availableHeight, List<UIElement> visibleChildren)
- {
- var columns = CreateOptimalColumns(availableWidth, availableHeight, visibleChildren);
- return CalculateMaxColumnHeight(columns);
- }
-
- private double CalculateMaxColumnHeight(List<ColumnInfo> columns)
- {
- if (columns?.Count == 0)
- {
- return 0;
- }
-
- return columns.Max(column =>
- {
- if (column?.Elements == null)
- {
- return 0;
- }
-
- double h = 0;
- foreach (var child in column?.Elements)
- {
- if (child.Visibility == Visibility.Collapsed)
- {
- continue;
- }
-
- h += child.DesiredSize.Height + (h > 0 ? VerticalSpacing : 0);
- }
- return h;
- });
- }
-
- private List<ColumnInfo> CreateOptimalColumns(double availableWidth, double availableHeight, List<UIElement> visibleChildren)
- {
- if (visibleChildren?.Count == 0)
- {
- return new List<ColumnInfo>();
- }
-
- int maxPossibleColumns = Math.Max(1, (int)(availableWidth / 100));
-
- for (int columnCount = maxPossibleColumns; columnCount >= 1; columnCount--)
- {
- var columns = TryDistributeToColumns(columnCount, availableHeight, visibleChildren);
- if (columns != null && CalculateTotalWidth(columns) <= availableWidth)
- {
- return columns;
- }
- }
-
- return CreateSingleColumn(visibleChildren);
- }
-
- private List<ColumnInfo> TryDistributeToColumns(int columnCount, double maxHeight, List<UIElement> visibleChildren)
- {
- var columns = Enumerable.Range(0, columnCount).Select(_ => new ColumnInfo()).ToList();
-
- if (UseMasonryLayout)
- {
- double[] heights = new double[columnCount];
-
- foreach (UIElement child in visibleChildren)
- {
- int minIndex = Array.IndexOf(heights, heights.Min());
- double h = child.DesiredSize.Height;
- double newHeight = heights[minIndex] + (heights[minIndex] > 0 ? VerticalSpacing : 0) + h;
-
- if (newHeight > maxHeight)
- {
- return null;
- }
-
- columns[minIndex].Elements.Add(child);
- columns[minIndex].Width = Math.Max(columns[minIndex].Width, child.DesiredSize.Width);
- heights[minIndex] = newHeight;
- }
- }
- else
- {
- int index = 0;
- foreach (UIElement child in visibleChildren)
- {
- int colIndex = index % columnCount;
- columns[colIndex].Elements.Add(child);
- columns[colIndex].Width = Math.Max(columns[colIndex].Width, child.DesiredSize.Width);
- index++;
- }
- }
-
- return columns;
- }
-
-
- private List<ColumnInfo> CreateSingleColumn(List<UIElement> visibleChildren)
- {
- var col = new ColumnInfo();
- foreach (UIElement child in visibleChildren)
- {
- col.Elements.Add(child);
- col.Width = Math.Max(col.Width, child.DesiredSize.Width);
- }
- return new List<ColumnInfo> { col };
- }
-
- private double CalculateTotalWidth(List<ColumnInfo> columns) => (columns?.Sum(c => c.Width) ?? 0) + Math.Max(0, (columns?.Count ?? 0) - 1) * HorizontalSpacing;
- }
-}
diff --git a/.Source/GTweak/Assets/UserControl/FlowPanel.cs b/.Source/GTweak/Assets/UserControl/FlowPanel.cs
new file mode 100644
index 00000000..6efdb1bf
--- /dev/null
+++ b/.Source/GTweak/Assets/UserControl/FlowPanel.cs
@@ -0,0 +1,443 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Media;
+using GTweak.Utilities.Animation;
+
+namespace GTweak.Assets.UserControl
+{
+ internal sealed class FlowPanel : Panel
+ {
+ private class FlowItemGroup
+ {
+ internal List<UIElement> Elements { get; set; } = new List<UIElement>();
+ internal double Width { get; set; }
+ internal double Height { get; set; }
+ }
+
+ internal enum FlowOrientation
+ {
+ Unset = 0,
+ Vertical = 1,
+ Horizontal = 2
+ }
+
+ internal static readonly DependencyProperty HorizontalSpacingProperty = DependencyProperty.Register(nameof(HorizontalSpacing), typeof(double), typeof(FlowPanel),
+ new FrameworkPropertyMetadata(20.0, FrameworkPropertyMetadataOptions.AffectsArrange));
+
+ internal static readonly DependencyProperty VerticalSpacingProperty = DependencyProperty.Register(nameof(VerticalSpacing), typeof(double), typeof(FlowPanel),
+ new FrameworkPropertyMetadata(10.0, FrameworkPropertyMetadataOptions.AffectsArrange));
+
+ internal static readonly DependencyProperty ContentAlignmentProperty = DependencyProperty.Register(nameof(ContentAlignment), typeof(HorizontalAlignment), typeof(FlowPanel),
+ new FrameworkPropertyMetadata(HorizontalAlignment.Left, FrameworkPropertyMetadataOptions.AffectsArrange));
+
+ internal static readonly DependencyProperty UseMasonryLayoutProperty = DependencyProperty.Register(nameof(UseMasonryLayout), typeof(bool), typeof(FlowPanel),
+ new FrameworkPropertyMetadata(true, FrameworkPropertyMetadataOptions.AffectsArrange | FrameworkPropertyMetadataOptions.AffectsMeasure));
+
+ internal static readonly DependencyProperty OrientationProperty = DependencyProperty.Register(nameof(Orientation), typeof(FlowOrientation), typeof(FlowPanel),
+ new FrameworkPropertyMetadata(FlowOrientation.Unset, FrameworkPropertyMetadataOptions.AffectsArrange | FrameworkPropertyMetadataOptions.AffectsMeasure));
+
+ internal double HorizontalSpacing
+ {
+ get => (double)GetValue(HorizontalSpacingProperty);
+ set => SetValue(HorizontalSpacingProperty, value);
+ }
+
+ internal double VerticalSpacing
+ {
+ get => (double)GetValue(VerticalSpacingProperty);
+ set => SetValue(VerticalSpacingProperty, value);
+ }
+
+ internal HorizontalAlignment ContentAlignment
+ {
+ get => (HorizontalAlignment)GetValue(ContentAlignmentProperty);
+ set => SetValue(ContentAlignmentProperty, value);
+ }
+
+ internal bool UseMasonryLayout
+ {
+ get => (bool)GetValue(UseMasonryLayoutProperty);
+ set => SetValue(UseMasonryLayoutProperty, value);
+ }
+
+ internal FlowOrientation Orientation
+ {
+ get => (FlowOrientation)GetValue(OrientationProperty);
+ set => SetValue(OrientationProperty, value);
+ }
+
+ protected override Size MeasureOverride(Size availableSize)
+ {
+ List<UIElement> visibleChildren = InternalChildren.Cast<UIElement>().Where(c => c != null && c.Visibility != Visibility.Collapsed).ToList();
+
+ if (visibleChildren.Count == 0)
+ {
+ return new Size(0, 0);
+ }
+
+ double availableWidth = double.IsInfinity(availableSize.Width) ? 1200 : availableSize.Width;
+ double availableHeight = double.IsInfinity(availableSize.Height) ? 800 : availableSize.Height;
+
+ foreach (UIElement child in visibleChildren)
+ {
+ child.Measure(new Size(double.PositiveInfinity, double.PositiveInfinity));
+ }
+
+ double neededHeight = CalculateNeededHeight(availableWidth, availableHeight, visibleChildren);
+
+ return new Size(availableWidth, neededHeight);
+ }
+
+ protected override Size ArrangeOverride(Size finalSize)
+ {
+ List<UIElement> visibleChildren = InternalChildren.Cast<UIElement>().Where(c => c != null && c.Visibility != Visibility.Collapsed).ToList();
+
+ if (visibleChildren?.Count == 0)
+ {
+ return new Size(0, 0);
+ }
+
+ List<FlowItemGroup> columns = CreateOptimalColumns(finalSize.Width, finalSize.Height, visibleChildren);
+ ArrangeAligned(columns ?? new List<FlowItemGroup>(), finalSize.Width);
+
+ return finalSize;
+ }
+
+ private void ArrangeAligned(List<FlowItemGroup> columns, double availableWidth)
+ {
+ if (columns?.Count == 0)
+ {
+ return;
+ }
+
+ if (Orientation == FlowOrientation.Horizontal)
+ {
+ double y = 0;
+ for (int i = 0; i < columns.Count; i++)
+ {
+ var row = columns[i];
+ if (row?.Elements == null || row.Elements.Count == 0)
+ {
+ y += row?.Height ?? 0;
+ y += VerticalSpacing;
+ continue;
+ }
+
+ double extraSpace = Math.Max(0, availableWidth - row.Width);
+ double xStart = ContentAlignment switch
+ {
+ HorizontalAlignment.Center => extraSpace / 2.0,
+ HorizontalAlignment.Right => extraSpace,
+ _ => 0
+ };
+
+ double x = xStart;
+ foreach (var child in row.Elements)
+ {
+ if (child.Visibility == Visibility.Collapsed)
+ {
+ continue;
+ }
+
+ if (!(child.RenderTransform is TranslateTransform transform))
+ {
+ transform = new TranslateTransform(0, 0);
+ child.RenderTransform = transform;
+ }
+
+ child.Arrange(new Rect(x, y, child.DesiredSize.Width, child.DesiredSize.Height));
+
+ transform.BeginAnimation(TranslateTransform.XProperty, FactoryAnimation.CreateIn(transform.X, 0, 0.30, null, false, true));
+ transform.BeginAnimation(TranslateTransform.YProperty, FactoryAnimation.CreateIn(transform.Y, 0, 0.30, null, false, true));
+
+ x += child.DesiredSize.Width + HorizontalSpacing;
+ }
+
+ y += row.Height + VerticalSpacing;
+ }
+
+ return;
+ }
+
+ double contentWidth = (columns?.Sum(c => c.Width) ?? 0) + Math.Max(0, (columns?.Count ?? 0) - 1) * HorizontalSpacing;
+ double extraSpaceV = Math.Max(0, availableWidth - contentWidth);
+ double xStartV = ContentAlignment switch
+ {
+ HorizontalAlignment.Center => (availableWidth - contentWidth) / 2.0,
+ HorizontalAlignment.Right => availableWidth - contentWidth,
+ _ => 0
+ };
+
+ double xV = xStartV;
+
+ for (int i = 0; i < columns.Count; i++)
+ {
+ FlowItemGroup column = columns[i];
+ if (column?.Elements == null || column.Elements.Count == 0)
+ {
+ xV += column?.Width ?? 0;
+ xV += HorizontalSpacing;
+ continue;
+ }
+
+ double shift = (Orientation == FlowOrientation.Unset && columns != null && i > 0 && columns.Count > 1) ? (extraSpaceV * (i / (double)(columns.Count - 1)) * 0.3) : 0;
+ double columnX = xV + shift;
+ double y = 0;
+
+ foreach (var child in column.Elements)
+ {
+ if (child.Visibility == Visibility.Collapsed)
+ {
+ continue;
+ }
+
+ if (!(child.RenderTransform is TranslateTransform transform))
+ {
+ transform = new TranslateTransform(0, 0);
+ child.RenderTransform = transform;
+ }
+
+ child.Arrange(new Rect(columnX, y, child.DesiredSize.Width, child.DesiredSize.Height));
+
+ transform.BeginAnimation(TranslateTransform.XProperty, FactoryAnimation.CreateIn(transform.X, 0, 0.30, null, false, true));
+ transform.BeginAnimation(TranslateTransform.YProperty, FactoryAnimation.CreateIn(transform.Y, 0, 0.30, null, false, true));
+
+ y += child.DesiredSize.Height + VerticalSpacing;
+ }
+
+ xV += column.Width + HorizontalSpacing;
+ }
+ }
+
+ private double CalculateNeededHeight(double availableWidth, double availableHeight, List<UIElement> visibleChildren)
+ {
+ List<FlowItemGroup> columns = CreateOptimalColumns(availableWidth, availableHeight, visibleChildren);
+
+ if (Orientation == FlowOrientation.Horizontal)
+ {
+ return (columns?.Sum(r => r.Height) ?? 0) + Math.Max(0, (columns?.Count ?? 0) - 1) * VerticalSpacing;
+ }
+
+ return CalculateMaxColumnHeight(columns);
+ }
+
+ private double CalculateMaxColumnHeight(List<FlowItemGroup> columns)
+ {
+ if (columns?.Count == 0)
+ {
+ return 0;
+ }
+
+ return columns.Max(column =>
+ {
+ if (column?.Elements == null)
+ {
+ return 0;
+ }
+
+ double h = 0;
+ foreach (var child in column.Elements)
+ {
+ if (child.Visibility == Visibility.Collapsed)
+ {
+ continue;
+ }
+
+ h += child.DesiredSize.Height + (h > 0 ? VerticalSpacing : 0);
+ }
+ return h;
+ });
+ }
+
+ private List<FlowItemGroup> CreateOptimalColumns(double availableWidth, double availableHeight, List<UIElement> visibleChildren)
+ {
+ if (visibleChildren?.Count == 0)
+ {
+ return new List<FlowItemGroup>();
+ }
+
+ if (Orientation == FlowOrientation.Horizontal)
+ {
+ return CreateWrappedRows(availableWidth, visibleChildren);
+ }
+
+ if (Orientation == FlowOrientation.Vertical)
+ {
+ return CreateWrappedColumns(availableHeight, visibleChildren);
+ }
+
+ int maxPossibleColumns = Math.Max(1, (int)(availableWidth / 100));
+ for (int columnCount = maxPossibleColumns; columnCount >= 1; columnCount--)
+ {
+ List<FlowItemGroup> columns = TryDistributeToColumns(columnCount, availableHeight, visibleChildren);
+ if (columns != null && CalculateTotalWidth(columns) <= availableWidth)
+ {
+ return columns;
+ }
+ }
+
+ return CreateSingleColumn(visibleChildren);
+ }
+
+ private List<FlowItemGroup> CreateWrappedRows(double maxWidth, List<UIElement> visibleChildren)
+ {
+ List<FlowItemGroup> rows = new List<FlowItemGroup>();
+ FlowItemGroup current = null;
+
+ foreach (var child in visibleChildren)
+ {
+ double childWidth = child.DesiredSize.Width;
+ double childHeight = child.DesiredSize.Height;
+
+ if (current == null)
+ {
+ current = new FlowItemGroup();
+ current.Elements.Add(child);
+ current.Width = childWidth;
+ current.Height = childHeight;
+ rows.Add(current);
+ continue;
+ }
+
+ double widthIfAdded = current.Width + (current.Width > 0 ? HorizontalSpacing : 0) + childWidth;
+
+ if (widthIfAdded <= maxWidth || current.Elements.Count == 0)
+ {
+ current.Elements.Add(child);
+ current.Width = widthIfAdded;
+ current.Height = Math.Max(current.Height, childHeight);
+ }
+ else
+ {
+ current = new FlowItemGroup();
+ current.Elements.Add(child);
+ current.Width = childWidth;
+ current.Height = childHeight;
+ rows.Add(current);
+ }
+ }
+
+ return rows;
+ }
+
+ private List<FlowItemGroup> CreateWrappedColumns(double maxHeight, List<UIElement> visibleChildren)
+ {
+ List<FlowItemGroup> cols = new List<FlowItemGroup>();
+ FlowItemGroup current = null;
+
+ foreach (var child in visibleChildren)
+ {
+ double childWidth = child.DesiredSize.Width;
+ double childHeight = child.DesiredSize.Height;
+
+ if (current == null)
+ {
+ current = new FlowItemGroup();
+ current.Elements.Add(child);
+ current.Width = childWidth;
+ current.Height = childHeight;
+ cols.Add(current);
+ continue;
+ }
+
+ double heightIfAdded = current.Height + (current.Height > 0 ? VerticalSpacing : 0) + childHeight;
+
+ if (heightIfAdded <= maxHeight || current.Elements.Count == 0)
+ {
+ current.Elements.Add(child);
+ current.Height = heightIfAdded;
+ current.Width = Math.Max(current.Width, childWidth);
+ }
+ else
+ {
+ current = new FlowItemGroup();
+ current.Elements.Add(child);
+ current.Width = childWidth;
+ current.Height = childHeight;
+ cols.Add(current);
+ }
+ }
+
+ return cols;
+ }
+
+ private List<FlowItemGroup> TryDistributeToColumns(int columnCount, double maxHeight, List<UIElement> visibleChildren)
+ {
+ List<FlowItemGroup> columns = Enumerable.Range(0, columnCount).Select(_ => new FlowItemGroup()).ToList();
+
+ if (UseMasonryLayout)
+ {
+ double[] heights = new double[columnCount];
+
+ foreach (UIElement child in visibleChildren)
+ {
+ int minIndex = Array.IndexOf(heights, heights.Min());
+ double h = child.DesiredSize.Height;
+ double newHeight = heights[minIndex] + (heights[minIndex] > 0 ? VerticalSpacing : 0) + h;
+
+ if (newHeight > maxHeight)
+ {
+ return null;
+ }
+
+ columns[minIndex].Elements.Add(child);
+ columns[minIndex].Width = Math.Max(columns[minIndex].Width, child.DesiredSize.Width);
+ heights[minIndex] = newHeight;
+ }
+
+ for (int i = 0; i < columnCount; i++)
+ {
+ columns[i].Height = heights[i];
+ }
+ }
+ else
+ {
+ int index = 0;
+ for (int i = 0; i < columnCount; i++)
+ {
+ columns[i].Width = 0;
+ columns[i].Height = 0;
+ }
+
+ foreach (UIElement child in visibleChildren)
+ {
+ int colIndex = index % columnCount;
+
+ double addedHeight = (columns[colIndex].Height > 0 ? VerticalSpacing : 0) + child.DesiredSize.Height;
+ double newHeight = columns[colIndex].Height + addedHeight;
+ if (newHeight > maxHeight)
+ {
+ return null;
+ }
+
+ columns[colIndex].Elements.Add(child);
+ columns[colIndex].Width = Math.Max(columns[colIndex].Width, child.DesiredSize.Width);
+ columns[colIndex].Height = newHeight;
+
+ index++;
+ }
+ }
+
+ return columns;
+ }
+
+ private List<FlowItemGroup> CreateSingleColumn(List<UIElement> visibleChildren)
+ {
+ FlowItemGroup col = new FlowItemGroup();
+ double totalHeight = 0;
+ foreach (UIElement child in visibleChildren)
+ {
+ col.Elements.Add(child);
+ col.Width = Math.Max(col.Width, child.DesiredSize.Width);
+ totalHeight += child.DesiredSize.Height + (totalHeight > 0 ? VerticalSpacing : 0);
+ }
+ col.Height = totalHeight;
+ return new List<FlowItemGroup> { col };
+ }
+
+ private double CalculateTotalWidth(List<FlowItemGroup> columns) => (columns?.Sum(c => c.Width) ?? 0) + Math.Max(0, (columns?.Count ?? 0) - 1) * HorizontalSpacing;
+ }
+}
\ No newline at end of file
diff --git a/.Source/GTweak/Core/Model/AddonsModel.cs b/.Source/GTweak/Core/Model/AddonsModel.cs
index b2eacafc..a9b35609 100644
--- a/.Source/GTweak/Core/Model/AddonsModel.cs
+++ b/.Source/GTweak/Core/Model/AddonsModel.cs
@@ -1,9 +1,3 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
namespace GTweak.Core.Model
{
internal class AddonsModel
diff --git a/.Source/GTweak/GTweak.csproj b/.Source/GTweak/GTweak.csproj
index 1138e34e..f41b50d4 100644
--- a/.Source/GTweak/GTweak.csproj
+++ b/.Source/GTweak/GTweak.csproj
@@ -134,7 +134,7 @@
<Compile Include="Assets\UserControl\DescriptionBlock.xaml.cs">
<DependentUpon>DescriptionBlock.xaml</DependentUpon>
</Compile>
- <Compile Include="Assets\UserControl\FlowColumnPanel.cs" />
+ <Compile Include="Assets\UserControl\FlowPanel.cs" />
<Compile Include="Core\Base\ViewModelPageBase.cs" />
<Compile Include="Core\Model\AddonsModel.cs" />
<Compile Include="Core\Model\ConfidentialityModel.cs" />
@@ -299,6 +299,10 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
+ <Page Include="Styles\Inputs\CheckBox.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </Page>
<Page Include="Styles\Display\Images.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
diff --git a/.Source/GTweak/Languages/en/Localize.xaml b/.Source/GTweak/Languages/en/Localize.xaml
index 97f54a8a..23599e89 100644
--- a/.Source/GTweak/Languages/en/Localize.xaml
+++ b/.Source/GTweak/Languages/en/Localize.xaml
@@ -480,6 +480,11 @@
<!--#endregion-->
<!--#region Addons Page -->
+ <v:String x:Key="btn_open_dir">Select folder</v:String>
+ <v:String x:Key="btn_run">Run</v:String>
+ <v:String x:Key="chk_run_ti_adds">Run as TrustedInstaller</v:String>
+ <v:String x:Key="text_info_adds">Select a directory or make sure it is not empty</v:String>
+ <v:String x:Key="scripts_info_adds">After that, you will be able to run scripts (.ps1, .cmd, .bat, .reg) on this page</v:String>
<!--#endregion-->
</ResourceDictionary>
\ No newline at end of file
diff --git a/.Source/GTweak/Languages/fr/Localize.xaml b/.Source/GTweak/Languages/fr/Localize.xaml
index 7a290446..f62f35a4 100644
--- a/.Source/GTweak/Languages/fr/Localize.xaml
+++ b/.Source/GTweak/Languages/fr/Localize.xaml
@@ -481,8 +481,14 @@
<!--#endregion-->
<!--#region Addons Page -->
+ <v:String x:Key="btn_open_dir">Select folder</v:String>
+ <v:String x:Key="btn_run">Run</v:String>
+ <v:String x:Key="chk_run_ti_adds">Run as TrustedInstaller</v:String>
+ <v:String x:Key="text_info_adds">Select a directory or make sure it is not empty</v:String>
+ <v:String x:Key="scripts_info_adds">After that, you will be able to run scripts (.ps1, .cmd, .bat, .reg) on this page</v:String>
<!--#endregion-->
</ResourceDictionary>
+
diff --git a/.Source/GTweak/Languages/hu/Localize.xaml b/.Source/GTweak/Languages/hu/Localize.xaml
index c6a2fb72..a7dd9d6b 100644
--- a/.Source/GTweak/Languages/hu/Localize.xaml
+++ b/.Source/GTweak/Languages/hu/Localize.xaml
@@ -480,8 +480,14 @@
<!--#endregion-->
<!--#region Addons Page -->
+ <v:String x:Key="btn_open_dir">Select folder</v:String>
+ <v:String x:Key="btn_run">Run</v:String>
+ <v:String x:Key="chk_run_ti_adds">Run as TrustedInstaller</v:String>
+ <v:String x:Key="text_info_adds">Select a directory or make sure it is not empty</v:String>
+ <v:String x:Key="scripts_info_adds">After that, you will be able to run scripts (.ps1, .cmd, .bat, .reg) on this page</v:String>
<!--#endregion-->
-
+
</ResourceDictionary>
+
diff --git a/.Source/GTweak/Languages/it/Localize.xaml b/.Source/GTweak/Languages/it/Localize.xaml
index 59fe21b1..d094b3d4 100644
--- a/.Source/GTweak/Languages/it/Localize.xaml
+++ b/.Source/GTweak/Languages/it/Localize.xaml
@@ -480,8 +480,14 @@
<!--#endregion-->
<!--#region Addons Page -->
+ <v:String x:Key="btn_open_dir">Select folder</v:String>
+ <v:String x:Key="btn_run">Run</v:String>
+ <v:String x:Key="chk_run_ti_adds">Run as TrustedInstaller</v:String>
+ <v:String x:Key="text_info_adds">Select a directory or make sure it is not empty</v:String>
+ <v:String x:Key="scripts_info_adds">After that, you will be able to run scripts (.ps1, .cmd, .bat, .reg) on this page</v:String>
<!--#endregion-->
</ResourceDictionary>
+
diff --git a/.Source/GTweak/Languages/ko/Localize.xaml b/.Source/GTweak/Languages/ko/Localize.xaml
index 0a8fd663..7aa69350 100644
--- a/.Source/GTweak/Languages/ko/Localize.xaml
+++ b/.Source/GTweak/Languages/ko/Localize.xaml
@@ -480,8 +480,14 @@
<!--#endregion-->
<!--#region Addons Page -->
+ <v:String x:Key="btn_open_dir">Select folder</v:String>
+ <v:String x:Key="btn_run">Run</v:String>
+ <v:String x:Key="chk_run_ti_adds">Run as TrustedInstaller</v:String>
+ <v:String x:Key="text_info_adds">Select a directory or make sure it is not empty</v:String>
+ <v:String x:Key="scripts_info_adds">After that, you will be able to run scripts (.ps1, .cmd, .bat, .reg) on this page</v:String>
<!--#endregion-->
</ResourceDictionary>
+
diff --git a/.Source/GTweak/Languages/pl/Localize.xaml b/.Source/GTweak/Languages/pl/Localize.xaml
index 2bf6e0c4..c6651f47 100644
--- a/.Source/GTweak/Languages/pl/Localize.xaml
+++ b/.Source/GTweak/Languages/pl/Localize.xaml
@@ -469,7 +469,13 @@
<!--#endregion-->
<!--#region Addons Page -->
+ <v:String x:Key="btn_open_dir">Select folder</v:String>
+ <v:String x:Key="btn_run">Run</v:String>
+ <v:String x:Key="chk_run_ti_adds">Run as TrustedInstaller</v:String>
+ <v:String x:Key="text_info_adds">Select a directory or make sure it is not empty</v:String>
+ <v:String x:Key="scripts_info_adds">After that, you will be able to run scripts (.ps1, .cmd, .bat, .reg) on this page</v:String>
<!--#endregion-->
</ResourceDictionary>
+
diff --git a/.Source/GTweak/Languages/pt-br/Localize.xaml b/.Source/GTweak/Languages/pt-br/Localize.xaml
index 1c6830fd..2c5f236e 100644
--- a/.Source/GTweak/Languages/pt-br/Localize.xaml
+++ b/.Source/GTweak/Languages/pt-br/Localize.xaml
@@ -480,7 +480,13 @@
<!--#endregion-->
<!--#region Addons Page -->
+ <v:String x:Key="btn_open_dir">Select folder</v:String>
+ <v:String x:Key="btn_run">Run</v:String>
+ <v:String x:Key="chk_run_ti_adds">Run as TrustedInstaller</v:String>
+ <v:String x:Key="text_info_adds">Select a directory or make sure it is not empty</v:String>
+ <v:String x:Key="scripts_info_adds">After that, you will be able to run scripts (.ps1, .cmd, .bat, .reg) on this page</v:String>
<!--#endregion-->
</ResourceDictionary>
+
diff --git a/.Source/GTweak/Languages/ru/Localize.xaml b/.Source/GTweak/Languages/ru/Localize.xaml
index 93900cd3..1c3f28ed 100644
--- a/.Source/GTweak/Languages/ru/Localize.xaml
+++ b/.Source/GTweak/Languages/ru/Localize.xaml
@@ -480,6 +480,12 @@
<!--#endregion-->
<!--#region Addons Page -->
+ <v:String x:Key="btn_open_dir">Выбрать папку</v:String>
+ <v:String x:Key="btn_run">Выполнить</v:String>
+ <v:String x:Key="chk_run_ti_adds">Запуск от имени TrustedInstaller</v:String>
+ <v:String x:Key="text_info_adds">Выберите директорию или убедитесь, что она не пуста</v:String>
+ <v:String x:Key="scripts_info_adds">После этого вы сможете запускать скрипты (.ps1, .cmd, .bat, .reg) на этой странице</v:String>
<!--#endregion-->
</ResourceDictionary>
+
diff --git a/.Source/GTweak/Languages/uk/Localize.xaml b/.Source/GTweak/Languages/uk/Localize.xaml
index 0ca2619b..46095119 100644
--- a/.Source/GTweak/Languages/uk/Localize.xaml
+++ b/.Source/GTweak/Languages/uk/Localize.xaml
@@ -480,7 +480,13 @@
<!--#endregion-->
<!--#region Addons Page -->
+ <v:String x:Key="btn_open_dir">Select folder</v:String>
+ <v:String x:Key="btn_run">Run</v:String>
+ <v:String x:Key="chk_run_ti_adds">Run as TrustedInstaller</v:String>
+ <v:String x:Key="text_info_adds">Select a directory or make sure it is not empty</v:String>
+ <v:String x:Key="scripts_info_adds">After that, you will be able to run scripts (.ps1, .cmd, .bat, .reg) on this page</v:String>
<!--#endregion-->
</ResourceDictionary>
+
diff --git a/.Source/GTweak/Styles/Buttons/Buttons.xaml b/.Source/GTweak/Styles/Buttons/Buttons.xaml
index 47e2f9d9..cfc5d64d 100644
--- a/.Source/GTweak/Styles/Buttons/Buttons.xaml
+++ b/.Source/GTweak/Styles/Buttons/Buttons.xaml
@@ -157,79 +157,66 @@
<Setter Property="FontWeight" Value="Normal"/>
<Setter Property="IsTabStop" Value="False"/>
<Setter Property="Cursor" Value="Hand"/>
- <Setter Property="FocusVisualStyle" Value="{x:Null}" />
- <Setter Property="RenderTransformOrigin" Value=".5,.5"/>
- <Setter Property="HorizontalAlignment" Value="Center"/>
- <Setter Property="VerticalAlignment" Value="Center"/>
- <Setter Property="HorizontalContentAlignment" Value="Center"/>
- <Setter Property="VerticalContentAlignment" Value="Center"/>
+ <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
<Setter Property="Padding" Value="12,6"/>
- <Setter Property="RenderTransform">
- <Setter.Value>
- <ScaleTransform ScaleX="1" ScaleY="1"/>
- </Setter.Value>
- </Setter>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
- <Grid>
- <Border x:Name="HoverBorder" CornerRadius="7" Background="{TemplateBinding Background}" Visibility="Hidden" SnapsToDevicePixels="True"/>
- <Border x:Name="MainBorder" CornerRadius="7" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="True">
- <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" RecognizesAccessKey="True"/>
+ <Grid x:Name="Root" RenderTransformOrigin="0.5,0.5">
+ <Grid.RenderTransform>
+ <ScaleTransform ScaleX="1" ScaleY="1"/>
+ </Grid.RenderTransform>
+ <Border x:Name="HoverBorder" CornerRadius="7" Background="{TemplateBinding Background}" Visibility="Hidden"/>
+ <Border x:Name="MainBorder" CornerRadius="7" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}">
+ <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
</Border>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
- <Setter TargetName="HoverBorder" Property="Visibility" Value="Visible"/>
+ <Setter TargetName="HoverBorder" Property="Visibility" Value="Visible"></Setter>
<Setter TargetName="HoverBorder" Property="Effect">
<Setter.Value>
<BlurEffect Radius="5"/>
</Setter.Value>
</Setter>
<Setter Property="Background" Value="{StaticResource Brush_Button_Hover}"/>
+ <Trigger.EnterActions>
+ <BeginStoryboard>
+ <Storyboard Timeline.DesiredFrameRate="120">
+ <DoubleAnimation Storyboard.TargetName="Root" Storyboard.TargetProperty="RenderTransform.ScaleX" To="1.02" Duration="0:0:0.2">
+ <DoubleAnimation.EasingFunction>
+ <CubicEase/>
+ </DoubleAnimation.EasingFunction>
+ </DoubleAnimation>
+ <DoubleAnimation Storyboard.TargetName="Root" Storyboard.TargetProperty="RenderTransform.ScaleY" To="1.02" Duration="0:0:0.2">
+ <DoubleAnimation.EasingFunction>
+ <CubicEase/>
+ </DoubleAnimation.EasingFunction>
+ </DoubleAnimation>
+ </Storyboard>
+ </BeginStoryboard>
+ </Trigger.EnterActions>
+ <Trigger.ExitActions>
+ <BeginStoryboard>
+ <Storyboard Timeline.DesiredFrameRate="120">
+ <DoubleAnimation Storyboard.TargetName="Root" Storyboard.TargetProperty="RenderTransform.ScaleX" To="1" Duration="0:0:0.2">
+ <DoubleAnimation.EasingFunction>
+ <CubicEase/>
+ </DoubleAnimation.EasingFunction>
+ </DoubleAnimation>
+ <DoubleAnimation Storyboard.TargetName="Root" Storyboard.TargetProperty="RenderTransform.ScaleY" To="1" Duration="0:0:0.2">
+ <DoubleAnimation.EasingFunction>
+ <CubicEase/>
+ </DoubleAnimation.EasingFunction>
+ </DoubleAnimation>
+ </Storyboard>
+ </BeginStoryboard>
+ </Trigger.ExitActions>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
- <Style.Triggers>
- <EventTrigger RoutedEvent="Button.MouseEnter">
- <EventTrigger.Actions>
- <BeginStoryboard>
- <Storyboard Timeline.DesiredFrameRate="120">
- <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleX" From="1" To="1.02" Duration="0:0:0.2">
- <DoubleAnimation.EasingFunction>
- <CubicEase/>
- </DoubleAnimation.EasingFunction>
- </DoubleAnimation>
- <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleY" From="1" To="1.02" Duration="0:0:0.2">
- <DoubleAnimation.EasingFunction>
- <CubicEase/>
- </DoubleAnimation.EasingFunction>
- </DoubleAnimation>
- </Storyboard>
- </BeginStoryboard>
- </EventTrigger.Actions>
- </EventTrigger>
- <EventTrigger RoutedEvent="Button.MouseLeave">
- <EventTrigger.Actions>
- <BeginStoryboard>
- <Storyboard Timeline.DesiredFrameRate="120">
- <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleX" From="1.02" To="1" Duration="0:0:0.2">
- <DoubleAnimation.EasingFunction>
- <CubicEase/>
- </DoubleAnimation.EasingFunction>
- </DoubleAnimation>
- <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleY" From="1.02" To="1" Duration="0:0:0.2">
- <DoubleAnimation.EasingFunction>
- <CubicEase/>
- </DoubleAnimation.EasingFunction>
- </DoubleAnimation>
- </Storyboard>
- </BeginStoryboard>
- </EventTrigger.Actions>
- </EventTrigger>
- </Style.Triggers>
</Style>
<Style x:Key="ButtonContent_Inverted" TargetType="{x:Type Button}">
@@ -239,79 +226,66 @@
<Setter Property="FontWeight" Value="Normal"/>
<Setter Property="IsTabStop" Value="False"/>
<Setter Property="Cursor" Value="Hand"/>
- <Setter Property="FocusVisualStyle" Value="{x:Null}" />
- <Setter Property="RenderTransformOrigin" Value=".5,.5"/>
- <Setter Property="HorizontalAlignment" Value="Center"/>
- <Setter Property="VerticalAlignment" Value="Center"/>
- <Setter Property="HorizontalContentAlignment" Value="Center"/>
- <Setter Property="VerticalContentAlignment" Value="Center"/>
+ <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
<Setter Property="Padding" Value="12,6"/>
- <Setter Property="RenderTransform">
- <Setter.Value>
- <ScaleTransform ScaleX="1" ScaleY="1"/>
- </Setter.Value>
- </Setter>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
- <Grid>
- <Border x:Name="HoverBorder" CornerRadius="7" Background="{TemplateBinding Background}" Visibility="Hidden" SnapsToDevicePixels="True"/>
- <Border x:Name="MainBorder" CornerRadius="7" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="True">
- <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" RecognizesAccessKey="True"/>
+ <Grid x:Name="Root" RenderTransformOrigin="0.5,0.5">
+ <Grid.RenderTransform>
+ <ScaleTransform ScaleX="1" ScaleY="1"/>
+ </Grid.RenderTransform>
+ <Border x:Name="HoverBorder" CornerRadius="7" Background="{TemplateBinding Background}" Visibility="Hidden"/>
+ <Border x:Name="MainBorder" CornerRadius="7" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}">
+ <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
</Border>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
- <Setter TargetName="HoverBorder" Property="Visibility" Value="Visible"/>
+ <Setter TargetName="HoverBorder" Property="Visibility" Value="Visible"></Setter>
<Setter TargetName="HoverBorder" Property="Effect">
<Setter.Value>
<BlurEffect Radius="5"/>
</Setter.Value>
</Setter>
<Setter Property="Background" Value="{StaticResource Brush_Button_Hover_Inverted}"/>
+ <Trigger.EnterActions>
+ <BeginStoryboard>
+ <Storyboard Timeline.DesiredFrameRate="120">
+ <DoubleAnimation Storyboard.TargetName="Root" Storyboard.TargetProperty="RenderTransform.ScaleX" To="1.02" Duration="0:0:0.2">
+ <DoubleAnimation.EasingFunction>
+ <CubicEase/>
+ </DoubleAnimation.EasingFunction>
+ </DoubleAnimation>
+ <DoubleAnimation Storyboard.TargetName="Root" Storyboard.TargetProperty="RenderTransform.ScaleY" To="1.02" Duration="0:0:0.2">
+ <DoubleAnimation.EasingFunction>
+ <CubicEase/>
+ </DoubleAnimation.EasingFunction>
+ </DoubleAnimation>
+ </Storyboard>
+ </BeginStoryboard>
+ </Trigger.EnterActions>
+ <Trigger.ExitActions>
+ <BeginStoryboard>
+ <Storyboard Timeline.DesiredFrameRate="120">
+ <DoubleAnimation Storyboard.TargetName="Root" Storyboard.TargetProperty="RenderTransform.ScaleX" To="1" Duration="0:0:0.2">
+ <DoubleAnimation.EasingFunction>
+ <CubicEase/>
+ </DoubleAnimation.EasingFunction>
+ </DoubleAnimation>
+ <DoubleAnimation Storyboard.TargetName="Root" Storyboard.TargetProperty="RenderTransform.ScaleY" To="1" Duration="0:0:0.2">
+ <DoubleAnimation.EasingFunction>
+ <CubicEase/>
+ </DoubleAnimation.EasingFunction>
+ </DoubleAnimation>
+ </Storyboard>
+ </BeginStoryboard>
+ </Trigger.ExitActions>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
- <Style.Triggers>
- <EventTrigger RoutedEvent="Button.MouseEnter">
- <EventTrigger.Actions>
- <BeginStoryboard>
- <Storyboard Timeline.DesiredFrameRate="120">
- <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleX" From="1" To="1.02" Duration="0:0:0.2">
- <DoubleAnimation.EasingFunction>
- <CubicEase/>
- </DoubleAnimation.EasingFunction>
- </DoubleAnimation>
- <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleY" From="1" To="1.02" Duration="0:0:0.2">
- <DoubleAnimation.EasingFunction>
- <CubicEase/>
- </DoubleAnimation.EasingFunction>
- </DoubleAnimation>
- </Storyboard>
- </BeginStoryboard>
- </EventTrigger.Actions>
- </EventTrigger>
- <EventTrigger RoutedEvent="Button.MouseLeave">
- <EventTrigger.Actions>
- <BeginStoryboard>
- <Storyboard Timeline.DesiredFrameRate="120">
- <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleX" From="1.02" To="1" Duration="0:0:0.2">
- <DoubleAnimation.EasingFunction>
- <CubicEase/>
- </DoubleAnimation.EasingFunction>
- </DoubleAnimation>
- <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleY" From="1.02" To="1" Duration="0:0:0.2">
- <DoubleAnimation.EasingFunction>
- <CubicEase/>
- </DoubleAnimation.EasingFunction>
- </DoubleAnimation>
- </Storyboard>
- </BeginStoryboard>
- </EventTrigger.Actions>
- </EventTrigger>
- </Style.Triggers>
</Style>
</ResourceDictionary>
\ No newline at end of file
diff --git a/.Source/GTweak/Styles/Buttons/RadioButtons.xaml b/.Source/GTweak/Styles/Buttons/RadioButtons.xaml
index 6a1473ff..f42da546 100644
--- a/.Source/GTweak/Styles/Buttons/RadioButtons.xaml
+++ b/.Source/GTweak/Styles/Buttons/RadioButtons.xaml
@@ -1,4 +1,4 @@
-<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Style TargetType="{x:Type RadioButton}" x:Key="BtnNavigation">
@@ -10,6 +10,7 @@
<Setter Property="Cursor" Value="Hand"/>
<Setter Property="HorizontalContentAlignment" Value="Center"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
+ <Setter Property="KeyboardNavigation.TabNavigation" Value="None"/>
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
<Setter Property="IsTabStop" Value="False"/>
<Setter Property="Template">
diff --git a/.Source/GTweak/Styles/Inputs/CheckBox.xaml b/.Source/GTweak/Styles/Inputs/CheckBox.xaml
new file mode 100644
index 00000000..ad505ba5
--- /dev/null
+++ b/.Source/GTweak/Styles/Inputs/CheckBox.xaml
@@ -0,0 +1,97 @@
+<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
+
+ <Style x:Key="{x:Type CheckBox}" TargetType="{x:Type CheckBox}">
+ <Setter Property="Foreground" Value="{StaticResource Brush_Highlighted}"/>
+ <Setter Property="FontSize" Value="14"/>
+ <Setter Property="FontFamily" Value="{StaticResource Jura}"/>
+ <Setter Property="Cursor" Value="Hand"/>
+ <Setter Property="Padding" Value="4"/>
+ <Setter Property="FocusVisualStyle" Value="{x:Null}" />
+ <Setter Property="IsTabStop" Value="False"/>
+ <Setter Property="RenderTransformOrigin" Value="0.5,0.5"/>
+ <Setter Property="RenderTransform">
+ <Setter.Value>
+ <ScaleTransform ScaleX="1" ScaleY="1"/>
+ </Setter.Value>
+ </Setter>
+ <Setter Property="Template">
+ <Setter.Value>
+ <ControlTemplate TargetType="CheckBox">
+ <StackPanel Orientation="Horizontal" VerticalAlignment="Center">
+ <Border x:Name="Box" Width="18" Height="18" CornerRadius="4" Background="Transparent" BorderBrush="{StaticResource Brush_Separator}" BorderThickness="1" VerticalAlignment="Center" RenderTransformOrigin="0.5,0.5">
+ <Border.RenderTransform>
+ <ScaleTransform ScaleX="1" ScaleY="1"/>
+ </Border.RenderTransform>
+ <Path x:Name="CheckMark" Width="12" Height="12" Visibility="Collapsed" Stretch="None" Data="M1,6 L5,10 L11,2" Stroke="{StaticResource Brush_Highlighted_Inverted}" StrokeThickness="2" StrokeStartLineCap="Round" StrokeEndLineCap="Round" StrokeDashArray="30" StrokeDashOffset="30"/>
+ </Border>
+ <ContentPresenter Margin="8,0,0,0" VerticalAlignment="Center"/>
+ </StackPanel>
+ <ControlTemplate.Triggers>
+ <Trigger Property="IsChecked"
+ Value="True">
+ <Trigger.EnterActions>
+ <BeginStoryboard>
+ <Storyboard Timeline.DesiredFrameRate="120">
+ <ColorAnimation Storyboard.TargetName="Box" Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)" To="{StaticResource Color_Background_CheckBox}" Duration="0:0:0.2">
+ <ColorAnimation.EasingFunction>
+ <QuadraticEase/>
+ </ColorAnimation.EasingFunction>
+ </ColorAnimation>
+ <ObjectAnimationUsingKeyFrames Storyboard.TargetName="CheckMark" Storyboard.TargetProperty="Visibility">
+ <DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Visible}"/>
+ </ObjectAnimationUsingKeyFrames>
+ <DoubleAnimation Storyboard.TargetName="CheckMark" Storyboard.TargetProperty="StrokeDashOffset" From="30" To="0" Duration="0:0:0.25">
+ <DoubleAnimation.EasingFunction>
+ <QuadraticEase/>
+ </DoubleAnimation.EasingFunction>
+ </DoubleAnimation>
+ </Storyboard>
+ </BeginStoryboard>
+ </Trigger.EnterActions>
+ <Trigger.ExitActions>
+ <BeginStoryboard>
+ <Storyboard Timeline.DesiredFrameRate="120">
+ <DoubleAnimation Storyboard.TargetName="CheckMark" Storyboard.TargetProperty="StrokeDashOffset" From="0" To="30" Duration="0:0:0.2">
+ <DoubleAnimation.EasingFunction>
+ <QuadraticEase/>
+ </DoubleAnimation.EasingFunction>
+ </DoubleAnimation>
+ <ObjectAnimationUsingKeyFrames Storyboard.TargetName="CheckMark" Storyboard.TargetProperty="Visibility" BeginTime="0:0:0.2">
+ <DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Collapsed}"/>
+ </ObjectAnimationUsingKeyFrames>
+ <ColorAnimation Storyboard.TargetName="Box" Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)" To="Transparent" Duration="0:0:0.2">
+ <ColorAnimation.EasingFunction>
+ <QuadraticEase/>
+ </ColorAnimation.EasingFunction>
+ </ColorAnimation>
+ </Storyboard>
+ </BeginStoryboard>
+ </Trigger.ExitActions>
+ </Trigger>
+ <Trigger Property="IsMouseOver" Value="True">
+ <Trigger.EnterActions>
+ <BeginStoryboard>
+ <Storyboard Timeline.DesiredFrameRate="120">
+ <ColorAnimation Storyboard.TargetName="Box" Storyboard.TargetProperty="(Border.BorderBrush).(SolidColorBrush.Color)" To="{StaticResource Color_Border_Hover_CheckBox}" Duration="0:0:0.1"/>
+ </Storyboard>
+ </BeginStoryboard>
+ </Trigger.EnterActions>
+ <Trigger.ExitActions>
+ <BeginStoryboard>
+ <Storyboard Timeline.DesiredFrameRate="120">
+ <ColorAnimation Storyboard.TargetName="Box" Storyboard.TargetProperty="(Border.BorderBrush).(SolidColorBrush.Color)" To="{StaticResource Color_Separator}" Duration="0:0:0.1"/>
+ </Storyboard>
+ </BeginStoryboard>
+ </Trigger.ExitActions>
+ </Trigger>
+ <Trigger Property="IsEnabled" Value="False">
+ <Setter Property="Opacity" Value="0.45"/>
+ </Trigger>
+ </ControlTemplate.Triggers>
+ </ControlTemplate>
+ </Setter.Value>
+ </Setter>
+ </Style>
+
+</ResourceDictionary>
diff --git a/.Source/GTweak/Styles/Themes/Dark/Colors.xaml b/.Source/GTweak/Styles/Themes/Dark/Colors.xaml
index c53b44a5..8f1f5f8c 100644
--- a/.Source/GTweak/Styles/Themes/Dark/Colors.xaml
+++ b/.Source/GTweak/Styles/Themes/Dark/Colors.xaml
@@ -3,6 +3,7 @@
<Color x:Key="Color_Accent">#7BFFB5</Color>
<Color x:Key="Color_Shadow">#1AFF7E</Color>
+ <Color x:Key="Color_Separator">#434544</Color>
<SolidColorBrush x:Key="Brush_Background" Color="#FF1E1E1E"/>
<SolidColorBrush x:Key="Brush_Accent" Color="{StaticResource Color_Accent}"/>
@@ -21,7 +22,7 @@
<SolidColorBrush x:Key="Brush_ScrollBar_Normal" Color="#494949"/>
<SolidColorBrush x:Key="Brush_ScrollBar_Hover" Color="#5b5b5b"/>
- <SolidColorBrush x:Key="Brush_Separator" Color="#434544"/>
+ <SolidColorBrush x:Key="Brush_Separator" Color="{StaticResource Color_Separator}"/>
<SolidColorBrush x:Key="Brush_Background_ComboBox" Color="#2C2E2D"/>
<SolidColorBrush x:Key="Brush_ComboBoxBorder_Hover" Color="#65ffa9"/>
@@ -53,6 +54,9 @@
<SolidColorBrush x:Key="Brush_ToggleBorder_Off" Color="{StaticResource Color_ToggleBorder_Off}"/>
+ <Color x:Key="Color_Border_Hover_CheckBox">#9B9C9C</Color>
+ <Color x:Key="Color_Background_CheckBox">#40C279</Color>
+
<sys:Double xmlns:sys="clr-namespace:System;assembly=mscorlib" x:Key="UncheckedIconOpacity">0.1</sys:Double>
<sys:Double xmlns:sys="clr-namespace:System;assembly=mscorlib" x:Key="RadialProgressOpacity">0.2</sys:Double>
diff --git a/.Source/GTweak/Styles/Themes/Light/Colors.xaml b/.Source/GTweak/Styles/Themes/Light/Colors.xaml
index 783ca610..4ad930f6 100644
--- a/.Source/GTweak/Styles/Themes/Light/Colors.xaml
+++ b/.Source/GTweak/Styles/Themes/Light/Colors.xaml
@@ -3,7 +3,8 @@
<Color x:Key="Color_Accent">#00A15A</Color>
<Color x:Key="Color_Shadow">#007A40</Color>
-
+ <Color x:Key="Color_Separator">#C8C8C8</Color>
+
<SolidColorBrush x:Key="Brush_Background" Color="#FFF3F3F3"/>
<SolidColorBrush x:Key="Brush_Accent" Color="{StaticResource Color_Accent}"/>
<SolidColorBrush x:Key="Brush_Inactive" Color="#6D6D6D"/>
@@ -21,7 +22,7 @@
<SolidColorBrush x:Key="Brush_ScrollBar_Normal" Color="#A0A0A0"/>
<SolidColorBrush x:Key="Brush_ScrollBar_Hover" Color="#8A8A8A"/>
- <SolidColorBrush x:Key="Brush_Separator" Color="#C8C8C8"/>
+ <SolidColorBrush x:Key="Brush_Separator" Color="{StaticResource Color_Separator}"/>
<SolidColorBrush x:Key="Brush_Background_ComboBox" Color="#F9F9F9"/>
<SolidColorBrush x:Key="Brush_ComboBoxBorder_Hover" Color="#008C47"/>
@@ -53,6 +54,9 @@
<SolidColorBrush x:Key="Brush_ToggleBorder_Off" Color="{StaticResource Color_ToggleBorder_Off}"/>
+ <Color x:Key="Color_Border_Hover_CheckBox">#929292</Color>
+ <Color x:Key="Color_Background_CheckBox">#00A15A</Color>
+
<sys:Double xmlns:sys="clr-namespace:System;assembly=mscorlib" x:Key="UncheckedIconOpacity">0.25</sys:Double>
<sys:Double xmlns:sys="clr-namespace:System;assembly=mscorlib" x:Key="RadialProgressOpacity">0.3</sys:Double>
diff --git a/.Source/GTweak/Utilities/Controls/SettingsEngine.cs b/.Source/GTweak/Utilities/Controls/SettingsEngine.cs
index 0e940820..86192b1f 100644
--- a/.Source/GTweak/Utilities/Controls/SettingsEngine.cs
+++ b/.Source/GTweak/Utilities/Controls/SettingsEngine.cs
@@ -35,7 +35,8 @@ namespace GTweak.Utilities.Controls
["EnableSound"] = true,
["VolumeLevel"] = 50,
["Language"] = SystemDiagnostics.GetCurrentSystemLang().Code,
- ["Theme"] = AvailableThemes.First()
+ ["Theme"] = AvailableThemes.First(),
+ ["AddonsPath"] = string.Empty,
};
private static readonly Dictionary<string, object> _cachedSettings = new Dictionary<string, object>(_defaultSettings);
@@ -43,11 +44,12 @@ namespace GTweak.Utilities.Controls
internal static bool IsViewNotification { get => (bool)_cachedSettings["EnableNotifications"]; set => ChangingParameters("EnableNotifications", value); }
internal static bool IsUpdateCheckRequired { get => (bool)_cachedSettings["EnableAutoUpdate"]; set => ChangingParameters("EnableAutoUpdate", value); }
internal static bool IsTopMost { get => (bool)_cachedSettings["EnableTopMost"]; set => ChangingParameters("EnableTopMost", value); }
+ internal static bool IsHiddenIpAddress { get => (bool)_cachedSettings["EnableIpBlur"]; set => ChangingParameters("EnableIpBlur", value); }
internal static bool IsPlayingSound { get => (bool)_cachedSettings["EnableSound"]; set => ChangingParameters("EnableSound", value); }
internal static int Volume { get => (int)_cachedSettings["VolumeLevel"]; set => ChangingParameters("VolumeLevel", value); }
internal static string Language { get => (string)_cachedSettings["Language"]; set => ChangingParameters("Language", value); }
internal static string Theme { get => (string)_cachedSettings["Theme"]; set => ChangingParameters("Theme", value); }
- internal static bool IsHiddenIpAddress { get => (bool)_cachedSettings["EnableIpBlur"]; set => ChangingParameters("EnableIpBlur", value); }
+ internal static string UserAddonsPath { get => (string)_cachedSettings["AddonsPath"]; set => ChangingParameters("AddonsPath", value); }
private static void ChangingParameters(string key, object value)
{
diff --git a/.Source/GTweak/View/AddonsView.xaml b/.Source/GTweak/View/AddonsView.xaml
index 175319fd..1280ffc0 100644
--- a/.Source/GTweak/View/AddonsView.xaml
+++ b/.Source/GTweak/View/AddonsView.xaml
@@ -3,7 +3,8 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:vm="clr-namespace:GTweak.Core.ViewModel"
+ xmlns:vm="clr-namespace:GTweak.Core.ViewModel"
+ xmlns:uc="clr-namespace:GTweak.Assets.UserControl"
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
xmlns:local="clr-namespace:GTweak.View"
mc:Ignorable="d" d:Width="1014" Style="{StaticResource LaunchPage}">
@@ -11,6 +12,47 @@
<vm:AddonsViewModel />
</UserControl.DataContext>
<Grid>
+ <Grid.RowDefinitions>
+ <RowDefinition Height="auto" />
+ <RowDefinition Height="auto" />
+ <RowDefinition Height="*" />
+ </Grid.RowDefinitions>
+
+ <uc:FlowPanel Grid.Row="0" ContentAlignment="Left" Orientation="Horizontal" HorizontalSpacing="10" VerticalSpacing="5" Margin="10,5,10,0">
+
+ <Button Style="{StaticResource ButtonContent}" HorizontalAlignment="Right" Margin="0,0,0,0">
+ <StackPanel Orientation="Horizontal" VerticalAlignment="Center">
+ <ui:SymbolIcon Symbol="FolderOpen20" FontSize="15" Margin="0,0,5,0"/>
+ <TextBlock VerticalAlignment="Center">
+ <Run Text="{DynamicResource btn_open_dir}"/><Run Text="..."/>
+ </TextBlock>
+ </StackPanel>
+ </Button>
+
+ <Button Style="{StaticResource ButtonContent_Inverted}" HorizontalAlignment="Right">
+ <StackPanel Orientation="Horizontal" VerticalAlignment="Center">
+ <ui:SymbolIcon Symbol="ArrowClockwise20" FontSize="15" Margin="0,0,5,0"/>
+ <TextBlock Text="{DynamicResource btn_upd}" VerticalAlignment="Center"/>
+ </StackPanel>
+ </Button>
+
+ <CheckBox VerticalAlignment="Top" Content="{DynamicResource chk_run_ti_adds}" Margin="0,6,0,0"/>
+
+ </uc:FlowPanel>
+
+ <Border Grid.Row="1" Background="{StaticResource Brush_Separator}" Height="1.2" Margin="10,10,10,0" CornerRadius="10" HorizontalAlignment="Stretch"/>
+
+ <Grid Grid.Row="2" HorizontalAlignment="Center" VerticalAlignment="Center">
+ <Grid.RowDefinitions>
+ <RowDefinition Height="Auto" />
+ <RowDefinition Height="Auto" />
+ </Grid.RowDefinitions>
+ <ui:SymbolIcon Symbol="DocumentFlowchart20" Foreground="{StaticResource Brush_TextBlock_Inactivity}" FontSize="55" Margin="0,0,5,0" HorizontalAlignment="Center" VerticalAlignment="Center" Grid.Row="0"/>
+ <TextBlock Width="Auto" Height="Auto" TextWrapping="Wrap" TextAlignment="Center" HorizontalAlignment="Center" VerticalAlignment="Center" FontFamily="{StaticResource Jura}" FontSize="17pt" Foreground="{StaticResource Brush_TextBlock_Inactivity}" Grid.Row="1" Margin="0,5,0,0">
+ <Run Text="{DynamicResource text_info_adds}"/><LineBreak/>
+ <Run FontSize="15pt" Text="{DynamicResource scripts_info_adds}"/>
+ </TextBlock>
+ </Grid>
</Grid>
</UserControl>
diff --git a/.Source/GTweak/View/AddonsView.xaml.cs b/.Source/GTweak/View/AddonsView.xaml.cs
index 1f10165f..b30ac845 100644
--- a/.Source/GTweak/View/AddonsView.xaml.cs
+++ b/.Source/GTweak/View/AddonsView.xaml.cs
@@ -1,17 +1,4 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using System.Windows;
using System.Windows.Controls;
-using System.Windows.Data;
-using System.Windows.Documents;
-using System.Windows.Input;
-using System.Windows.Media;
-using System.Windows.Media.Imaging;
-using System.Windows.Navigation;
-using System.Windows.Shapes;
namespace GTweak.View
{
diff --git a/.Source/GTweak/View/ConfidentialityView.xaml b/.Source/GTweak/View/ConfidentialityView.xaml
index 8fd25fa9..5338785b 100644
--- a/.Source/GTweak/View/ConfidentialityView.xaml
+++ b/.Source/GTweak/View/ConfidentialityView.xaml
@@ -1,4 +1,4 @@
-<UserControl x:Class="GTweak.View.ConfidentialityView"
+<UserControl x:Class="GTweak.View.ConfidentialityView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
@@ -29,7 +29,7 @@
<Grid Grid.Row="0">
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled">
- <uc:FlowColumnPanel VerticalSpacing="20" HorizontalSpacing="5" Margin="10">
+ <uc:FlowPanel VerticalSpacing="20" HorizontalSpacing="5" Margin="10">
<uc:ToggleButton x:Name="TglButton1" Style="{StaticResource ToggleStyle}" StateNA="{Binding [TglButton1].State}" TextResource="{DynamicResource tgl1_conf}" Description="{DynamicResource tgl1_desc_conf}" />
<uc:ToggleButton x:Name="TglButton2" Style="{StaticResource ToggleStyle}" StateNA="{Binding [TglButton2].State}" TextResource="{DynamicResource tgl2_conf}" Description="{DynamicResource tgl2_desc_conf}" />
@@ -50,7 +50,7 @@
<uc:ToggleButton x:Name="TglButton17" Visibility="{Binding NvSupportAvailable}" Style="{StaticResource ToggleStyle}" StateNA="{Binding [TglButton17].State}" TextResource="{DynamicResource tgl17_conf}" Description="{DynamicResource tgl17_desc_conf}" />
<uc:ToggleButton x:Name="TglButton18" Style="{StaticResource ToggleStyle}" StateNA="{Binding [TglButton18].State}" TextResource="{DynamicResource tgl18_conf}" Description="{DynamicResource tgl18_desc_conf}" />
- </uc:FlowColumnPanel>
+ </uc:FlowPanel>
</ScrollViewer>
</Grid>
diff --git a/.Source/GTweak/View/DataSystemView.xaml b/.Source/GTweak/View/DataSystemView.xaml
index 311fdd87..94befb88 100644
--- a/.Source/GTweak/View/DataSystemView.xaml
+++ b/.Source/GTweak/View/DataSystemView.xaml
@@ -55,7 +55,7 @@
<TextBlock Text="CPU" Foreground="{StaticResource Brush_Inactive}" Height="auto" Width="auto" TextAlignment="Center" Style="{StaticResource TextDefault}" Margin="0,15,0,0"/>
</Grid>
- <uc:FlowColumnPanel Grid.Column="1" ContentAlignment="Center" HorizontalSpacing="0" VerticalSpacing="0" VerticalAlignment="Top" Margin="30,15,30,0">
+ <uc:FlowPanel Grid.Column="1" ContentAlignment="Center" HorizontalSpacing="0" VerticalSpacing="0" VerticalAlignment="Top" Margin="30,15,30,0">
<StackPanel Orientation="Horizontal">
<Border Width="70" Height="70" HorizontalAlignment="Right" Margin="0,0,15,0">
@@ -70,11 +70,11 @@
</Border.Effect>
</Border>
<StackPanel Orientation="Vertical">
- <TextBlock Style="{StaticResource TextDefault}" FontSize="14pt" TextWrapping="Wrap" VerticalAlignment="Center" Height="Auto" MaxWidth="{Binding ActualWidth, RelativeSource={RelativeSource AncestorType=uc:FlowColumnPanel}}">
+ <TextBlock Style="{StaticResource TextDefault}" FontSize="14pt" TextWrapping="Wrap" VerticalAlignment="Center" Height="Auto" MaxWidth="{Binding ActualWidth, RelativeSource={RelativeSource AncestorType=uc:FlowPanel}}">
<Run Foreground="{StaticResource Brush_Highlighted}" Text="{Binding [OSName].Data}" PreviewMouseDown="HandleCopyingData_PreviewMouseDown" Cursor="Hand"/><LineBreak/>
<Run Foreground="{StaticResource Brush_Inactive}" Text="{Binding [OSVersion].Data}" PreviewMouseDown="HandleCopyingData_PreviewMouseDown" Cursor="Hand"/>
</TextBlock>
- <TextBlock HorizontalAlignment="Left" FontFamily="{StaticResource Jura}" FontSize="14" Foreground="{StaticResource Brush_TextBlock_Inactivity}" Margin="0,5,0,0" TextWrapping="Wrap" MaxWidth="{Binding ActualWidth, RelativeSource={RelativeSource AncestorType=uc:FlowColumnPanel}}">
+ <TextBlock HorizontalAlignment="Left" FontFamily="{StaticResource Jura}" FontSize="14" Foreground="{StaticResource Brush_TextBlock_Inactivity}" Margin="0,5,0,0" TextWrapping="Wrap" MaxWidth="{Binding ActualWidth, RelativeSource={RelativeSource AncestorType=uc:FlowPanel}}">
<Run Text="{DynamicResource label_proc_sysinfo}"/>
<InlineUIContainer>
<TextBlock anim:NumberAnimation.Value="{Binding [Processes].Data}" Text="0" Margin="0,0.5,0,0" FontFamily="{StaticResource Play}" Typography.NumeralAlignment="Tabular" Typography.NumeralStyle="Lining" FontSize="13.5"/>
@@ -88,7 +88,7 @@
</StackPanel>
</StackPanel>
- </uc:FlowColumnPanel>
+ </uc:FlowPanel>
<Grid Grid.Column="2" VerticalAlignment="Top" HorizontalAlignment="Right" Margin="10,2,15,0">
<Ellipse Height="90" Width="90" Stroke="{StaticResource Brush_Separator}" StrokeThickness="4.5" VerticalAlignment="Center" HorizontalAlignment="Center" Opacity="{StaticResource RadialProgressOpacity}">
diff --git a/.Source/GTweak/View/InterfaceView.xaml b/.Source/GTweak/View/InterfaceView.xaml
index 6ba8155f..9fd04e1a 100644
--- a/.Source/GTweak/View/InterfaceView.xaml
+++ b/.Source/GTweak/View/InterfaceView.xaml
@@ -30,7 +30,7 @@
<Grid Grid.Row="0">
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled">
- <uc:FlowColumnPanel VerticalSpacing="20" HorizontalSpacing="5" Margin="10">
+ <uc:FlowPanel VerticalSpacing="20" HorizontalSpacing="5" Margin="10">
<uc:ToggleButton x:Name="TglButton1" Style="{StaticResource ToggleStyle}" StateNA="{Binding [TglButton1].State}" TextResource="{DynamicResource tgl1_intf}" Description="{DynamicResource tgl1_desc_intf}" />
<uc:ToggleButton x:Name="TglButton2" Style="{StaticResource ToggleStyle}" StateNA="{Binding [TglButton2].State}" TextResource="{DynamicResource tgl2_intf}" Description="{DynamicResource tgl2_desc_intf}" />
@@ -67,7 +67,7 @@
<uc:ToggleButton x:Name="TglButton33" Style="{StaticResource ToggleStyle}" StateNA="{Binding [TglButton33].State}" TextResource="{DynamicResource tgl33_intf}" Description="{DynamicResource tgl33_desc_intf}" />
<uc:ToggleButton x:Name="TglButton34" Style="{StaticResource ToggleStyle}" StateNA="{Binding [TglButton34].State}" TextResource="{DynamicResource tgl34_intf}" Description="{DynamicResource tgl34_desc_intf}" />
- </uc:FlowColumnPanel>
+ </uc:FlowPanel>
</ScrollViewer>
</Grid>
diff --git a/.Source/GTweak/View/PakagesView.xaml b/.Source/GTweak/View/PakagesView.xaml
index f637846d..9e82eec1 100644
--- a/.Source/GTweak/View/PakagesView.xaml
+++ b/.Source/GTweak/View/PakagesView.xaml
@@ -58,7 +58,7 @@
<Grid Grid.Row="1">
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled">
- <uc:FlowColumnPanel UseMasonryLayout="False" HorizontalSpacing="30" Margin="10,10,0,10" HorizontalAlignment="Center" VerticalAlignment="Top">
+ <uc:FlowPanel UseMasonryLayout="False" HorizontalSpacing="30" Margin="10,10,0,10" HorizontalAlignment="Center" VerticalAlignment="Top">
<ToggleButton x:Name="MicrosoftStore" IsChecked="{Binding [MicrosoftStore].Installed}" IsEnabled="{Binding [MicrosoftStore].IsUnavailable}" ToolTip="{DynamicResource MicrosoftStore_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_MicrosoftStore}"/>
<ToggleButton x:Name="Xbox" IsChecked="{Binding [Xbox].Installed}" IsEnabled="{Binding [Xbox].IsUnavailable}" ToolTip="{DynamicResource Xbox_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_Xbox}"/>
@@ -113,7 +113,7 @@
<ToggleButton x:Name="Spotify" IsChecked="{Binding [Spotify].Installed}" IsEnabled="{Binding [Spotify].IsUnavailable}" ToolTip="{DynamicResource Spotify_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_Spotify}"/>
<ToggleButton x:Name="WhatsApp" IsChecked="{Binding [WhatsApp].Installed}" IsEnabled="{Binding [WhatsApp].IsUnavailable}" ToolTip="{DynamicResource WhatsApp_pkg}" Style="{StaticResource TglPackages}" Tag="{StaticResource Img_WhatsApp}"/>
- </uc:FlowColumnPanel>
+ </uc:FlowPanel>
</ScrollViewer>
</Grid>
diff --git a/.Source/GTweak/View/ServicesView.xaml b/.Source/GTweak/View/ServicesView.xaml
index 9f7093e6..e0cbdda5 100644
--- a/.Source/GTweak/View/ServicesView.xaml
+++ b/.Source/GTweak/View/ServicesView.xaml
@@ -1,4 +1,4 @@
-<UserControl x:Class="GTweak.View.ServicesView"
+<UserControl x:Class="GTweak.View.ServicesView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
@@ -28,7 +28,7 @@
<Grid Grid.Row="0">
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled">
- <uc:FlowColumnPanel VerticalSpacing="20" HorizontalSpacing="5" Margin="10">
+ <uc:FlowPanel VerticalSpacing="20" HorizontalSpacing="5" Margin="10">
<uc:ToggleButton x:Name="TglButton1" Style="{StaticResource ToggleStyle}" StateNA="{Binding [TglButton1].State}" TextResource="{DynamicResource tgl1_svc}" Description="{DynamicResource tgl1_desc_svc}" />
<uc:ToggleButton x:Name="TglButton2" Style="{StaticResource ToggleStyle}" StateNA="{Binding [TglButton2].State}" TextResource="{DynamicResource tgl2_svc}" Description="{DynamicResource tgl2_desc_svc}" />
@@ -60,7 +60,7 @@
<uc:ToggleButton x:Name="TglButton28" Style="{StaticResource ToggleStyle}" StateNA="{Binding [TglButton28].State}" TextResource="{DynamicResource tgl28_svc}" Description="{DynamicResource tgl28_desc_svc}" />
<uc:ToggleButton x:Name="TglButton29" Style="{StaticResource ToggleStyle}" StateNA="{Binding [TglButton29].State}" TextResource="{DynamicResource tgl29_svc}" Description="{DynamicResource tgl29_desc_svc}" />
- </uc:FlowColumnPanel>
+ </uc:FlowPanel>
</ScrollViewer>
</Grid>
diff --git a/.Source/GTweak/View/SystemView.xaml b/.Source/GTweak/View/SystemView.xaml
index 0efd1df8..2c86099d 100644
--- a/.Source/GTweak/View/SystemView.xaml
+++ b/.Source/GTweak/View/SystemView.xaml
@@ -1,4 +1,4 @@
-<UserControl x:Class="GTweak.View.SystemView"
+<UserControl x:Class="GTweak.View.SystemView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
@@ -29,7 +29,7 @@
<Grid Grid.Row="0">
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled">
- <uc:FlowColumnPanel VerticalSpacing="20" HorizontalSpacing="5" Margin="10">
+ <uc:FlowPanel VerticalSpacing="20" HorizontalSpacing="5" Margin="10">
<StackPanel Orientation="Vertical" Margin="0,-20,0,0">
<StackPanel Orientation="Horizontal" Height="45" VerticalAlignment="Top" MouseEnter="Tweak_MouseEnter" MouseLeave="Tweak_MouseLeave" ToolTip="{DynamicResource slider1_desc_sys}" ToolTipService.IsEnabled="False">
@@ -81,7 +81,7 @@
<uc:ToggleButton x:Name="TglButton27" Style="{StaticResource ToggleStyle}" StateNA="{Binding [TglButton27].State}" TextResource="{DynamicResource tgl27_sys}" Description="{DynamicResource tgl27_desc_sys}" />
<uc:ToggleButton x:Name="TglButton28" Style="{StaticResource ToggleStyle}" StateNA="{Binding [TglButton28].State}" TextResource="{DynamicResource tgl28_sys}" Description="{DynamicResource tgl28_desc_sys}" />
- </uc:FlowColumnPanel>
+ </uc:FlowPanel>
</ScrollViewer>
</Grid>
diff --git a/.Source/GTweak/View/UtilsView.xaml b/.Source/GTweak/View/UtilsView.xaml
index 747f8961..8dd8b9c7 100644
--- a/.Source/GTweak/View/UtilsView.xaml
+++ b/.Source/GTweak/View/UtilsView.xaml
@@ -45,7 +45,7 @@
<Grid Grid.Row="1">
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled">
- <uc:FlowColumnPanel Margin="20,20,0,20" UseMasonryLayout="False" HorizontalSpacing="5" VerticalSpacing="10" ContentAlignment="Stretch" HorizontalAlignment="Left" VerticalAlignment="Top">
+ <uc:FlowPanel Margin="20,20,0,20" UseMasonryLayout="False" HorizontalSpacing="5" VerticalSpacing="10" ContentAlignment="Stretch" HorizontalAlignment="Left" VerticalAlignment="Top">
<uc:Card Title="{DynamicResource title_licens_more}" Description="{DynamicResource text_licens_more}" BtnContent="{DynamicResource btn_activation}" ClickButton="BtnLicenseWindows_ClickButton">
<uc:Card.IconStyle>
<Style TargetType="Image">
@@ -94,7 +94,7 @@
</uc:Card.IconStyle>
</uc:Card>
- </uc:FlowColumnPanel>
+ </uc:FlowPanel>
</ScrollViewer>
</Grid>
</Grid>