Skip to content

Portable Tool for an Ideal Windows Setup

upd tweaks/uc colorpicker (colors) & fix crash when changing the flowpanel layout & upd version format config

Greedeksdba9290df760
diff --git a/.Source/GTweak/Assets/UserControl/ColorWheelPicker/ColorPicker.xaml b/.Source/GTweak/Assets/UserControl/ColorWheelPicker/ColorPicker.xaml
deleted file mode 100644
index 64489caf..00000000
--- a/.Source/GTweak/Assets/UserControl/ColorWheelPicker/ColorPicker.xaml
+++ /dev/null
@@ -1,96 +0,0 @@
-<UserControl x:Class="GTweak.Assets.UserControl.ColorWheelPicker.ColorPicker"
- 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"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:local="clr-namespace:GTweak.Assets.UserControl.ColorWheelPicker"
- mc:Ignorable="d"
- d:DesignHeight="40" d:DesignWidth="140" UseLayoutRounding="True" SnapsToDevicePixels="True">
- <Grid>
- <ToggleButton x:Name="PART_ToggleButton" Checked="PART_ToggleButton_Checked" Unchecked="PART_ToggleButton_Unchecked">
- <ToggleButton.Template>
- <ControlTemplate TargetType="ToggleButton">
- <Border x:Name="RootBorder" BorderBrush="{StaticResource Brush_Separator}" BorderThickness="1" Background="{StaticResource Brush_Background_ComboBox}" CornerRadius="4" Padding="5">
- <Grid>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="*"/>
- <ColumnDefinition Width="Auto"/>
- </Grid.ColumnDefinitions>
-
- <ContentPresenter Grid.Column="0" VerticalAlignment="Center"/>
-
- <Path x:Name="Arrow" Grid.Column="1" Data="M 0,2 L 4,6 L 8,2" Stroke="{StaticResource Brush_Highlighted}" StrokeThickness="1.5" Margin="5,0,2,0" VerticalAlignment="Center" RenderTransformOrigin="0.5,0.5">
- <Path.RenderTransform>
- <RotateTransform x:Name="ArrowRotate" Angle="0"/>
- </Path.RenderTransform>
- </Path>
- </Grid>
- </Border>
- <ControlTemplate.Triggers>
- <Trigger Property="IsMouseOver" Value="True">
- <Setter TargetName="RootBorder" Property="BorderBrush" Value="#AAA"/>
- </Trigger>
- <Trigger Property="IsChecked" Value="True">
- <Trigger.EnterActions>
- <BeginStoryboard>
- <Storyboard Timeline.DesiredFrameRate="120">
- <DoubleAnimation Storyboard.TargetName="ArrowRotate" Storyboard.TargetProperty="Angle" To="180" 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="ArrowRotate" Storyboard.TargetProperty="Angle" To="0" Duration="0:0:0.2">
- <DoubleAnimation.EasingFunction>
- <CubicEase/>
- </DoubleAnimation.EasingFunction>
- </DoubleAnimation>
- </Storyboard>
- </BeginStoryboard>
- </Trigger.ExitActions>
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </ToggleButton.Template>
-
- <StackPanel Orientation="Horizontal">
- <Ellipse x:Name="PART_ColorPreview" Width="20" Height="20" Stroke="{StaticResource Brush_Separator}" StrokeThickness="2" Margin="0,0,8,0" Fill="White"/>
- <TextBlock x:Name="PART_ColorTextBlock" VerticalAlignment="Center" FontSize="14px" FontFamily="{StaticResource Play}" Foreground="{StaticResource Brush_Highlighted}" Text="255 255 255" MinWidth="80"/>
- </StackPanel>
- </ToggleButton>
-
- <Popup x:Name="ColorPopup" Placement="Bottom" StaysOpen="False" AllowsTransparency="True" Opened="ColorPopup_Opened" Closed="ColorPopup_Closed" VerticalOffset="4">
- <Border x:Name="PopupBorder" Background="{StaticResource Brush_Background_ComboBox}" BorderBrush="{StaticResource Brush_Separator}" BorderThickness="1" CornerRadius="8" Padding="12" Margin="10">
- <Border.CacheMode>
- <BitmapCache RenderAtScale="2" />
- </Border.CacheMode>
- <Border.Effect>
- <DropShadowEffect BlurRadius="10" Opacity="0.15" ShadowDepth="2"/>
- </Border.Effect>
- <Border.RenderTransform>
- <TranslateTransform x:Name="PopupTransform"/>
- </Border.RenderTransform>
-
- <StackPanel>
- <Canvas Width="150" Height="150">
- <Rectangle x:Name="PART_Wheel" Width="150" Height="150" Fill="Transparent" MouseDown="Wheel_MouseDown" MouseMove="Wheel_MouseMove" MouseUp="Wheel_MouseUp">
- <Rectangle.Effect>
- <local:ColorWheelEffect />
- </Rectangle.Effect>
- <Rectangle.Clip>
- <EllipseGeometry Center="75,75" RadiusX="75" RadiusY="75"/>
- </Rectangle.Clip>
- </Rectangle>
- <Ellipse x:Name="PART_Marker" Width="14" Height="14" Stroke="Black" StrokeThickness="1" Fill="#FFFFFF" IsHitTestVisible="False"/>
- </Canvas>
- <Slider x:Name="PART_BrightnessSlider" Style="{StaticResource Slider_NoValue}" Minimum="0" Maximum="1" Value="1" Margin="0,15,0,0" Cursor="Hand" IsMoveToPointEnabled="True"/>
- </StackPanel>
- </Border>
- </Popup>
- </Grid>
-</UserControl>
diff --git a/.Source/GTweak/Assets/UserControl/ColorWheelPicker/ColorPicker.xaml.cs b/.Source/GTweak/Assets/UserControl/ColorWheelPicker/ColorPicker.xaml.cs
deleted file mode 100644
index 16551668..00000000
--- a/.Source/GTweak/Assets/UserControl/ColorWheelPicker/ColorPicker.xaml.cs
+++ /dev/null
@@ -1,243 +0,0 @@
-using System;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Input;
-using System.Windows.Media;
-using GTweak.Utilities.Animation;
-using GTweak.Utilities.Controls;
-
-namespace GTweak.Assets.UserControl.ColorWheelPicker
-{
- public partial class ColorPicker
- {
- internal static readonly DependencyProperty SelectedColorProperty =
- DependencyProperty.Register(nameof(SelectedColor), typeof(Color), typeof(ColorPicker), new FrameworkPropertyMetadata(Colors.White, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, OnSelectedColorChanged));
-
- internal Color SelectedColor
- {
- get => (Color)GetValue(SelectedColorProperty);
- set => SetValue(SelectedColorProperty, value);
- }
-
- internal string SelectedColorString
- {
- get => $"{SelectedColor.R} {SelectedColor.G} {SelectedColor.B}";
-
- set
- {
- if (!string.IsNullOrWhiteSpace(value))
- {
- try
- {
- string[] parts = value.Split(new[] { ' ', ',', ';' }, StringSplitOptions.RemoveEmptyEntries);
- if (parts.Length == 3)
- {
- byte r = byte.Parse(parts[0]);
- byte g = byte.Parse(parts[1]);
- byte b = byte.Parse(parts[2]);
-
- SelectedColor = Color.FromRgb(r, g, b);
- }
- }
- catch (Exception ex) { ErrorLogging.LogDebug(ex); }
- }
- }
- }
-
- private const double WheelSize = 150.0;
- private const double WheelRadius = WheelSize / 2.0;
-
- private bool _isDragging, _isInitialized, _updatingFromProperty;
- private double _selectedX, _selectedY, _brightness = 1.0;
-
- public ColorPicker()
- {
- InitializeComponent();
- PART_BrightnessSlider.ValueChanged += (s, e) => UpdateFromSlider();
-
- Loaded += (s, e) =>
- {
- if (!_isInitialized)
- {
- SetColorFromColor(SelectedColor);
- _isInitialized = true;
- }
-
- Window win = Window.GetWindow(this);
- if (win != null)
- {
- win.LocationChanged += delegate { UpdatePopupPos(); };
- win.SizeChanged += delegate { UpdatePopupPos(); };
- }
- };
- }
- private static void OnSelectedColorChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
- {
- ColorPicker ctrl = (ColorPicker)d;
- if (ctrl._updatingFromProperty)
- {
- return;
- }
-
- ctrl.SetColorFromColor((Color)e.NewValue);
- }
-
- private void PART_ToggleButton_Checked(object sender, RoutedEventArgs e) => ColorPopup.IsOpen = true;
-
- private void PART_ToggleButton_Unchecked(object sender, RoutedEventArgs e) => ColorPopup.IsOpen = false;
-
- private void UpdatePopupPos()
- {
- if (ColorPopup.IsOpen)
- {
- var method = typeof(System.Windows.Controls.Primitives.Popup).GetMethod("UpdatePosition", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance);
- method?.Invoke(ColorPopup, null);
- }
- }
-
- private void UpdateFromSlider()
- {
- _brightness = PART_BrightnessSlider.Value;
- UpdateColor(GetColorFromWheel(_selectedX, _selectedY, _brightness));
- }
-
- private void Wheel_MouseDown(object sender, MouseButtonEventArgs e)
- {
- PART_Wheel.CaptureMouse();
- _isDragging = true;
- UpdateColorByMouse(e.GetPosition(PART_Wheel));
- }
-
- private void Wheel_MouseMove(object sender, MouseEventArgs e)
- {
- if (_isDragging)
- {
- UpdateColorByMouse(e.GetPosition(PART_Wheel));
- }
- }
-
- private void Wheel_MouseUp(object sender, MouseButtonEventArgs e)
- {
- _isDragging = false;
- PART_Wheel.ReleaseMouseCapture();
- }
-
- private void UpdateColorByMouse(Point pos)
- {
- double dx = pos.X - WheelRadius, dy = pos.Y - WheelRadius;
- double dist = Math.Sqrt(dx * dx + dy * dy);
-
- if (dist > WheelRadius)
- {
- dx *= WheelRadius / dist;
- dy *= WheelRadius / dist;
- }
-
- _selectedX = WheelRadius + dx;
- _selectedY = WheelRadius + dy;
- UpdateColor(GetColorFromWheel(_selectedX, _selectedY, _brightness));
- }
-
- private void ColorPopup_Closed(object sender, EventArgs e)
- {
- if (Mouse.LeftButton != MouseButtonState.Pressed)
- {
- PART_ToggleButton.IsChecked = false;
- }
- else if (!PART_ToggleButton.IsMouseOver)
- {
- PART_ToggleButton.IsChecked = false;
- }
- }
-
- private void UpdateColor(Color color)
- {
- if (color.A >= 128)
- {
- Canvas.SetLeft(PART_Marker, _selectedX - PART_Marker.Width / 2);
- Canvas.SetTop(PART_Marker, _selectedY - PART_Marker.Height / 2);
-
- PART_ColorPreview.Fill = new SolidColorBrush(color);
- PART_ColorTextBlock.Text = $"{color.R} {color.G} {color.B}";
-
- _updatingFromProperty = true;
- SelectedColor = color;
- _updatingFromProperty = false;
- }
- }
-
- private void SetColorFromColor(Color color)
- {
- double r = color.R / 255.0, g = color.G / 255.0, b = color.B / 255.0;
- double max = Math.Max(r, Math.Max(g, b)), min = Math.Min(r, Math.Min(g, b));
- double delta = max - min;
-
- _brightness = max;
- PART_BrightnessSlider.Value = _brightness;
-
- double hueDeg = 0;
-
- if (delta != 0)
- {
- if (max == r)
- {
- hueDeg = 60 * (((g - b) / delta) % 6);
- }
- else if (max == g)
- {
- hueDeg = 60 * (((b - r) / delta) + 2);
- }
- else
- {
- hueDeg = 60 * (((r - g) / delta) + 4);
- }
- }
-
- if (hueDeg < 0)
- {
- hueDeg += 360;
- }
-
- double s = (max == 0) ? 0 : delta / max;
- double angle = Math.PI - (Math.PI / 3.0) * (hueDeg / 60.0);
-
- _selectedX = WheelRadius - (s * WheelRadius * Math.Cos(angle));
- _selectedY = WheelRadius + (s * WheelRadius * Math.Sin(angle));
-
- UpdateColor(color);
- }
-
- public static Color GetColorFromWheel(double x, double y, double v)
- {
- double nx = (x - WheelRadius) / WheelRadius;
- double ny = (y - WheelRadius) / WheelRadius;
- double sat = Math.Min(1.0, Math.Sqrt(nx * nx + ny * ny));
-
- double hue = (Math.Atan2(ny, nx) + Math.PI) / (2 * Math.PI) * 6.0;
-
- double c = v * sat;
- double x_c = c * (1 - Math.Abs(hue % 2.0 - 1));
- double m = v - c;
-
- (double r, double g, double b) = hue switch
- {
- double h when h < 1 => (c, x_c, 0.0),
- double h when h < 2 => (x_c, c, 0.0),
- double h when h < 3 => (0.0, c, x_c),
- double h when h < 4 => (0.0, x_c, c),
- double h when h < 5 => (x_c, 0.0, c),
- _ => (c, 0.0, x_c)
- };
-
- byte ToByte(double val) => (byte)((val + m) * 255);
-
- return Color.FromRgb(ToByte(r), ToByte(g), ToByte(b));
- }
-
- private void ColorPopup_Opened(object sender, EventArgs e)
- {
- PopupTransform.BeginAnimation(TranslateTransform.YProperty, FactoryAnimation.CreateIn(-5, 0, 0.3, useCubicEase: true));
- PopupBorder.BeginAnimation(OpacityProperty, FactoryAnimation.CreateIn(0, 1, 0.15));
- }
- }
-}
diff --git a/.Source/GTweak/Assets/UserControl/FlowPanel.cs b/.Source/GTweak/Assets/UserControl/FlowPanel.cs
deleted file mode 100644
index 0981e63b..00000000
--- a/.Source/GTweak/Assets/UserControl/FlowPanel.cs
+++ /dev/null
@@ -1,567 +0,0 @@
-using System;
-using System.Collections.Generic;
-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 sealed class FlowItemGroup
- {
- internal readonly List<UIElement> Elements = new List<UIElement>();
- internal double Width;
- internal double Height;
- }
-
- public enum FlowOrientation
- {
- Unset = 0,
- Vertical = 1,
- Horizontal = 2
- }
-
- public static readonly DependencyProperty HorizontalSpacingProperty = DependencyProperty.Register(nameof(HorizontalSpacing), typeof(double), typeof(FlowPanel),
- new FrameworkPropertyMetadata(20.0, FrameworkPropertyMetadataOptions.AffectsArrange));
-
- public static readonly DependencyProperty VerticalSpacingProperty = DependencyProperty.Register(nameof(VerticalSpacing), typeof(double), typeof(FlowPanel),
- new FrameworkPropertyMetadata(10.0, FrameworkPropertyMetadataOptions.AffectsArrange));
-
- public static readonly DependencyProperty ContentAlignmentProperty = DependencyProperty.Register(nameof(ContentAlignment), typeof(HorizontalAlignment), typeof(FlowPanel),
- new FrameworkPropertyMetadata(HorizontalAlignment.Left, FrameworkPropertyMetadataOptions.AffectsArrange));
-
- public static readonly DependencyProperty UseMasonryLayoutProperty = DependencyProperty.Register(nameof(UseMasonryLayout), typeof(bool), typeof(FlowPanel),
- new FrameworkPropertyMetadata(true, FrameworkPropertyMetadataOptions.AffectsArrange | FrameworkPropertyMetadataOptions.AffectsMeasure));
-
- public static readonly DependencyProperty OrientationProperty = DependencyProperty.Register(nameof(Orientation), typeof(FlowOrientation), typeof(FlowPanel),
- new FrameworkPropertyMetadata(FlowOrientation.Unset, FrameworkPropertyMetadataOptions.AffectsArrange | FrameworkPropertyMetadataOptions.AffectsMeasure));
-
- public static readonly DependencyProperty EqualizeItemSizeProperty = DependencyProperty.Register(nameof(EqualizeItemSize), typeof(bool), typeof(FlowPanel),
- new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsArrange | FrameworkPropertyMetadataOptions.AffectsMeasure));
-
- public static readonly DependencyProperty ItemWidthProperty = DependencyProperty.Register(nameof(ItemWidth), typeof(double), typeof(FlowPanel),
- new FrameworkPropertyMetadata(320.0, FrameworkPropertyMetadataOptions.AffectsMeasure | FrameworkPropertyMetadataOptions.AffectsArrange));
-
- public double HorizontalSpacing
- {
- get => (double)GetValue(HorizontalSpacingProperty);
- set => SetValue(HorizontalSpacingProperty, value);
- }
-
- public double VerticalSpacing
- {
- get => (double)GetValue(VerticalSpacingProperty);
- set => SetValue(VerticalSpacingProperty, value);
- }
-
- public HorizontalAlignment ContentAlignment
- {
- get => (HorizontalAlignment)GetValue(ContentAlignmentProperty);
- set => SetValue(ContentAlignmentProperty, value);
- }
-
- public bool UseMasonryLayout
- {
- get => (bool)GetValue(UseMasonryLayoutProperty);
- set => SetValue(UseMasonryLayoutProperty, value);
- }
-
- public FlowOrientation Orientation
- {
- get => (FlowOrientation)GetValue(OrientationProperty);
- set => SetValue(OrientationProperty, value);
- }
-
- public bool EqualizeItemSize
- {
- get => (bool)GetValue(EqualizeItemSizeProperty);
- set => SetValue(EqualizeItemSizeProperty, value);
- }
-
- public double ItemWidth
- {
- get => (double)GetValue(ItemWidthProperty);
- set => SetValue(ItemWidthProperty, value);
- }
-
- private readonly Dictionary<UIElement, Point> _lastPos = new Dictionary<UIElement, Point>();
-
- private static bool Moved(Point a, Point b) => Math.Abs(a.X - b.X) > 0.5 || Math.Abs(a.Y - b.Y) > 0.5;
-
- private double GetChildWidth(UIElement child) => EqualizeItemSize ? ItemWidth : child.DesiredSize.Width;
-
- private double GetChildHeight(UIElement child) => child.DesiredSize.Height;
-
- protected override Size MeasureOverride(Size availableSize)
- {
- List<UIElement> visible = new List<UIElement>(InternalChildren.Count);
- for (int i = 0; i < InternalChildren?.Count; i++)
- {
- UIElement child = InternalChildren[i];
- if (child != null && child.Visibility != Visibility.Collapsed)
- {
- visible.Add(child);
- }
- }
-
- if (visible?.Count == 0)
- {
- return new Size(0, 0);
- }
-
- double aw = double.IsInfinity(availableSize.Width) ? 1200 : availableSize.Width;
-
- double ah = double.PositiveInfinity;
-
- if (EqualizeItemSize)
- {
- Size constraint = new Size(ItemWidth, double.PositiveInfinity);
- foreach (UIElement child in visible)
- {
- child.Measure(constraint);
- }
- }
- else
- {
- Size constraint = new Size(double.PositiveInfinity, double.PositiveInfinity);
- foreach (UIElement child in visible)
- {
- child.Measure(constraint);
- }
- }
-
- double neededHeight = CalculateNeededHeight(aw, ah, visible);
- return new Size(aw, neededHeight);
- }
-
- protected override Size ArrangeOverride(Size finalSize)
- {
- List<UIElement> visible = new List<UIElement>(InternalChildren.Count);
- for (int i = 0; i < InternalChildren?.Count; i++)
- {
- UIElement child = InternalChildren[i];
- if (child != null && child.Visibility != Visibility.Collapsed)
- {
- visible.Add(child);
- }
- }
-
- if (visible.Count == 0)
- {
- return finalSize;
- }
-
- List<FlowItemGroup> groups = CreateOptimalColumns(finalSize.Width, finalSize.Height, visible);
- ArrangeAligned(groups, finalSize.Width);
-
- return finalSize;
- }
-
- private void ArrangeAligned(List<FlowItemGroup> groups, double availableWidth)
- {
- if (groups == null || groups?.Count == 0)
- {
- return;
- }
-
- if (Orientation == FlowOrientation.Horizontal)
- {
- double y = 0;
-
- for (int i = 0; i < groups?.Count; i++)
- {
- FlowItemGroup row = groups[i];
- if (row.Elements.Count == 0)
- {
- y += row.Height + 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 (UIElement child in row?.Elements)
- {
- double w = GetChildWidth(child);
- double h = GetChildHeight(child);
-
- Point newPos = new Point(x, y);
- child.Arrange(new Rect(newPos.X, newPos.Y, w, h));
-
- if (!_lastPos.TryGetValue(child, out var oldPos) || Moved(oldPos, newPos))
- {
- _lastPos[child] = newPos;
-
- if (!(child.RenderTransform is TranslateTransform transform))
- {
- transform = new TranslateTransform(0, 0);
- child.RenderTransform = transform;
- }
-
- 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 += w + HorizontalSpacing;
- }
-
- y += row.Height + VerticalSpacing;
- }
-
- return;
- }
-
- double contentWidth = 0;
- for (int i = 0; i < groups?.Count; i++)
- {
- contentWidth += groups[i].Width;
- if (i > 0)
- {
- contentWidth += HorizontalSpacing;
- }
- }
-
- double extraSpaceV = Math.Max(0, availableWidth - contentWidth);
- double xStartV = ContentAlignment switch
- {
- HorizontalAlignment.Center => extraSpaceV / 2.0,
- HorizontalAlignment.Right => extraSpaceV,
- _ => 0
- };
-
- double xV = xStartV;
-
- for (int i = 0; i < groups?.Count; i++)
- {
- FlowItemGroup col = groups[i];
- if (col.Elements.Count == 0)
- {
- xV += col.Width + HorizontalSpacing;
- continue;
- }
-
- double shift = 0;
- if (Orientation == FlowOrientation.Unset && groups?.Count > 1 && i > 0)
- {
- shift = extraSpaceV * (i / (double)(groups.Count - 1)) * 0.3;
- }
-
- double columnX = xV + shift;
- double y = 0;
-
- foreach (UIElement child in col?.Elements)
- {
- double w = GetChildWidth(child);
- double h = GetChildHeight(child);
-
- Point newPos = new Point(columnX, y);
- child.Arrange(new Rect(newPos.X, newPos.Y, w, h));
-
- if (!_lastPos.TryGetValue(child, out var oldPos) || Moved(oldPos, newPos))
- {
- _lastPos[child] = newPos;
-
- if (!(child.RenderTransform is TranslateTransform transform))
- {
- transform = new TranslateTransform(0, 0);
- child.RenderTransform = transform;
- }
-
- 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 += h + VerticalSpacing;
- }
-
- xV += col.Width + HorizontalSpacing;
- }
- }
-
- private double CalculateNeededHeight(double availableWidth, double availableHeight, List<UIElement> visibleChildren)
- {
- List<FlowItemGroup> groups = CreateOptimalColumns(availableWidth, availableHeight, visibleChildren);
-
- if (Orientation == FlowOrientation.Horizontal)
- {
- double total = 0;
- for (int i = 0; i < groups?.Count; i++)
- {
- total += groups[i].Height;
- if (i > 0)
- {
- total += VerticalSpacing;
- }
- }
- return total;
- }
-
- return CalculateMaxColumnHeight(groups);
- }
-
- private double CalculateMaxColumnHeight(List<FlowItemGroup> columns)
- {
- if (columns == null || columns?.Count == 0)
- {
- return 0;
- }
-
- double max = 0;
-
- for (int i = 0; i < columns?.Count; i++)
- {
- FlowItemGroup col = columns[i];
- double h = 0;
-
- for (int j = 0; j < col?.Elements.Count; j++)
- {
- UIElement child = col?.Elements[j];
- h += GetChildHeight(child);
- if (j > 0)
- {
- h += VerticalSpacing;
- }
- }
-
- if (h > max)
- {
- max = h;
- }
- }
-
- return max;
- }
-
- private List<FlowItemGroup> CreateOptimalColumns(double availableWidth, double availableHeight, List<UIElement> visibleChildren)
- {
- if (visibleChildren == null || 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 (UIElement child in visibleChildren)
- {
- double childWidth = GetChildWidth(child);
- double childHeight = GetChildHeight(child);
-
- 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 (UIElement child in visibleChildren)
- {
- double childWidth = GetChildWidth(child);
- double childHeight = GetChildHeight(child);
-
- 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 = new List<FlowItemGroup>(columnCount);
- for (int i = 0; i < columnCount; i++)
- {
- columns.Add(new FlowItemGroup());
- }
-
- if (UseMasonryLayout)
- {
- double[] heights = new double[columnCount];
-
- foreach (UIElement child in visibleChildren)
- {
- int minIndex = 0;
- double minH = heights[0];
- for (int i = 1; i < columnCount; i++)
- {
- if (heights[i] < minH)
- {
- minH = heights[i];
- minIndex = i;
- }
- }
-
- double h = GetChildHeight(child);
- 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, GetChildWidth(child));
- heights[minIndex] = newHeight;
- }
-
- for (int i = 0; i < columnCount; i++)
- {
- columns[i].Height = heights[i];
- }
- }
- else
- {
- int index = 0;
-
- foreach (UIElement child in visibleChildren)
- {
- int colIndex = index % columnCount;
-
- double addedHeight = (columns[colIndex].Height > 0 ? VerticalSpacing : 0) + GetChildHeight(child);
- double newHeight = columns[colIndex].Height + addedHeight;
-
- if (newHeight > maxHeight)
- {
- return null;
- }
-
- columns[colIndex].Elements.Add(child);
- columns[colIndex].Width = Math.Max(columns[colIndex].Width, GetChildWidth(child));
- 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, GetChildWidth(child));
-
- totalHeight += GetChildHeight(child);
- if (col.Elements?.Count > 1)
- {
- totalHeight += VerticalSpacing;
- }
- }
-
- col.Height = totalHeight;
- return new List<FlowItemGroup> { col };
- }
-
- private double CalculateTotalWidth(List<FlowItemGroup> columns)
- {
- if (columns == null || columns?.Count == 0)
- {
- return 0;
- }
-
- double total = 0;
- for (int i = 0; i < columns?.Count; i++)
- {
- total += columns[i].Width;
- if (i > 0)
- {
- total += HorizontalSpacing;
- }
- }
- return total;
- }
- }
-}
\ No newline at end of file
diff --git a/.Source/GTweak/Assets/UserControl/Card.xaml b/.Source/GTweak/Assets/UserControls/Card.xaml
similarity index 98%
rename from .Source/GTweak/Assets/UserControl/Card.xaml
rename to .Source/GTweak/Assets/UserControls/Card.xaml
index de8e3e4f..6d06f02d 100644
--- a/.Source/GTweak/Assets/UserControl/Card.xaml
+++ b/.Source/GTweak/Assets/UserControls/Card.xaml
@@ -1,9 +1,9 @@
-<UserControl x:Class="GTweak.Assets.UserControl.Card"
+<UserControl x:Class="GTweak.Assets.UserControls.Card"
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"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:local="clr-namespace:GTweak.Assets.UserControl"
+ xmlns:local="clr-namespace:GTweak.Assets.UserControls"
mc:Ignorable="d"
d:Height="auto" d:Width="auto" IsTabStop="False" KeyboardNavigation.TabNavigation="None"
SnapsToDevicePixels="True" UseLayoutRounding="True">
diff --git a/.Source/GTweak/Assets/UserControl/Card.xaml.cs b/.Source/GTweak/Assets/UserControls/Card.xaml.cs
similarity index 98%
rename from .Source/GTweak/Assets/UserControl/Card.xaml.cs
rename to .Source/GTweak/Assets/UserControls/Card.xaml.cs
index 668c2373..20317d57 100644
--- a/.Source/GTweak/Assets/UserControl/Card.xaml.cs
+++ b/.Source/GTweak/Assets/UserControls/Card.xaml.cs
@@ -4,7 +4,7 @@ using System.Windows.Controls;
using System.Windows.Input;
-namespace GTweak.Assets.UserControl
+namespace GTweak.Assets.UserControls
{
public partial class Card
{
diff --git a/.Source/GTweak/Assets/UserControls/ColorWheelPicker/ColorPicker.xaml b/.Source/GTweak/Assets/UserControls/ColorWheelPicker/ColorPicker.xaml
new file mode 100644
index 00000000..88c08399
--- /dev/null
+++ b/.Source/GTweak/Assets/UserControls/ColorWheelPicker/ColorPicker.xaml
@@ -0,0 +1,142 @@
+<UserControl x:Class="GTweak.Assets.UserControls.ColorWheelPicker.ColorPicker"
+ 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"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:local="clr-namespace:GTweak.Assets.UserControls.ColorWheelPicker"
+ mc:Ignorable="d"
+ d:DesignHeight="40" d:DesignWidth="140" UseLayoutRounding="True" SnapsToDevicePixels="True" KeyboardNavigation.TabNavigation="None" IsTabStop="False">
+ <Grid>
+ <ToggleButton x:Name="PART_ToggleButton" Checked="PART_ToggleButton_Checked" Unchecked="PART_ToggleButton_Unchecked">
+ <ToggleButton.Template>
+ <ControlTemplate TargetType="ToggleButton">
+ <Border x:Name="RootBorder" BorderBrush="{StaticResource Brush_Separator}" BorderThickness="1" Background="{StaticResource Brush_Background_ComboBox}" CornerRadius="4" Padding="5">
+ <Grid>
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="*"/>
+ <ColumnDefinition Width="Auto"/>
+ </Grid.ColumnDefinitions>
+
+ <ContentPresenter Grid.Column="0" VerticalAlignment="Center"/>
+
+ <Path x:Name="Arrow" Grid.Column="1" Data="M 0,2 L 4,6 L 8,2" Stroke="{StaticResource Brush_Highlighted}" StrokeThickness="1" Margin="8,0,2,0" VerticalAlignment="Center" RenderTransformOrigin="0.5,0.5">
+ <Path.RenderTransform>
+ <RotateTransform x:Name="ArrowRotate" Angle="0"/>
+ </Path.RenderTransform>
+ </Path>
+ </Grid>
+ </Border>
+ <ControlTemplate.Triggers>
+ <Trigger Property="IsChecked" Value="True">
+ <Trigger.EnterActions>
+ <BeginStoryboard>
+ <Storyboard Timeline.DesiredFrameRate="120">
+ <DoubleAnimation Storyboard.TargetName="ArrowRotate" Storyboard.TargetProperty="Angle" To="180" 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="ArrowRotate" Storyboard.TargetProperty="Angle" To="0" Duration="0:0:0.2">
+ <DoubleAnimation.EasingFunction>
+ <CubicEase/>
+ </DoubleAnimation.EasingFunction>
+ </DoubleAnimation>
+ </Storyboard>
+ </BeginStoryboard>
+ </Trigger.ExitActions>
+ </Trigger>
+ </ControlTemplate.Triggers>
+ </ControlTemplate>
+ </ToggleButton.Template>
+
+ <Grid>
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="Auto"/>
+ <ColumnDefinition Width="*"/>
+ </Grid.ColumnDefinitions>
+
+ <Ellipse x:Name="PART_ColorPreview" Grid.Column="0" Width="20" Height="20" Stroke="{StaticResource Brush_Separator}" StrokeThickness="2" Margin="0,0,8,0" Fill="White"/>
+
+ <TextBlock x:Name="PART_ColorTextBlock" Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="14px" FontFamily="{StaticResource Play}" Foreground="{StaticResource Brush_Highlighted}" Text="255 255 255" MinWidth="80"/>
+ </Grid>
+ </ToggleButton>
+
+ <Popup x:Name="ColorPopup" Placement="Bottom" StaysOpen="False" AllowsTransparency="True" Opened="ColorPopup_Opened" Closed="ColorPopup_Closed" VerticalOffset="4">
+ <Border x:Name="PopupBorder" Background="{StaticResource Brush_Background_ComboBox}" BorderBrush="{StaticResource Brush_Separator}" BorderThickness="1" CornerRadius="8" Padding="12" Margin="10">
+ <Border.CacheMode>
+ <BitmapCache RenderAtScale="2" />
+ </Border.CacheMode>
+ <Border.Effect>
+ <DropShadowEffect BlurRadius="10" Opacity="0.15" ShadowDepth="2"/>
+ </Border.Effect>
+ <Border.RenderTransform>
+ <TranslateTransform x:Name="PopupTransform"/>
+ </Border.RenderTransform>
+
+ <StackPanel>
+ <Grid>
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="Auto"/>
+ <ColumnDefinition Width="8"/>
+ <ColumnDefinition Width="Auto"/>
+ </Grid.ColumnDefinitions>
+
+ <Canvas Grid.Column="0" Width="150" Height="150">
+ <Rectangle x:Name="PART_Wheel" Width="150" Height="150" Fill="Transparent" MouseDown="ColorWheel_MouseDown" MouseMove="ColorWheel_MouseMove" MouseUp="ColorWheel_MouseUp">
+ <Rectangle.Effect>
+ <local:ColorWheelEffect />
+ </Rectangle.Effect>
+ <Rectangle.Clip>
+ <EllipseGeometry Center="75,75" RadiusX="75" RadiusY="75"/>
+ </Rectangle.Clip>
+ </Rectangle>
+
+ <Grid x:Name="PART_MarkerWheel" Width="14" Height="14" IsHitTestVisible="False">
+ <Grid.CacheMode>
+ <BitmapCache RenderAtScale="2" />
+ </Grid.CacheMode>
+ <Grid.Effect>
+ <DropShadowEffect ShadowDepth="1" BlurRadius="3" Opacity="0.6"/>
+ </Grid.Effect>
+
+ <Ellipse Width="14" Height="14" HorizontalAlignment="Center" VerticalAlignment="Center" Stroke="{StaticResource Brush_Highlighted_Inverted}" StrokeThickness="1.5" Fill="Transparent"/>
+ <Ellipse Width="12" Height="12" HorizontalAlignment="Center" VerticalAlignment="Center" Stroke="{StaticResource Brush_Highlighted}" StrokeThickness="1.5" Fill="Transparent"/>
+ </Grid>
+ </Canvas>
+
+ <Canvas x:Name="PART_ValueCanvas" Grid.Column="2" Width="8" Height="150" MouseDown="ValueCanvas_MouseDown" MouseMove="ValueCanvas_MouseMove" MouseUp="ValueCanvas_MouseUp">
+ <Rectangle x:Name="PART_ValueBar" Width="8" Height="150" RadiusX="4" RadiusY="4"/>
+
+ <Grid x:Name="PART_MarkerValue" Width="14" Height="14" IsHitTestVisible="False">
+ <Grid.CacheMode>
+ <BitmapCache RenderAtScale="2" />
+ </Grid.CacheMode>
+ <Grid.Effect>
+ <DropShadowEffect ShadowDepth="1" BlurRadius="3" Opacity="0.6"/>
+ </Grid.Effect>
+
+ <Ellipse Width="14" Height="14" HorizontalAlignment="Center" VerticalAlignment="Center" Stroke="{StaticResource Brush_Highlighted}" StrokeThickness="1.5" Fill="Transparent"/>
+ <Ellipse Width="12" Height="12" HorizontalAlignment="Center" VerticalAlignment="Center" Stroke="{StaticResource Brush_Highlighted_Inverted}" StrokeThickness="1.5" Fill="Transparent"/>
+ </Grid>
+ </Canvas>
+ </Grid>
+
+ <TextBox x:Name="PART_HexBox" Height="30" Margin="0,10,0,0" MaxLength="7" Width="{Binding ElementName=BtnDefault, Path=ActualWidth}" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" HorizontalAlignment="Center" FontWeight="SemiBold" KeyDown="HexBox_KeyDown" LostFocus="HexBox_LostFocus" TextChanged="HexBox_TextChanged">
+ <TextBox.Background>
+ <SolidColorBrush Color="{Binding SelectedColor, RelativeSource={RelativeSource AncestorType=local:ColorPicker}}"/>
+ </TextBox.Background>
+ </TextBox>
+
+ <Button x:Name="BtnDefault" Content="{DynamicResource btn_default}" Style="{StaticResource ButtonContent_Inverted}" Margin="0,10,0,0" HorizontalAlignment="Stretch" Click="BtnDefault_Click"/>
+
+ </StackPanel>
+ </Border>
+ </Popup>
+ </Grid>
+</UserControl>
\ No newline at end of file
diff --git a/.Source/GTweak/Assets/UserControls/ColorWheelPicker/ColorPicker.xaml.cs b/.Source/GTweak/Assets/UserControls/ColorWheelPicker/ColorPicker.xaml.cs
new file mode 100644
index 00000000..61ea05e7
--- /dev/null
+++ b/.Source/GTweak/Assets/UserControls/ColorWheelPicker/ColorPicker.xaml.cs
@@ -0,0 +1,421 @@
+using System;
+using System.Reflection;
+using System.Text.RegularExpressions;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Input;
+using System.Windows.Media;
+using GTweak.Utilities.Animation;
+using GTweak.Utilities.Controls;
+
+namespace GTweak.Assets.UserControls.ColorWheelPicker
+{
+ public partial class ColorPicker
+ {
+ private const double WheelSize = 150.0;
+ private const double WheelRadius = WheelSize / 2.0;
+
+ private bool _isWheelBeingDragged, _isValueBeingDragged, _isInitialized, _isUpdatingFromProperty, _isUpdatingHexValue;
+ private double _selectedWheelX, _selectedWheelY, _currentHue, _currentSaturation, _currentValue = 1.0;
+ private Color _colorOnOpen;
+
+ internal event EventHandler<Color> ColorPicked;
+ internal event EventHandler PickerClosed;
+
+ internal static readonly DependencyProperty SelectedColorProperty =
+ DependencyProperty.Register(nameof(SelectedColor), typeof(Color), typeof(ColorPicker), new FrameworkPropertyMetadata(Colors.White, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, OnSelectedColorChanged));
+
+ internal static readonly DependencyProperty DefaultColorProperty =
+ DependencyProperty.Register(nameof(DefaultColor), typeof(Color), typeof(ColorPicker), new PropertyMetadata(Colors.White));
+
+ internal Color SelectedColor
+ {
+ get => (Color)GetValue(SelectedColorProperty);
+ set => SetValue(SelectedColorProperty, value);
+ }
+
+ internal Color DefaultColor
+ {
+ get => (Color)GetValue(DefaultColorProperty);
+ set => SetValue(DefaultColorProperty, value);
+ }
+
+ internal static readonly DependencyProperty SelectedColorStringProperty =
+ DependencyProperty.Register(nameof(SelectedColorString), typeof(string), typeof(ColorPicker),
+ new FrameworkPropertyMetadata(default(string), FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, OnSelectedColorStringChanged));
+
+ internal string SelectedColorString
+ {
+ get => (string)GetValue(SelectedColorStringProperty);
+ set => SetValue(SelectedColorStringProperty, value);
+ }
+
+ private static void OnSelectedColorStringChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
+ {
+ ColorPicker picker = (ColorPicker)d;
+ string newValue = e.NewValue as string;
+
+ if (!string.IsNullOrWhiteSpace(newValue) && !picker._isUpdatingFromProperty)
+ {
+ try
+ {
+ string[] components = newValue.Split(new[] { ' ', ',', ';' }, StringSplitOptions.RemoveEmptyEntries);
+ if (components.Length == 3)
+ {
+ Color newColor = Color.FromRgb(byte.Parse(components[0]), byte.Parse(components[1]), byte.Parse(components[2]));
+
+ picker._isUpdatingFromProperty = true;
+ picker.SelectedColor = newColor;
+ picker.UpdateInternalStateFromColor(newColor);
+ picker._isUpdatingFromProperty = false;
+ }
+ }
+ catch (Exception ex) { ErrorLogging.LogDebug(ex); }
+ }
+ }
+
+ public ColorPicker()
+ {
+ InitializeComponent();
+ Loaded += OnControlLoaded;
+ }
+
+ private void OnControlLoaded(object sender, RoutedEventArgs e)
+ {
+ if (!_isInitialized)
+ {
+ UpdateInternalStateFromColor(SelectedColor);
+ _isInitialized = true;
+ }
+
+ Window parentWindow = Window.GetWindow(this);
+
+ if (parentWindow != null)
+ {
+ parentWindow.LocationChanged += delegate { UpdatePopupPosition(); };
+ parentWindow.SizeChanged += delegate { UpdatePopupPosition(); };
+ }
+ }
+
+ private static void OnSelectedColorChanged(DependencyObject dependencyObject, DependencyPropertyChangedEventArgs eventArgs)
+ {
+ ColorPicker colorPickerControl = (ColorPicker)dependencyObject;
+
+ if (!colorPickerControl._isUpdatingFromProperty)
+ {
+ colorPickerControl.UpdateInternalStateFromColor((Color)eventArgs.NewValue);
+ }
+ }
+
+ private void NotifyColorChanged(Color newColor)
+ {
+ _isUpdatingFromProperty = true;
+ SelectedColor = newColor;
+ SelectedColorString = $"{newColor.R} {newColor.G} {newColor.B}";
+ _isUpdatingFromProperty = false;
+ ColorPicked?.Invoke(this, newColor);
+ }
+
+ private void PART_ToggleButton_Checked(object sender, RoutedEventArgs e) => ColorPopup.IsOpen = true;
+
+ private void PART_ToggleButton_Unchecked(object sender, RoutedEventArgs e) => ColorPopup.IsOpen = false;
+
+ private void ColorPopup_Opened(object sender, EventArgs e)
+ {
+ _colorOnOpen = SelectedColor;
+ PopupTransform.BeginAnimation(TranslateTransform.YProperty, FactoryAnimation.CreateIn(-5, 0, 0.3, useCubicEase: true));
+ PopupBorder.BeginAnimation(UIElement.OpacityProperty, FactoryAnimation.CreateIn(0, 1, 0.15));
+ }
+
+ private void ColorPopup_Closed(object sender, EventArgs e)
+ {
+ if (Mouse.LeftButton != MouseButtonState.Pressed || !PART_ToggleButton.IsMouseOver)
+ {
+ PART_ToggleButton.IsChecked = false;
+ if (_colorOnOpen != SelectedColor)
+ {
+ PickerClosed?.Invoke(this, EventArgs.Empty);
+ }
+ }
+ }
+
+ private void BtnDefault_Click(object sender, RoutedEventArgs e)
+ {
+ SelectedColor = DefaultColor;
+ UpdateInternalStateFromColor(DefaultColor);
+ NotifyColorChanged(DefaultColor);
+ }
+
+ private void ColorWheel_MouseDown(object sender, MouseButtonEventArgs e)
+ {
+ _isWheelBeingDragged = true;
+ PART_Wheel.CaptureMouse();
+ CalculateAndSetColorFromWheelPosition(e.GetPosition(PART_Wheel));
+ }
+
+ private void ColorWheel_MouseMove(object sender, MouseEventArgs e)
+ {
+ if (_isWheelBeingDragged)
+ {
+ CalculateAndSetColorFromWheelPosition(e.GetPosition(PART_Wheel));
+ }
+ }
+
+ private void ColorWheel_MouseUp(object sender, MouseButtonEventArgs e)
+ {
+ _isWheelBeingDragged = false;
+ PART_Wheel.ReleaseMouseCapture();
+ }
+
+ private void ValueCanvas_MouseDown(object sender, MouseButtonEventArgs e)
+ {
+ _isValueBeingDragged = true;
+ PART_ValueCanvas.CaptureMouse();
+ CalculateAndSetValueFromMouseY(e.GetPosition(PART_ValueCanvas).Y);
+ }
+
+ private void ValueCanvas_MouseMove(object sender, MouseEventArgs e)
+ {
+ if (_isValueBeingDragged)
+ {
+ CalculateAndSetValueFromMouseY(e.GetPosition(PART_ValueCanvas).Y);
+ }
+ }
+
+ private void ValueCanvas_MouseUp(object sender, MouseButtonEventArgs e)
+ {
+ _isValueBeingDragged = false;
+ PART_ValueCanvas.ReleaseMouseCapture();
+ }
+
+ private void HexBox_KeyDown(object sender, KeyEventArgs e)
+ {
+ if (e.Key == Key.Enter)
+ {
+ ValidateAndApplyHexColor();
+ PART_HexBox.MoveFocus(new TraversalRequest(FocusNavigationDirection.Next));
+ }
+ }
+
+ private void HexBox_LostFocus(object sender, RoutedEventArgs e) => ValidateAndApplyHexColor();
+
+ private void HexBox_TextChanged(object sender, TextChangedEventArgs e)
+ {
+ if (!_isUpdatingHexValue)
+ {
+ string rawHexInput = PART_HexBox.Text.Trim().Replace("#", "");
+ string cleanedHexInput = Regex.Replace(rawHexInput, "[^0-9a-fA-F]", "");
+
+ if (rawHexInput != cleanedHexInput)
+ {
+ _isUpdatingHexValue = true;
+ PART_HexBox.Text = $"#{cleanedHexInput}";
+ PART_HexBox.CaretIndex = PART_HexBox.Text.Length;
+ _isUpdatingHexValue = false;
+ }
+
+ if (cleanedHexInput.Length == 6)
+ {
+ ValidateAndApplyHexColor();
+ }
+ }
+ }
+
+ private void UpdatePopupPosition()
+ {
+ if (ColorPopup.IsOpen)
+ {
+ MethodInfo updatePositionMethod = typeof(System.Windows.Controls.Primitives.Popup).GetMethod("UpdatePosition", BindingFlags.NonPublic | BindingFlags.Instance);
+ updatePositionMethod?.Invoke(ColorPopup, null);
+ }
+ }
+
+ private void CalculateAndSetColorFromWheelPosition(Point mousePosition)
+ {
+ double deltaX = mousePosition.X - WheelRadius;
+ double deltaY = mousePosition.Y - WheelRadius;
+ double distanceFromCenter = Math.Sqrt(deltaX * deltaX + deltaY * deltaY);
+
+ if (distanceFromCenter > WheelRadius)
+ {
+ deltaX *= WheelRadius / distanceFromCenter;
+ deltaY *= WheelRadius / distanceFromCenter;
+ }
+
+ _selectedWheelX = WheelRadius + deltaX;
+ _selectedWheelY = WheelRadius + deltaY;
+ _currentSaturation = Math.Min(1.0, distanceFromCenter / WheelRadius);
+
+ double angleInDegrees = Math.Atan2(deltaY, deltaX) * 180.0 / Math.PI;
+
+ if (angleInDegrees < 0)
+ {
+ _currentHue = angleInDegrees + 360.0;
+ }
+ else
+ {
+ _currentHue = angleInDegrees;
+ }
+
+ ApplyCurrentHsvToInterface();
+ }
+
+ private void CalculateAndSetValueFromMouseY(double mouseYPosition)
+ {
+ double barHeight = PART_ValueBar.Height;
+ double markerHeight = PART_MarkerValue.Height;
+ double clampedY = Math.Max(markerHeight / 2, Math.Min(barHeight - markerHeight / 2, mouseYPosition));
+
+ Canvas.SetTop(PART_MarkerValue, clampedY - markerHeight / 2);
+ _currentValue = 1.0 - ((clampedY - markerHeight / 2) / (barHeight - markerHeight));
+
+ ApplyCurrentHsvToInterface();
+ }
+
+ private void ApplyCurrentHsvToInterface()
+ {
+ Color newColor = ConvertHsvToRgbColor(_currentHue, _currentSaturation, _currentValue);
+
+ Canvas.SetLeft(PART_MarkerWheel, _selectedWheelX - PART_MarkerWheel.Width / 2);
+ Canvas.SetTop(PART_MarkerWheel, _selectedWheelY - PART_MarkerWheel.Height / 2);
+
+ PART_ColorPreview.Fill = new SolidColorBrush(newColor);
+ PART_ColorTextBlock.Text = $"{newColor.R} {newColor.G} {newColor.B}";
+
+ if (!_isUpdatingHexValue)
+ {
+ _isUpdatingHexValue = true;
+ PART_HexBox.Text = $"#{newColor.R:X2}{newColor.G:X2}{newColor.B:X2}";
+ _isUpdatingHexValue = false;
+ }
+
+ NotifyColorChanged(newColor);
+ UpdateBrightnessBarBackground();
+ UpdateBrightnessMarkerPosition();
+ }
+
+ private void UpdateInternalStateFromColor(Color color)
+ {
+ ConvertRgbToHsv(color, out _currentHue, out _currentSaturation, out _currentValue);
+
+ double hueInRadians = _currentHue * Math.PI / 180.0;
+ _selectedWheelX = WheelRadius + (_currentSaturation * WheelRadius * Math.Cos(hueInRadians));
+ _selectedWheelY = WheelRadius + (_currentSaturation * WheelRadius * Math.Sin(hueInRadians));
+
+ ApplyCurrentHsvToInterface();
+ }
+
+ private void UpdateBrightnessBarBackground()
+ {
+ Color pureHueColor = ConvertHsvToRgbColor(_currentHue, _currentSaturation, 1.0);
+ PART_ValueBar.Fill = new LinearGradientBrush(pureHueColor, Colors.Black, new Point(0.5, 0), new Point(0.5, 1));
+ }
+
+ private void UpdateBrightnessMarkerPosition()
+ {
+ double barHeight = PART_ValueBar.Height;
+ double markerHeight = PART_MarkerValue.Height;
+ double markerYPosition = (1.0 - _currentValue) * (barHeight - markerHeight) + markerHeight / 2;
+
+ Canvas.SetTop(PART_MarkerValue, markerYPosition - markerHeight / 2);
+ Canvas.SetLeft(PART_MarkerValue, (PART_ValueBar.Width - markerHeight) / 2);
+ }
+
+ private void ValidateAndApplyHexColor()
+ {
+ if (!_isUpdatingHexValue)
+ {
+ string rawHexInput = Regex.Replace(PART_HexBox.Text.Trim().Replace("#", ""), "[^0-9a-fA-F]", "");
+
+ if (rawHexInput.Length != 0)
+ {
+ if (rawHexInput.Length < 6)
+ {
+ char lastCharacter = rawHexInput[rawHexInput.Length - 1];
+ rawHexInput = rawHexInput.PadRight(6, lastCharacter);
+ }
+
+ try
+ {
+ Color parsedColor = Color.FromRgb(Convert.ToByte(rawHexInput.Substring(0, 2), 16), Convert.ToByte(rawHexInput.Substring(2, 2), 16), Convert.ToByte(rawHexInput.Substring(4, 2), 16));
+
+ _isUpdatingHexValue = true;
+ UpdateInternalStateFromColor(parsedColor);
+ PART_HexBox.Text = $"#{rawHexInput.ToUpper()}";
+ _isUpdatingHexValue = false;
+ NotifyColorChanged(parsedColor);
+ }
+ catch { RevertHexBoxToSelectedColor(); }
+ }
+ else
+ {
+ RevertHexBoxToSelectedColor();
+ return;
+ }
+ }
+ }
+
+ private void RevertHexBoxToSelectedColor()
+ {
+ _isUpdatingHexValue = true;
+ PART_HexBox.Text = $"#{SelectedColor.R:X2}{SelectedColor.G:X2}{SelectedColor.B:X2}";
+ _isUpdatingHexValue = false;
+ }
+
+ private static void ConvertRgbToHsv(Color rgbColor, out double hue, out double saturation, out double value)
+ {
+ double red = rgbColor.R / 255.0;
+ double green = rgbColor.G / 255.0;
+ double blue = rgbColor.B / 255.0;
+
+ double maximumColorValue = Math.Max(red, Math.Max(green, blue));
+ double minimumColorValue = Math.Min(red, Math.Min(green, blue));
+ double colorDifference = maximumColorValue - minimumColorValue;
+
+ value = maximumColorValue;
+ saturation = (maximumColorValue == 0) ? 0 : (colorDifference / maximumColorValue);
+
+ hue = colorDifference switch
+ {
+ 0 => 0,
+ _ when maximumColorValue == red => 60.0 * (((green - blue) / colorDifference) % 6.0),
+ _ when maximumColorValue == green => 60.0 * (((blue - red) / colorDifference) + 2.0),
+ _ => 60.0 * (((red - green) / colorDifference) + 4.0)
+ };
+
+ if (hue < 0)
+ {
+ hue += 360.0;
+ }
+ }
+
+ private static Color ConvertHsvToRgbColor(double hue, double saturation, double value)
+ {
+ if (saturation == 0)
+ {
+ byte grayScaleValue = (byte)(value * 255.0);
+ return Color.FromRgb(grayScaleValue, grayScaleValue, grayScaleValue);
+ }
+
+ hue /= 60.0;
+ int colorSector = (int)Math.Floor(hue);
+ double fractionalSector = hue - colorSector;
+
+ double baseColor = value * (1.0 - saturation);
+ double decreasingColor = value * (1.0 - saturation * fractionalSector);
+ double increasingColor = value * (1.0 - saturation * (1.0 - fractionalSector));
+
+ (double calculatedRed, double calculatedGreen, double calculatedBlue) = colorSector switch
+ {
+ 0 => (value, increasingColor, baseColor),
+ 1 => (decreasingColor, value, baseColor),
+ 2 => (baseColor, value, increasingColor),
+ 3 => (baseColor, decreasingColor, value),
+ 4 => (increasingColor, baseColor, value),
+ _ => (value, baseColor, decreasingColor)
+ };
+
+ return Color.FromRgb((byte)(calculatedRed * 255.0), (byte)(calculatedGreen * 255.0), (byte)(calculatedBlue * 255.0));
+ }
+ }
+}
\ No newline at end of file
diff --git a/.Source/GTweak/Assets/UserControl/ColorWheelPicker/ColorWheelEffect.cs b/.Source/GTweak/Assets/UserControls/ColorWheelPicker/ColorWheelEffect.cs
similarity index 86%
rename from .Source/GTweak/Assets/UserControl/ColorWheelPicker/ColorWheelEffect.cs
rename to .Source/GTweak/Assets/UserControls/ColorWheelPicker/ColorWheelEffect.cs
index 21dfdc7d..2dd4c753 100644
--- a/.Source/GTweak/Assets/UserControl/ColorWheelPicker/ColorWheelEffect.cs
+++ b/.Source/GTweak/Assets/UserControls/ColorWheelPicker/ColorWheelEffect.cs
@@ -3,13 +3,13 @@ using System.Windows;
using System.Windows.Media;
using System.Windows.Media.Effects;
-namespace GTweak.Assets.UserControl.ColorWheelPicker
+namespace GTweak.Assets.UserControls.ColorWheelPicker
{
public class ColorWheelEffect : ShaderEffect
{
private static readonly PixelShader _shader = new PixelShader()
{
- UriSource = new Uri("pack://application:,,,/GTweak;component/Assets/UserControl/ColorWheelPicker/ColorWheelEffect.ps")
+ UriSource = new Uri("pack://application:,,,/GTweak;component/Assets/UserControls/ColorWheelPicker/ColorWheelEffect.ps")
};
public ColorWheelEffect()
diff --git a/.Source/GTweak/Assets/UserControl/ColorWheelPicker/ColorWheelEffect.ps b/.Source/GTweak/Assets/UserControls/ColorWheelPicker/ColorWheelEffect.ps
similarity index 100%
rename from .Source/GTweak/Assets/UserControl/ColorWheelPicker/ColorWheelEffect.ps
rename to .Source/GTweak/Assets/UserControls/ColorWheelPicker/ColorWheelEffect.ps
diff --git a/.Source/GTweak/Assets/UserControl/DescriptionBlock.xaml b/.Source/GTweak/Assets/UserControls/DescriptionBlock.xaml
similarity index 96%
rename from .Source/GTweak/Assets/UserControl/DescriptionBlock.xaml
rename to .Source/GTweak/Assets/UserControls/DescriptionBlock.xaml
index 024a8210..8b05ae69 100644
--- a/.Source/GTweak/Assets/UserControl/DescriptionBlock.xaml
+++ b/.Source/GTweak/Assets/UserControls/DescriptionBlock.xaml
@@ -1,9 +1,9 @@
-<UserControl x:Class="GTweak.Assets.UserControl.DescriptionBlock"
+<UserControl x:Class="GTweak.Assets.UserControls.DescriptionBlock"
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"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:local="clr-namespace:GTweak.Assets.UserControl"
+ xmlns:local="clr-namespace:GTweak.Assets.UserControls"
mc:Ignorable="d" IsTabStop="False" KeyboardNavigation.TabNavigation="None" SnapsToDevicePixels="True" UseLayoutRounding="True"
d:DesignHeight="450" d:DesignWidth="800" Loaded="DescriptionBlock_Loaded">
<Grid Margin="10">
diff --git a/.Source/GTweak/Assets/UserControl/DescriptionBlock.xaml.cs b/.Source/GTweak/Assets/UserControls/DescriptionBlock.xaml.cs
similarity index 99%
rename from .Source/GTweak/Assets/UserControl/DescriptionBlock.xaml.cs
rename to .Source/GTweak/Assets/UserControls/DescriptionBlock.xaml.cs
index ce913cd1..0c07d2bd 100644
--- a/.Source/GTweak/Assets/UserControl/DescriptionBlock.xaml.cs
+++ b/.Source/GTweak/Assets/UserControls/DescriptionBlock.xaml.cs
@@ -6,7 +6,7 @@ using System.Windows.Controls;
using GTweak.Utilities.Animation;
using GTweak.Utilities.Controls;
-namespace GTweak.Assets.UserControl
+namespace GTweak.Assets.UserControls
{
public partial class DescriptionBlock
{
diff --git a/.Source/GTweak/Assets/UserControl/FileCard.xaml b/.Source/GTweak/Assets/UserControls/FileCard.xaml
similarity index 96%
rename from .Source/GTweak/Assets/UserControl/FileCard.xaml
rename to .Source/GTweak/Assets/UserControls/FileCard.xaml
index d2b82537..103f6a53 100644
--- a/.Source/GTweak/Assets/UserControl/FileCard.xaml
+++ b/.Source/GTweak/Assets/UserControls/FileCard.xaml
@@ -1,9 +1,9 @@
-<UserControl x:Class="GTweak.Assets.UserControl.FileCard"
+<UserControl x:Class="GTweak.Assets.UserControls.FileCard"
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"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:local="clr-namespace:GTweak.Assets.UserControl"
+ xmlns:local="clr-namespace:GTweak.Assets.UserControls"
mc:Ignorable="d"
d:Height="Auto" d:Width="Auto" IsTabStop="False" KeyboardNavigation.TabNavigation="None" SnapsToDevicePixels="True"
UseLayoutRounding="True" Cursor="Hand" MaxWidth="200" >
diff --git a/.Source/GTweak/Assets/UserControl/FileCard.xaml.cs b/.Source/GTweak/Assets/UserControls/FileCard.xaml.cs
similarity index 98%
rename from .Source/GTweak/Assets/UserControl/FileCard.xaml.cs
rename to .Source/GTweak/Assets/UserControls/FileCard.xaml.cs
index cc17c12d..1023198c 100644
--- a/.Source/GTweak/Assets/UserControl/FileCard.xaml.cs
+++ b/.Source/GTweak/Assets/UserControls/FileCard.xaml.cs
@@ -4,7 +4,7 @@ using System.Windows.Input;
using System.Windows.Media;
using GTweak.Utilities.Animation;
-namespace GTweak.Assets.UserControl
+namespace GTweak.Assets.UserControls
{
public partial class FileCard
{
diff --git a/.Source/GTweak/Assets/UserControls/FlowPanel.cs b/.Source/GTweak/Assets/UserControls/FlowPanel.cs
new file mode 100644
index 00000000..ab0b06c7
--- /dev/null
+++ b/.Source/GTweak/Assets/UserControls/FlowPanel.cs
@@ -0,0 +1,684 @@
+using System;
+using System.Collections.Generic;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Media;
+using GTweak.Utilities.Animation;
+using GTweak.Utilities.Controls;
+
+namespace GTweak.Assets.UserControls
+{
+ internal sealed class FlowPanel : Panel
+ {
+ private sealed class FlowItemGroup
+ {
+ internal readonly List<UIElement> Elements = new List<UIElement>();
+ internal double Width;
+ internal double Height;
+ }
+
+ public enum FlowOrientation
+ {
+ Unset = 0,
+ Vertical = 1,
+ Horizontal = 2
+ }
+
+ public static readonly DependencyProperty HorizontalSpacingProperty = DependencyProperty.Register(nameof(HorizontalSpacing), typeof(double), typeof(FlowPanel),
+ new FrameworkPropertyMetadata(20.0, FrameworkPropertyMetadataOptions.AffectsArrange));
+
+ public static readonly DependencyProperty VerticalSpacingProperty = DependencyProperty.Register(nameof(VerticalSpacing), typeof(double), typeof(FlowPanel),
+ new FrameworkPropertyMetadata(10.0, FrameworkPropertyMetadataOptions.AffectsArrange));
+
+ public static readonly DependencyProperty ContentAlignmentProperty = DependencyProperty.Register(nameof(ContentAlignment), typeof(HorizontalAlignment), typeof(FlowPanel),
+ new FrameworkPropertyMetadata(HorizontalAlignment.Left, FrameworkPropertyMetadataOptions.AffectsArrange));
+
+ public static readonly DependencyProperty UseMasonryLayoutProperty = DependencyProperty.Register(nameof(UseMasonryLayout), typeof(bool), typeof(FlowPanel),
+ new FrameworkPropertyMetadata(true, FrameworkPropertyMetadataOptions.AffectsArrange | FrameworkPropertyMetadataOptions.AffectsMeasure));
+
+ public static readonly DependencyProperty OrientationProperty = DependencyProperty.Register(nameof(Orientation), typeof(FlowOrientation), typeof(FlowPanel),
+ new FrameworkPropertyMetadata(FlowOrientation.Unset, FrameworkPropertyMetadataOptions.AffectsArrange | FrameworkPropertyMetadataOptions.AffectsMeasure));
+
+ public static readonly DependencyProperty EqualizeItemSizeProperty = DependencyProperty.Register(nameof(EqualizeItemSize), typeof(bool), typeof(FlowPanel),
+ new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsArrange | FrameworkPropertyMetadataOptions.AffectsMeasure));
+
+ public static readonly DependencyProperty ItemWidthProperty = DependencyProperty.Register(nameof(ItemWidth), typeof(double), typeof(FlowPanel),
+ new FrameworkPropertyMetadata(320.0, FrameworkPropertyMetadataOptions.AffectsMeasure | FrameworkPropertyMetadataOptions.AffectsArrange));
+
+ public double HorizontalSpacing
+ {
+ get => (double)GetValue(HorizontalSpacingProperty);
+ set => SetValue(HorizontalSpacingProperty, value);
+ }
+
+ public double VerticalSpacing
+ {
+ get => (double)GetValue(VerticalSpacingProperty);
+ set => SetValue(VerticalSpacingProperty, value);
+ }
+
+ public HorizontalAlignment ContentAlignment
+ {
+ get => (HorizontalAlignment)GetValue(ContentAlignmentProperty);
+ set => SetValue(ContentAlignmentProperty, value);
+ }
+
+ public bool UseMasonryLayout
+ {
+ get => (bool)GetValue(UseMasonryLayoutProperty);
+ set => SetValue(UseMasonryLayoutProperty, value);
+ }
+
+ public FlowOrientation Orientation
+ {
+ get => (FlowOrientation)GetValue(OrientationProperty);
+ set => SetValue(OrientationProperty, value);
+ }
+
+ public bool EqualizeItemSize
+ {
+ get => (bool)GetValue(EqualizeItemSizeProperty);
+ set => SetValue(EqualizeItemSizeProperty, value);
+ }
+
+ public double ItemWidth
+ {
+ get => (double)GetValue(ItemWidthProperty);
+ set => SetValue(ItemWidthProperty, value);
+ }
+
+ private readonly Dictionary<UIElement, Point> _lastPos = new Dictionary<UIElement, Point>();
+
+ private static bool Moved(Point a, Point b) => Math.Abs(a.X - b.X) > 0.5 || Math.Abs(a.Y - b.Y) > 0.5;
+
+ private double GetChildWidth(UIElement child) => EqualizeItemSize ? ItemWidth : child?.DesiredSize.Width ?? 0;
+
+ private double GetChildHeight(UIElement child) => child?.DesiredSize.Height ?? 0;
+
+ protected override Size MeasureOverride(Size availableSize)
+ {
+ try
+ {
+ List<UIElement> visible = new List<UIElement>(InternalChildren.Count);
+ for (int i = 0; i < InternalChildren?.Count; i++)
+ {
+ UIElement child = InternalChildren[i];
+ if (child != null && child.Visibility != Visibility.Collapsed)
+ {
+ visible.Add(child);
+ }
+ }
+
+ if (visible?.Count == 0)
+ {
+ return new Size(0, 0);
+ }
+
+ double aw = double.IsInfinity(availableSize.Width) ? 1200 : availableSize.Width;
+ double ah = double.PositiveInfinity;
+
+ if (EqualizeItemSize)
+ {
+ Size constraint = new Size(ItemWidth, double.PositiveInfinity);
+ foreach (UIElement child in visible)
+ {
+ child?.Measure(constraint);
+ }
+ }
+ else
+ {
+ Size constraint = new Size(double.PositiveInfinity, double.PositiveInfinity);
+ foreach (UIElement child in visible)
+ {
+ child?.Measure(constraint);
+ }
+ }
+
+ double neededHeight = CalculateNeededHeight(aw, ah, visible);
+ return new Size(aw, neededHeight);
+ }
+ catch { return new Size(0, 0); }
+ }
+
+ protected override Size ArrangeOverride(Size finalSize)
+ {
+ try
+ {
+ List<UIElement> visible = new List<UIElement>(InternalChildren.Count);
+ for (int i = 0; i < InternalChildren?.Count; i++)
+ {
+ UIElement child = InternalChildren[i];
+ if (child != null && child.Visibility != Visibility.Collapsed)
+ {
+ visible.Add(child);
+ }
+ }
+
+ if (visible.Count == 0)
+ {
+ return finalSize;
+ }
+
+ List<FlowItemGroup> groups = CreateOptimalColumns(finalSize.Width, finalSize.Height, visible);
+ ArrangeAligned(groups, finalSize.Width);
+
+ return finalSize;
+ }
+ catch { return finalSize; }
+ }
+
+ private void ArrangeAligned(List<FlowItemGroup> groups, double availableWidth)
+ {
+ if (groups == null || groups?.Count == 0)
+ {
+ return;
+ }
+
+ try
+ {
+ if (Orientation == FlowOrientation.Horizontal)
+ {
+ double y = 0;
+
+ for (int i = 0; i < groups?.Count; i++)
+ {
+ FlowItemGroup row = groups[i];
+ if (row == null || row.Elements.Count == 0)
+ {
+ if (row != null)
+ {
+ y += row.Height + 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 (UIElement child in row.Elements)
+ {
+ if (child == null)
+ {
+ continue;
+ }
+
+ try
+ {
+ double w = GetChildWidth(child);
+ double h = GetChildHeight(child);
+
+ Point newPos = new Point(x, y);
+ child.Arrange(new Rect(newPos.X, newPos.Y, w, h));
+
+ if (!_lastPos.TryGetValue(child, out var oldPos) || Moved(oldPos, newPos))
+ {
+ _lastPos[child] = newPos;
+
+ if (!(child.RenderTransform is TranslateTransform transform))
+ {
+ transform = new TranslateTransform(0, 0);
+ child.RenderTransform = transform;
+ }
+
+ 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 += w + HorizontalSpacing;
+ }
+ catch { continue; }
+ }
+
+ y += row.Height + VerticalSpacing;
+ }
+
+ return;
+ }
+
+ double contentWidth = 0;
+ for (int i = 0; i < groups?.Count; i++)
+ {
+ if (groups[i] != null)
+ {
+ contentWidth += groups[i].Width;
+ if (i > 0)
+ {
+ contentWidth += HorizontalSpacing;
+ }
+ }
+ }
+
+ double extraSpaceV = Math.Max(0, availableWidth - contentWidth);
+ double xStartV = ContentAlignment switch
+ {
+ HorizontalAlignment.Center => extraSpaceV / 2.0,
+ HorizontalAlignment.Right => extraSpaceV,
+ _ => 0
+ };
+
+ double xV = xStartV;
+
+ for (int i = 0; i < groups?.Count; i++)
+ {
+ FlowItemGroup col = groups[i];
+ if (col == null || col.Elements.Count == 0)
+ {
+ if (col != null)
+ {
+ xV += col.Width + HorizontalSpacing;
+ }
+
+ continue;
+ }
+
+ double shift = 0;
+ if (Orientation == FlowOrientation.Unset && groups?.Count > 1 && i > 0)
+ {
+ shift = extraSpaceV * (i / (double)(groups.Count - 1)) * 0.3;
+ }
+
+ double columnX = xV + shift;
+ double y = 0;
+
+ foreach (UIElement child in col.Elements)
+ {
+ if (child != null)
+ {
+ try
+ {
+ double w = GetChildWidth(child);
+ double h = GetChildHeight(child);
+
+ Point newPos = new Point(columnX, y);
+ child.Arrange(new Rect(newPos.X, newPos.Y, w, h));
+
+ if (!_lastPos.TryGetValue(child, out var oldPos) || Moved(oldPos, newPos))
+ {
+ _lastPos[child] = newPos;
+
+ if (!(child.RenderTransform is TranslateTransform transform))
+ {
+ transform = new TranslateTransform(0, 0);
+ child.RenderTransform = transform;
+ }
+
+ 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 += h + VerticalSpacing;
+ }
+ catch { continue; }
+ }
+ }
+
+ xV += col.Width + HorizontalSpacing;
+ }
+ }
+ catch (Exception ex) { ErrorLogging.LogDebug(ex); }
+ }
+
+ private double CalculateNeededHeight(double availableWidth, double availableHeight, List<UIElement> visibleChildren)
+ {
+ try
+ {
+ List<FlowItemGroup> groups = CreateOptimalColumns(availableWidth, availableHeight, visibleChildren);
+
+ if (Orientation == FlowOrientation.Horizontal)
+ {
+ double total = 0;
+ for (int i = 0; i < groups?.Count; i++)
+ {
+ if (groups[i] != null)
+ {
+ total += groups[i].Height;
+ if (i > 0)
+ {
+ total += VerticalSpacing;
+ }
+ }
+ }
+ return total;
+ }
+
+ return CalculateMaxColumnHeight(groups);
+ }
+ catch { return 0; }
+ }
+
+ private double CalculateMaxColumnHeight(List<FlowItemGroup> columns)
+ {
+ try
+ {
+ if (columns == null || columns?.Count == 0)
+ {
+ return 0;
+ }
+
+ double max = 0;
+
+ for (int i = 0; i < columns?.Count; i++)
+ {
+ FlowItemGroup col = columns[i];
+ if (col == null)
+ {
+ continue;
+ }
+
+ double h = 0;
+
+ for (int j = 0; j < col.Elements.Count; j++)
+ {
+ UIElement child = col.Elements[j];
+ if (child == null)
+ {
+ continue;
+ }
+
+ h += GetChildHeight(child);
+ if (j > 0)
+ {
+ h += VerticalSpacing;
+ }
+ }
+
+ if (h > max)
+ {
+ max = h;
+ }
+ }
+
+ return max;
+ }
+ catch { return 0; }
+ }
+
+ private List<FlowItemGroup> CreateOptimalColumns(double availableWidth, double availableHeight, List<UIElement> visibleChildren)
+ {
+ try
+ {
+ if (visibleChildren == null || 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);
+ }
+ catch { return new List<FlowItemGroup>(); }
+ }
+
+ private List<FlowItemGroup> CreateWrappedRows(double maxWidth, List<UIElement> visibleChildren)
+ {
+ try
+ {
+ List<FlowItemGroup> rows = new List<FlowItemGroup>();
+ FlowItemGroup current = null;
+
+ foreach (UIElement child in visibleChildren)
+ {
+ if (child == null)
+ {
+ continue;
+ }
+
+ double childWidth = GetChildWidth(child);
+ double childHeight = GetChildHeight(child);
+
+ 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;
+ }
+ catch { return new List<FlowItemGroup>(); }
+ }
+
+ private List<FlowItemGroup> CreateWrappedColumns(double maxHeight, List<UIElement> visibleChildren)
+ {
+ try
+ {
+ List<FlowItemGroup> cols = new List<FlowItemGroup>();
+ FlowItemGroup current = null;
+
+ foreach (UIElement child in visibleChildren)
+ {
+ if (child == null)
+ {
+ continue;
+ }
+
+ double childWidth = GetChildWidth(child);
+ double childHeight = GetChildHeight(child);
+
+ 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;
+ }
+ catch { return new List<FlowItemGroup>(); }
+ }
+
+ private List<FlowItemGroup> TryDistributeToColumns(int columnCount, double maxHeight, List<UIElement> visibleChildren)
+ {
+ List<FlowItemGroup> columns = new List<FlowItemGroup>(columnCount);
+ for (int i = 0; i < columnCount; i++)
+ {
+ columns.Add(new FlowItemGroup());
+ }
+
+ if (UseMasonryLayout)
+ {
+ double[] heights = new double[columnCount];
+
+ foreach (UIElement child in visibleChildren)
+ {
+ if (child == null)
+ {
+ continue; // ← Проверка ПЕРЕД использованием
+ }
+
+ int minIndex = 0;
+ double minH = heights[0];
+ for (int i = 1; i < columnCount; i++)
+ {
+ if (heights[i] < minH)
+ {
+ minH = heights[i];
+ minIndex = i;
+ }
+ }
+
+ double h = GetChildHeight(child);
+ double newHeight = heights[minIndex] + (heights[minIndex] > 0 ? VerticalSpacing : 0) + h;
+
+ if (newHeight > maxHeight)
+ {
+ return new List<FlowItemGroup>(); // ← Возвращаем пустой список
+ }
+
+ if (columns[minIndex] != null) // ← Дополнительная проверка
+ {
+ columns[minIndex].Elements.Add(child);
+ columns[minIndex].Width = Math.Max(columns[minIndex].Width, GetChildWidth(child));
+ heights[minIndex] = newHeight;
+ }
+ }
+
+ for (int i = 0; i < columnCount; i++)
+ {
+ if (columns[i] != null)
+ {
+ columns[i].Height = heights[i];
+ }
+ }
+ }
+ else
+ {
+ int index = 0;
+
+ foreach (UIElement child in visibleChildren)
+ {
+ if (child == null)
+ {
+ continue;
+ }
+
+ int colIndex = index % columnCount;
+
+ if (columns[colIndex] != null)
+ {
+ double addedHeight = (columns[colIndex].Height > 0 ? VerticalSpacing : 0) + GetChildHeight(child);
+ double newHeight = columns[colIndex].Height + addedHeight;
+
+ if (newHeight > maxHeight)
+ {
+ return new List<FlowItemGroup>();
+ }
+
+ columns[colIndex].Elements.Add(child);
+ columns[colIndex].Width = Math.Max(columns[colIndex].Width, GetChildWidth(child));
+ columns[colIndex].Height = newHeight;
+ }
+
+ index++;
+ }
+ }
+
+ return columns;
+ }
+
+ private List<FlowItemGroup> CreateSingleColumn(List<UIElement> visibleChildren)
+ {
+ try
+ {
+ FlowItemGroup col = new FlowItemGroup();
+ double totalHeight = 0;
+
+ foreach (UIElement child in visibleChildren)
+ {
+ if (child == null)
+ {
+ continue;
+ }
+
+ col.Elements.Add(child);
+ col.Width = Math.Max(col.Width, GetChildWidth(child));
+
+ totalHeight += GetChildHeight(child);
+ if (col.Elements?.Count > 1)
+ {
+ totalHeight += VerticalSpacing;
+ }
+ }
+
+ col.Height = totalHeight;
+ return new List<FlowItemGroup> { col };
+ }
+ catch { return new List<FlowItemGroup>(); }
+ }
+
+ private double CalculateTotalWidth(List<FlowItemGroup> columns)
+ {
+ try
+ {
+ if (columns == null || columns?.Count == 0)
+ {
+ return 0;
+ }
+
+ double total = 0;
+ for (int i = 0; i < columns?.Count; i++)
+ {
+ if (columns[i] != null)
+ {
+ total += columns[i].Width;
+ if (i > 0)
+ {
+ total += HorizontalSpacing;
+ }
+ }
+ }
+ return total;
+ }
+ catch { return 0; }
+ }
+ }
+}
\ No newline at end of file
diff --git a/.Source/GTweak/Assets/UserControl/ToggleButton.xaml b/.Source/GTweak/Assets/UserControls/ToggleButton.xaml
similarity index 97%
rename from .Source/GTweak/Assets/UserControl/ToggleButton.xaml
rename to .Source/GTweak/Assets/UserControls/ToggleButton.xaml
index 184cfcfc..f26afd0f 100644
--- a/.Source/GTweak/Assets/UserControl/ToggleButton.xaml
+++ b/.Source/GTweak/Assets/UserControls/ToggleButton.xaml
@@ -1,9 +1,9 @@
-<UserControl x:Class="GTweak.Assets.UserControl.ToggleButton"
+<UserControl x:Class="GTweak.Assets.UserControls.ToggleButton"
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"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:local="clr-namespace:GTweak.Assets.UserControl"
+ xmlns:local="clr-namespace:GTweak.Assets.UserControls"
mc:Ignorable="d"
d:Height="auto" d:Width="auto" IsTabStop="False" KeyboardNavigation.TabNavigation="None"
SnapsToDevicePixels="True" UseLayoutRounding="True">
diff --git a/.Source/GTweak/Assets/UserControl/ToggleButton.xaml.cs b/.Source/GTweak/Assets/UserControls/ToggleButton.xaml.cs
similarity index 99%
rename from .Source/GTweak/Assets/UserControl/ToggleButton.xaml.cs
rename to .Source/GTweak/Assets/UserControls/ToggleButton.xaml.cs
index fc5b01e2..9635f97e 100644
--- a/.Source/GTweak/Assets/UserControl/ToggleButton.xaml.cs
+++ b/.Source/GTweak/Assets/UserControls/ToggleButton.xaml.cs
@@ -7,7 +7,7 @@ using System.Windows.Media.Animation;
using System.Windows.Shapes;
using GTweak.Utilities.Animation;
-namespace GTweak.Assets.UserControl
+namespace GTweak.Assets.UserControls
{
public partial class ToggleButton
{
diff --git a/.Source/GTweak/Core/Model/InterfaceModel.cs b/.Source/GTweak/Core/Model/InterfaceModel.cs
index 8c4dc7fa..5b32240b 100644
--- a/.Source/GTweak/Core/Model/InterfaceModel.cs
+++ b/.Source/GTweak/Core/Model/InterfaceModel.cs
@@ -1,10 +1,11 @@
-using GTweak.Core.Base;
+using GTweak.Core.Base;
namespace GTweak.Core.Model
{
- internal sealed class InterfaceModel : IBasePageItem
+ internal sealed class InterfaceModel : ITypedPageItem<string>
{
public string Name { get; set; }
public bool State { get; set; }
+ public string Value { get; set; }
}
}
diff --git a/.Source/GTweak/GTweak.csproj b/.Source/GTweak/GTweak.csproj
index 7b595a78..e18efd7a 100644
--- a/.Source/GTweak/GTweak.csproj
+++ b/.Source/GTweak/GTweak.csproj
@@ -128,18 +128,18 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</ApplicationDefinition>
- <Compile Include="Assets\UserControl\Card.xaml.cs">
+ <Compile Include="Assets\UserControls\Card.xaml.cs">
<DependentUpon>Card.xaml</DependentUpon>
</Compile>
- <Compile Include="Assets\UserControl\ColorWheelPicker\ColorPicker.xaml.cs">
+ <Compile Include="Assets\UserControls\ColorWheelPicker\ColorPicker.xaml.cs">
<DependentUpon>ColorPicker.xaml</DependentUpon>
</Compile>
- <Compile Include="Assets\UserControl\ColorWheelPicker\ColorWheelEffect.cs" />
- <Compile Include="Assets\UserControl\DescriptionBlock.xaml.cs">
+ <Compile Include="Assets\UserControls\ColorWheelPicker\ColorWheelEffect.cs" />
+ <Compile Include="Assets\UserControls\DescriptionBlock.xaml.cs">
<DependentUpon>DescriptionBlock.xaml</DependentUpon>
</Compile>
- <Compile Include="Assets\UserControl\FlowPanel.cs" />
- <Compile Include="Assets\UserControl\FileCard.xaml.cs">
+ <Compile Include="Assets\UserControls\FlowPanel.cs" />
+ <Compile Include="Assets\UserControls\FileCard.xaml.cs">
<DependentUpon>FileCard.xaml</DependentUpon>
</Compile>
<Compile Include="Core\Base\ViewModelPageBase.cs" />
@@ -238,23 +238,23 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
- <Page Include="Assets\UserControl\Card.xaml">
+ <Page Include="Assets\UserControls\Card.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
- <Page Include="Assets\UserControl\ColorWheelPicker\ColorPicker.xaml">
+ <Page Include="Assets\UserControls\ColorWheelPicker\ColorPicker.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
- <Page Include="Assets\UserControl\DescriptionBlock.xaml">
+ <Page Include="Assets\UserControls\DescriptionBlock.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
- <Page Include="Assets\UserControl\FileCard.xaml">
+ <Page Include="Assets\UserControls\FileCard.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
- <Page Include="Assets\UserControl\ToggleButton.xaml">
+ <Page Include="Assets\UserControls\ToggleButton.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
@@ -406,7 +406,7 @@
<DependentUpon>App.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
- <Compile Include="Assets\UserControl\ToggleButton.xaml.cs">
+ <Compile Include="Assets\UserControls\ToggleButton.xaml.cs">
<DependentUpon>ToggleButton.xaml</DependentUpon>
</Compile>
<Compile Include="Core\Model\MainWinModel.cs" />
@@ -487,7 +487,7 @@
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
<None Include=".editorconfig" />
- <Resource Include="Assets\UserControl\ColorWheelPicker\ColorWheelEffect.ps" />
+ <Resource Include="Assets\UserControls\ColorWheelPicker\ColorWheelEffect.ps" />
<None Include="Resources\Blank.gz" />
<None Include="Resources\DisablingWD.gz" />
<None Include="Resources\hosts.gz" />
diff --git a/.Source/GTweak/Languages/en/Localize.xaml b/.Source/GTweak/Languages/en/Localize.xaml
index 96be2b83..156d6b7e 100644
--- a/.Source/GTweak/Languages/en/Localize.xaml
+++ b/.Source/GTweak/Languages/en/Localize.xaml
@@ -4,7 +4,8 @@
<v:String x:Key="defaultDescription">Hover your mouse over any tweak to get its description</v:String>
<v:String x:Key="defaultDescriptionApp">Hover your mouse over the icon of any application to see its name</v:String>
-
+ <v:String x:Key="btn_default">Default</v:String>
+
<!--#region Load Window -->
<v:String x:Key="title_load">Loading</v:String>
<v:String x:Key="step1_load">Uploading a profile</v:String>
@@ -190,8 +191,10 @@
<!--#endregion-->
<!--#region Interface Page -->
- <v:String x:Key="tgl1_intf">Standard color cursor selection</v:String>
- <v:String x:Key="tgl2_intf">Standard color of the tooltip</v:String>
+ <v:String x:Key="color1_intf">Cursor selection color:</v:String>
+ <v:String x:Key="color2_intf">Tooltip color:</v:String>
+ <v:String x:Key="tgl1_intf">Displaying file extensions in explorer</v:String>
+ <v:String x:Key="tgl2_intf">Spontaneous brightness changes</v:String>
<v:String x:Key="tgl3_intf">Standard size of the system buttons</v:String>
<v:String x:Key="tgl4_intf">Standard cursor flicker frequency</v:String>
<v:String x:Key="tgl5_intf">Standard scrollbar size</v:String>
@@ -222,11 +225,11 @@
<v:String x:Key="tgl30_intf">Tooltips for desktop elements</v:String>
<v:String x:Key="tgl31_intf">Search query with «Bing» integration in Start menu</v:String>
<v:String x:Key="tgl32_intf">Open «Quick Access» instead of «This PC»</v:String>
- <v:String x:Key="tgl33_intf">Displaying file extensions in explorer</v:String>
- <v:String x:Key="tgl34_intf">Spontaneous brightness changes</v:String>
- <v:String x:Key="tgl1_desc_intf">Will change the color of the cursor selection from blue to gray «wet asphalt».</v:String>
- <v:String x:Key="tgl2_desc_intf">Will change the color of the tooltip in some programs from yellow to light blue «azure».</v:String>
+ <v:String x:Key="color1_desc_intf">Adjust the background color when selecting text or objects with the cursor.</v:String>
+ <v:String x:Key="color2_desc_intf">Adjust the tooltip color in supported applications.</v:String>
+ <v:String x:Key="tgl1_desc_intf">By default, Windows hides file extensions, which makes the File Explorer view less cluttered. If needed, you can enable the display of file extensions using this tweak, saving you the time spent searching. Attention the screen may blink.</v:String>
+ <v:String x:Key="tgl2_desc_intf">On some devices, the screen brightness may change spontaneously depending on the displayed content. If turning off HDR, dynamic brightness, and power settings doesn’t solve the issue (this problem is especially common on laptops running on battery), you can try this tweak - it forcibly disables automatic brightness adjustment at the system level. Manual brightness control remains available.</v:String>
<v:String x:Key="tgl3_desc_intf">A tweak reduces the size of the Minimize, Maximize, and Close buttons, making them less bulky. It adjusts the size for all windows, including File Explorer, Photos, browsers, and other familiar programs.</v:String>
<v:String x:Key="tgl4_desc_intf">A tweak increases the frequency of the text cursor's blinking. By default, the cursor blinks every 530 milliseconds.</v:String>
<v:String x:Key="tgl5_desc_intf">A tweak reduces the thickness of scrollbars in classic Windows applications, including File Explorer, browsers, and other legacy programs. However, it does not affect modern interfaces, as they utilize their own control elements independent of system settings.</v:String>
@@ -257,8 +260,6 @@
<v:String x:Key="tgl30_desc_intf">Tweak will disable tooltips for desktop elements when hovering the mouse cursor.</v:String>
<v:String x:Key="tgl31_desc_intf">By default, Windows sends everything you search for in the «Start» menu to its servers to provide you with Bing search results. If you don't need Bing integration in the «Start» menu, you can apply a tweak to disable web search. Attention the screen may blink.</v:String>
<v:String x:Key="tgl32_desc_intf">By default, when you open Explorer, the first tab will be «Quick Access». And to open any disk, you need to make unnecessary movements. This tweak will make «This PC» open when opened, rather than «Quick Access».</v:String>
- <v:String x:Key="tgl33_desc_intf">By default, Windows hides file extensions, which makes the File Explorer view less cluttered. If needed, you can enable the display of file extensions using this tweak, saving you the time spent searching. Attention the screen may blink.</v:String>
- <v:String x:Key="tgl34_desc_intf">On some devices, the screen brightness may change spontaneously depending on the displayed content. If turning off HDR, dynamic brightness, and power settings doesn’t solve the issue (this problem is especially common on laptops running on battery), you can try this tweak - it forcibly disables automatic brightness adjustment at the system level. Manual brightness control remains available.</v:String>
<!--#endregion-->
<!--#region Packages Page -->
diff --git a/.Source/GTweak/Languages/fr/Localize.xaml b/.Source/GTweak/Languages/fr/Localize.xaml
index cc551e0a..0cc2f4d0 100644
--- a/.Source/GTweak/Languages/fr/Localize.xaml
+++ b/.Source/GTweak/Languages/fr/Localize.xaml
@@ -4,7 +4,8 @@
<v:String x:Key="defaultDescription">Survolez une modification avec votre souris pour obtenir sa description</v:String>
<v:String x:Key="defaultDescriptionApp">Survolez l'icône d'une application pour voir son nom</v:String>
-
+ <v:String x:Key="btn_default">Par défaut</v:String>
+
<!--#region Load Window -->
<v:String x:Key="title_load">Chargement</v:String>
<v:String x:Key="step1_load">Téléversement du profil</v:String>
@@ -190,8 +191,10 @@
<!--#endregion-->
<!--#region Interface Page -->
- <v:String x:Key="tgl1_intf">Sélection de la couleur standard du curseur</v:String>
- <v:String x:Key="tgl2_intf">Couleur standard de l’infobulle</v:String>
+ <v:String x:Key="color1_intf">Couleur de sélection au curseur :</v:String>
+ <v:String x:Key="color2_intf">Couleur de l'infobulle :</v:String>
+ <v:String x:Key="tgl1_intf">Afficher les extensions de fichiers dans l’explorateur</v:String>
+ <v:String x:Key="tgl2_intf">Changements de luminosité spontanés</v:String>
<v:String x:Key="tgl3_intf">Taille standard des boutons système</v:String>
<v:String x:Key="tgl4_intf">Fréquence de clignotement standard du curseur</v:String>
<v:String x:Key="tgl5_intf">Taille standard de la barre de défilement</v:String>
@@ -222,11 +225,11 @@
<v:String x:Key="tgl30_intf">Infobulles pour les éléments du Bureau</v:String>
<v:String x:Key="tgl31_intf">Recherche intégrée à Bing dans le menu Démarrer</v:String>
<v:String x:Key="tgl32_intf">Ouvrir « Accès rapide » au lieu de « Ce PC »</v:String>
- <v:String x:Key="tgl33_intf">Afficher les extensions de fichiers dans l’explorateur</v:String>
- <v:String x:Key="tgl34_intf">Changements de luminosité spontanés</v:String>
- <v:String x:Key="tgl1_desc_intf">Change la couleur de la sélection du curseur de bleu à gris « bitume mouillé ».</v:String>
- <v:String x:Key="tgl2_desc_intf">Change la couleur de l’infobulle dans certains programmes du jaune au bleu clair « azur ».</v:String>
+ <v:String x:Key="color1_desc_intf">Personnaliser la couleur de fond lors de la sélection de texte ou d'objets avec le curseur.</v:String>
+ <v:String x:Key="color2_desc_intf">Personnaliser la couleur des infobulles (tooltip) dans les applications prises en charge.</v:String>
+ <v:String x:Key="tgl1_desc_intf">Par défaut, Windows cache les extensions des fichiers. Ce tweak affiche les extensions dans l’explorateur, ce qui évite de les chercher. Attention, l’écran peut clignoter.</v:String>
+ <v:String x:Key="tgl2_desc_intf">Sur certains appareils, la luminosité de l'écran peut changer spontanément en fonction du contenu affiché. Si la désactivation du HDR, de la luminosité dynamique et des paramètres d'alimentation ne résот pas le problème, vous pouvez essayer ce tweak — il désactive de force le réglage automatique de la luminosité au niveau du système. Le contrôle manuel reste disponible.</v:String>
<v:String x:Key="tgl3_desc_intf">Réduit la taille des boutons Réduire, Agrandir et Fermer, les rendant moins volumineux. Redimensionne toutes les fenêtres, y compris l’Explorateur, Windows Photos, navigateurs et autres programmes connus.</v:String>
<v:String x:Key="tgl4_desc_intf">Accélère la fréquence de clignotement du curseur texte. Par défaut, elle est de 530 millisecondes.</v:String>
<v:String x:Key="tgl5_desc_intf">Rend la largeur de la barre de défilement plus fine dans les fenêtres, y compris navigateurs et programmes. Sauf pour les interfaces modernes des applications.</v:String>
@@ -257,8 +260,6 @@
<v:String x:Key="tgl30_desc_intf">Désactive les infobulles pour les éléments du bureau au survol du curseur.</v:String>
<v:String x:Key="tgl31_desc_intf">Windows envoie par défaut toutes vos recherches dans le menu Démarrer à ses serveurs pour Bing. Ce tweak désactive la recherche web. Attention, l’écran peut clignoter.</v:String>
<v:String x:Key="tgl32_desc_intf">Par défaut, l’Explorateur s’ouvre sur « Accès rapide ». Ce tweak l’ouvre sur « Ce PC » à la place.</v:String>
- <v:String x:Key="tgl33_desc_intf">Par défaut, Windows cache les extensions des fichiers. Ce tweak affiche les extensions dans l’explorateur, ce qui évite de les chercher. Attention, l’écran peut clignoter.</v:String>
- <v:String x:Key="tgl34_desc_intf">Sur certains appareils, la luminosité de l'écran peut changer spontanément en fonction du contenu affiché. Si la désactivation du HDR, de la luminosité dynamique et des paramètres d'alimentation ne résот pas le problème, vous pouvez essayer ce tweak — il désactive de force le réglage automatique de la luminosité au niveau du système. Le contrôle manuel reste disponible.</v:String>
<!--#endregion-->
<!--#region Packages Page -->
diff --git a/.Source/GTweak/Languages/hu/Localize.xaml b/.Source/GTweak/Languages/hu/Localize.xaml
index 54a4cdf7..27994c87 100644
--- a/.Source/GTweak/Languages/hu/Localize.xaml
+++ b/.Source/GTweak/Languages/hu/Localize.xaml
@@ -4,6 +4,7 @@
<v:String x:Key="defaultDescription">Vigye az egeret bármelyik módosítás fölé, hogy megkapja a leírását</v:String>
<v:String x:Key="defaultDescriptionApp">Vigye az egeret bármely alkalmazás ikonja fölé a nevének megtekintéséhez</v:String>
+ <v:String x:Key="btn_default">Alapértelmezett</v:String>
<!--#region Load Window -->
<v:String x:Key="title_load">Betöltés</v:String>
@@ -190,8 +191,10 @@
<!--#endregion-->
<!--#region Interface Page -->
- <v:String x:Key="tgl1_intf">Normál színes kurzor kiválasztása</v:String>
- <v:String x:Key="tgl2_intf">Az eszköztipp szabványos színe</v:String>
+ <v:String x:Key="color1_intf">Kurzoros kijelölés színe:</v:String>
+ <v:String x:Key="color2_intf">Buboréksúgó színe:</v:String>
+ <v:String x:Key="tgl1_intf">Fájlkiterjesztések megjelenítése az Intézőben</v:String>
+ <v:String x:Key="tgl2_intf">Spontán fényerőváltozások</v:String>
<v:String x:Key="tgl3_intf">A rendszergombok szabványos mérete</v:String>
<v:String x:Key="tgl4_intf">A kurzor normál villogási frekvenciája</v:String>
<v:String x:Key="tgl5_intf">Normál görgetősáv mérete</v:String>
@@ -222,11 +225,11 @@
<v:String x:Key="tgl30_intf">Eszköztippek asztali elemekhez</v:String>
<v:String x:Key="tgl31_intf">Keresési lekérdezés a" Bing " integrációval a Start menüben</v:String>
<v:String x:Key="tgl32_intf">Nyissa meg a «Gyors hozzáférés»-t «Ez a gép» helyett</v:String>
- <v:String x:Key="tgl33_intf">Fájlkiterjesztések megjelenítése az Intézőben</v:String>
- <v:String x:Key="tgl34_intf">Spontán fényerőváltozások</v:String>
-
- <v:String x:Key="tgl1_desc_intf">A kurzorválasztás színét kékről szürkére változtatja «nedves aszfalt».</v:String>
- <v:String x:Key="tgl2_desc_intf">Egyes programokban megváltoztatja az eszköztipp színét sárgáról világoskékre «azúrkék».</v:String>
+
+ <v:String x:Key="color1_desc_intf">A kurzorral történő szöveg- vagy objektumkijelölés háttérszínének beállítása.</v:String>
+ <v:String x:Key="color2_desc_intf">Az eszköztippek (tooltip) színének beállítása a támogatott alkalmazásokban.</v:String>
+ <v:String x:Key="tgl1_desc_intf">Alapértelmezés szerint a Windows elrejti a fájlkiterjesztéseket, így a Fájlkezelő nézet kevésbé zsúfolt. Ha szükséges, engedélyezheti a fájlkiterjesztések megjelenítését ezzel a módosítással, így megtakaríthatja a kereséssel töltött időt. Figyelem, a képernyő villoghat.</v:String>
+ <v:String x:Key="tgl2_desc_intf">Néhány eszközön a képernyő fényessége spontán módon változhat a megjelenített tartalomtól függően. Ha a HDR, a dinamikus fényerő és a teljesítménybeállítások kikapcsolása nem oldja meg a problémát (ez különösen akkumulátoros laptopokon gyakori), akkor kipróbálhatod ezt a beállítást – ez erőszakkal kapcsolja ki az automatikus fényerőállítást a rendszer szintjén. A kézi fényerőszabályozás továbbra is elérhető.</v:String>
<v:String x:Key="tgl3_desc_intf">Ez a módosítás csökkenti a Minimalizálás, a Maximalizálás és a Bezárás gombok méretét, így kevésbé terjedelmesek. Beállítja az összes ablak méretét, beleértve a Fájlkezelőt, a Fényképeket, a böngészőket és más ismerős programokat.</v:String>
<v:String x:Key="tgl4_desc_intf">Ez a beállítás növeli a szövegkurzor villogásának gyakoriságát. Alapértelmezés szerint a kurzor 530 ezredmásodpercenként villog.</v:String>
<v:String x:Key="tgl5_desc_intf">A módosítás csökkenti a görgetősávok vastagságát a klasszikus Windows-alkalmazásokban, beleértve a File Explorert, a böngészőket és más régi programokat. Ez azonban nem érinti a modern interfészeket, mivel azok a rendszerbeállításoktól független saját vezérlőelemeiket használják.</v:String>
@@ -257,8 +260,6 @@
<v:String x:Key="tgl30_desc_intf">A beállítás letiltja az asztali elemek eszköztippjeit, amikor az egérkurzort mozgatja.</v:String>
<v:String x:Key="tgl31_desc_intf">Alapértelmezés szerint a Windows mindent elküld, amit a «Start» menüben keres, a szervereinek, hogy a Bing keresési eredményeit biztosítsa. Ha nincs szüksége Bing integrációra a «Start» menüben, alkalmazhat egy módosítást a webes keresés letiltásához. Figyelem, a képernyő villoghat.</v:String>
<v:String x:Key="tgl32_desc_intf">Alapértelmezés szerint az Intéző megnyitásakor az első lap a «Gyors hozzáférés» lesz. És bármely lemez megnyitásához felesleges mozdulatokat kell végrehajtania. Ez a módosítás megnyitja a "Ez a számítógép" megnyitáskor a "Gyors hozzáférés" helyett.</v:String>
- <v:String x:Key="tgl33_desc_intf">Alapértelmezés szerint a Windows elrejti a fájlkiterjesztéseket, így a Fájlkezelő nézet kevésbé zsúfolt. Ha szükséges, engedélyezheti a fájlkiterjesztések megjelenítését ezzel a módosítással, így megtakaríthatja a kereséssel töltött időt. Figyelem, a képernyő villoghat.</v:String>
- <v:String x:Key="tgl34_desc_intf">Néhány eszközön a képernyő fényessége spontán módon változhat a megjelenített tartalomtól függően. Ha a HDR, a dinamikus fényerő és a teljesítménybeállítások kikapcsolása nem oldja meg a problémát (ez különösen akkumulátoros laptopokon gyakori), akkor kipróbálhatod ezt a beállítást – ez erőszakkal kapcsolja ki az automatikus fényerőállítást a rendszer szintjén. A kézi fényerőszabályozás továbbra is elérhető.</v:String>
<!--#endregion-->
<!--#region Packages Page -->
diff --git a/.Source/GTweak/Languages/it/Localize.xaml b/.Source/GTweak/Languages/it/Localize.xaml
index b888e55e..07ac4a2b 100644
--- a/.Source/GTweak/Languages/it/Localize.xaml
+++ b/.Source/GTweak/Languages/it/Localize.xaml
@@ -4,7 +4,8 @@
<v:String x:Key="defaultDescription">Passa il mouse su una modifica per visualizzarne la descrizione</v:String>
<v:String x:Key="defaultDescriptionApp">Passa il mouse sull'icona di un'applicazione per vedere il suo nome</v:String>
-
+ <v:String x:Key="btn_default">Predefinito</v:String>
+
<!--#region Load Window -->
<v:String x:Key="title_load">Caricamento</v:String>
<v:String x:Key="step1_load">Caricamento del profilo</v:String>
@@ -190,8 +191,10 @@
<!--#endregion-->
<!--#region Interface Page -->
- <v:String x:Key="tgl1_intf">Selezione del colore standard del cursore</v:String>
- <v:String x:Key="tgl2_intf">Colore standard della descrizione comandi (tooltip)</v:String>
+ <v:String x:Key="color1_intf">Colore selezione cursore:</v:String>
+ <v:String x:Key="color2_intf">Colore suggerimento:</v:String>
+ <v:String x:Key="tgl1_intf">Visualizza estensioni dei file in Esplora risorse</v:String>
+ <v:String x:Key="tgl2_intf">Cambiamenti improvvisi di luminosità</v:String>
<v:String x:Key="tgl3_intf">Dimensione standard dei pulsanti di sistema</v:String>
<v:String x:Key="tgl4_intf">Frequenza standard del lampeggio del cursore</v:String>
<v:String x:Key="tgl5_intf">Dimensione standard della barra di scorrimento</v:String>
@@ -222,11 +225,11 @@
<v:String x:Key="tgl30_intf">Descrizioni comandi per gli elementi sul desktop</v:String>
<v:String x:Key="tgl31_intf">Query di ricerca con integrazione «Bing» nel menu Start</v:String>
<v:String x:Key="tgl32_intf">Apri «Accesso rapido» invece di «Questo PC»</v:String>
- <v:String x:Key="tgl33_intf">Visualizza estensioni dei file in Esplora risorse</v:String>
- <v:String x:Key="tgl34_intf">Cambiamenti improvvisi di luminosità</v:String>
- <v:String x:Key="tgl1_desc_intf">Modifica il colore della selezione del cursore da blu a grigio tipo «asfalto bagnato».</v:String>
- <v:String x:Key="tgl2_desc_intf">Cambia il colore delle descrizioni comandi in alcuni programmi da giallo ad azzurro chiaro tipo «azzurro cielo».</v:String>
+ <v:String x:Key="color1_desc_intf">Configura il colore di sfondo durante la selezione di testo o oggetti con il cursore.</v:String>
+ <v:String x:Key="color2_desc_intf">Configura il colore dei suggerimenti (tooltip) nelle applicazioni supportate.</v:String>
+ <v:String x:Key="tgl1_desc_intf">Mostra le estensioni dei file in Esplora risorse. Attenzione: lo schermo potrebbe lampeggiare.</v:String>
+ <v:String x:Key="tgl2_desc_intf">Su alcuni dispositivi, la luminosità dello schermo può cambiare spontaneamente a seconda del contenuto visualizzato. Se la disattivazione dell'HDR, della luminosità dinamica e delle impostazioni di risparmio energetico non risolve il problema (comune sui laptop alimentati a batteria), puoi provare questo tweak: forza la disattivazione della regolazione automatica della luminosità a livello di sistema. Il controllo manuale rimane disponibile.</v:String>
<v:String x:Key="tgl3_desc_intf">Riduce la dimensione dei pulsanti di Riduzione, Ingrandimento e Chiusura, rendendoli meno ingombranti. Si applica a tutte le finestre, incluso Esplora risorse, Foto, browser e altri programmi.</v:String>
<v:String x:Key="tgl4_desc_intf">Aumenta la frequenza di lampeggio del cursore di testo. Per impostazione predefinita, lampeggia ogni 530 millisecondi.</v:String>
<v:String x:Key="tgl5_desc_intf">Rende più sottile lo spessore delle barre di scorrimento in finestre, browser e programmi (escluse le app moderne).</v:String>
@@ -257,8 +260,6 @@
<v:String x:Key="tgl30_desc_intf">Disattiva le descrizioni comandi (tooltip) per gli elementi sul desktop quando ci si passa sopra con il mouse.</v:String>
<v:String x:Key="tgl31_desc_intf">Disattiva l’invio delle ricerche effettuate nel menu Start ai server Microsoft per la ricerca Bing. Attenzione: lo schermo potrebbe lampeggiare.</v:String>
<v:String x:Key="tgl32_desc_intf">Fa sì che Esplora risorse si apra su «Questo PC» anziché su «Accesso rapido».</v:String>
- <v:String x:Key="tgl33_desc_intf">Mostra le estensioni dei file in Esplora risorse. Attenzione: lo schermo potrebbe lampeggiare.</v:String>
- <v:String x:Key="tgl34_desc_intf">Su alcuni dispositivi, la luminosità dello schermo può cambiare spontaneamente a seconda del contenuto visualizzato. Se la disattivazione dell'HDR, della luminosità dinamica e delle impostazioni di risparmio energetico non risolve il problema (comune sui laptop alimentati a batteria), puoi provare questo tweak: forza la disattivazione della regolazione automatica della luminosità a livello di sistema. Il controllo manuale rimane disponibile.</v:String>
<!--#endregion-->
<!--#region Packages Page -->
diff --git a/.Source/GTweak/Languages/ko/Localize.xaml b/.Source/GTweak/Languages/ko/Localize.xaml
index 37e9af9b..a2ee7b44 100644
--- a/.Source/GTweak/Languages/ko/Localize.xaml
+++ b/.Source/GTweak/Languages/ko/Localize.xaml
@@ -4,7 +4,8 @@
<v:String x:Key="defaultDescription">조정 사항 위에 마우스를 가져가면 설명이 표시됩니다</v:String>
<v:String x:Key="defaultDescriptionApp">응용 프로그램의 아이콘 위에 마우스를 가져가면 이름을 확인할 수 있습니다</v:String>
-
+ <v:String x:Key="btn_default">기본값</v:String>
+
<!--#region Load Window -->
<v:String x:Key="title_load">로드 중</v:String>
<v:String x:Key="step1_load">프로필 업로드 중</v:String>
@@ -190,8 +191,10 @@
<!--#endregion-->
<!--#region Interface Page -->
- <v:String x:Key="tgl1_intf">표준 색상 커서 선택</v:String>
- <v:String x:Key="tgl2_intf">도구 설명의 표준 색상</v:String>
+ <v:String x:Key="color1_intf">커서 선택 색상:</v:String>
+ <v:String x:Key="color2_intf">도구 설명 색상:</v:String>
+ <v:String x:Key="tgl1_intf">탐색기에 파일 확장자 표시</v:String>
+ <v:String x:Key="tgl2_intf">자발적인 밝기 변화</v:String>
<v:String x:Key="tgl3_intf">시스템 버튼의 표준 크기</v:String>
<v:String x:Key="tgl4_intf">표준 커서 깜박임 빈도</v:String>
<v:String x:Key="tgl5_intf">표준 스크롤 막대 크기</v:String>
@@ -222,11 +225,11 @@
<v:String x:Key="tgl30_intf">데스크톱 요소의 도구 설명</v:String>
<v:String x:Key="tgl31_intf">시작 메뉴에 'Bing'이 통합된 검색 쿼리</v:String>
<v:String x:Key="tgl32_intf">«내 PC» 대신 «빠른 액세스» 열기</v:String>
- <v:String x:Key="tgl33_intf">탐색기에 파일 확장자 표시</v:String>
- <v:String x:Key="tgl34_intf">자발적인 밝기 변화</v:String>
- <v:String x:Key="tgl1_desc_intf">커서 선택 항목의 색상이 파란색에서 «젖은 아스팔트의 색»이 회색으로 변경됩니다.</v:String>
- <v:String x:Key="tgl2_desc_intf">일부 프로그램에서 도구 설명의 색상이 노란색에서 하늘색 «Azure».로 변경됩니다.</v:String>
+ <v:String x:Key="color1_desc_intf">커서로 텍스트나 개체를 선택할 때의 배경 색상을 설정합니다.</v:String>
+ <v:String x:Key="color2_desc_intf">지원되는 애플리케이션의 도구 설명(tooltip) 색상을 설정합니다.</v:String>
+ <v:String x:Key="tgl1_desc_intf">기본적으로 Windows는 파일 확장자를 숨기므로 파일 탐색기 보기가 덜 복잡해집니다. 필요한 경우 이 조정을 사용하여 파일 확장자를 표시할 수 있으므로 검색하는 데 걸리는 시간을 절약할 수 있습니다. 화면이 깜박일 수 있으니 주의하세요.</v:String>
+ <v:String x:Key="tgl2_desc_intf">일부 기기에서는 표시되는 콘텐츠에 따라 화면 밝기가 자연스럽게 변경될 수 있습니다. HDR, 동적 밝기 및 전원 설정을 끄더라도 문제가 해결되지 않는다면 (이 문제는 특히 배터리로 작동하는 노트북에서 흔히 발생합니다), 시스템 수준에서 자동 밝기 조정을 강제로 비활성화하는 이 조정을 시도해 볼 수 있습니다. 수동 밝기 제어 기능은 여전히 사용 가능합니다.</v:String>
<v:String x:Key="tgl3_desc_intf">이 조정으로 축소, 확장, 닫기 버튼의 크기가 줄어들어 부피가 줄어듭니다. 탐색기, Windows 사진, 브라우저 및 기타 프로그램을 포함한 모든 창 크기를 조정합니다.</v:String>
<v:String x:Key="tgl4_desc_intf">이 조정은 텍스트 커서의 깜박임 빈도를 가속화합니다. 기본적으로 530밀리초마다 깜박입니다.</v:String>
<v:String x:Key="tgl5_desc_intf">이 조정으로 브라우저와 프로그램을 포함한 창에서 스크롤 막대의 두께가 더 얇아집니다.</v:String>
@@ -257,8 +260,6 @@
<v:String x:Key="tgl30_desc_intf">조정은 마우스 커서를 올려 놓으면 바탕 화면 요소의 도구 설명이 비활성화됩니다.</v:String>
<v:String x:Key="tgl31_desc_intf">기본적으로 Windows는 «시작» 메뉴에서 검색하는 모든 내용을 서버로 전송하여 Bing 검색 결과를 제공합니다. «시작» 메뉴에서 Bing 통합이 필요하지 않은 경우 웹 검색을 비활성화하도록 조정할 수 있습니다. 화면이 깜박일 수 있으니 주의하세요.</v:String>
<v:String x:Key="tgl32_desc_intf">기본적으로 탐색기를 열면 첫 번째 탭은 «빠른 액세스»입니다. 그리고 디스크를 열려면 불필요한 이동을 해야 합니다. 이 조정을 통해 디스크를 열면 '빠른 액세스'가 아닌 «내 PC»가 열리게 됩니다.</v:String>
- <v:String x:Key="tgl33_desc_intf">기본적으로 Windows는 파일 확장자를 숨기므로 파일 탐색기 보기가 덜 복잡해집니다. 필요한 경우 이 조정을 사용하여 파일 확장자를 표시할 수 있으므로 검색하는 데 걸리는 시간을 절약할 수 있습니다. 화면이 깜박일 수 있으니 주의하세요.</v:String>
- <v:String x:Key="tgl34_desc_intf">일부 기기에서는 표시되는 콘텐츠에 따라 화면 밝기가 자연스럽게 변경될 수 있습니다. HDR, 동적 밝기 및 전원 설정을 끄더라도 문제가 해결되지 않는다면 (이 문제는 특히 배터리로 작동하는 노트북에서 흔히 발생합니다), 시스템 수준에서 자동 밝기 조정을 강제로 비활성화하는 이 조정을 시도해 볼 수 있습니다. 수동 밝기 제어 기능은 여전히 사용 가능합니다.</v:String>
<!--#endregion-->
<!--#region Packages Page -->
diff --git a/.Source/GTweak/Languages/pl/Localize.xaml b/.Source/GTweak/Languages/pl/Localize.xaml
index 35e9510c..5ddc2422 100644
--- a/.Source/GTweak/Languages/pl/Localize.xaml
+++ b/.Source/GTweak/Languages/pl/Localize.xaml
@@ -4,7 +4,8 @@
<v:String x:Key="defaultDescription">Najedź kursorem myszy na dowolną poprawkę, aby zobaczyć jej opis</v:String>
<v:String x:Key="defaultDescriptionApp">Najedź kursorem myszy na ikonę dowolnej aplikacji, aby zobaczyć jej nazwę</v:String>
-
+ <v:String x:Key="btn_default">Domyślne</v:String>
+
<!--#region Load Window -->
<v:String x:Key="title_load">Ładowanie</v:String>
<v:String x:Key="step1_load">Wgrywanie profilu</v:String>
@@ -190,8 +191,10 @@
<!--#endregion-->
<!--#region Interface Page -->
- <v:String x:Key="tgl1_intf">Standardowy kolor zaznaczenia kursora</v:String>
- <v:String x:Key="tgl2_intf">Standardowy kolor podpowiedzi</v:String>
+ <v:String x:Key="color1_intf">Kolor zaznaczania kursorem:</v:String>
+ <v:String x:Key="color2_intf">Kolor podpowiedzi:</v:String>
+ <v:String x:Key="tgl1_intf">Wyświetlanie rozszerzeń plików w eksploratorze</v:String>
+ <v:String x:Key="tgl2_intf">Samoczynne zmiany jasności</v:String>
<v:String x:Key="tgl3_intf">Standardowy rozmiar przycisków systemowych</v:String>
<v:String x:Key="tgl4_intf">Standardowa częstotliwość migania kursora</v:String>
<v:String x:Key="tgl5_intf">Standardowy rozmiar suwaków przewijania</v:String>
@@ -222,11 +225,11 @@
<v:String x:Key="tgl30_intf">Podpowiedzi dla elementów pulpitu</v:String>
<v:String x:Key="tgl31_intf">Zapytanie wyszukiwania z integracją „Bing” w menu Start</v:String>
<v:String x:Key="tgl32_intf">Otwieraj „Szybki dostęp” zamiast „Ten komputer”</v:String>
- <v:String x:Key="tgl33_intf">Wyświetlanie rozszerzeń plików w eksploratorze</v:String>
- <v:String x:Key="tgl34_intf">Samoczynne zmiany jasności</v:String>
- <v:String x:Key="tgl1_desc_intf">Zmieni kolor zaznaczenia kursora z niebieskiego na szary „mokry asfalt”.</v:String>
- <v:String x:Key="tgl2_desc_intf">Zmieni kolor podpowiedzi w niektórych programach z żółtego na jasnoniebieski „błękitny”.</v:String>
+ <v:String x:Key="color1_desc_intf">Ustawienia koloru tła podczas zaznaczania tekstu lub obiektów kursorem.</v:String>
+ <v:String x:Key="color2_desc_intf">Ustawienia koloru podpowiedzi (tooltip) w obsługiwanych aplikacjach.</v:String>
+ <v:String x:Key="tgl1_desc_intf">Domyślnie Windows ukrywa rozszerzenia plików, co sprawia, że widok Eksploratora jest mniej zagracony. Jeśli potrzebujesz, możesz włączyć wyświetlanie rozszerzeń nazw plików za pomocą tej poprawki, oszczędzając czas na szukanie. Uwaga, ekran może mignąć.</v:String>
+ <v:String x:Key="tgl2_desc_intf">Na niektórych urządzeniach jasność ekranu może zmieniać się samoczynnie w zależności od wyświetlanego obrazu. Jeśli wyłączenie HDR, dynamicznej jasności i ustawień zasilania nie rozwiązuje problemu (problem ten jest szczególnie częsty na laptopach działających na baterii), możesz spróbować tej poprawki – wymusza wyłączenie automatycznej regulacji jasności na poziomie systemu. Ręczna regulacja jasności pozostaje dostępna.</v:String>
<v:String x:Key="tgl3_desc_intf">Poprawka zmniejsza rozmiar przycisków Minimalizuj, Maksymalizuj i Zamknij, czyniąc je mniej topornymi. Dostosowuje rozmiar dla wszystkich okien, w tym Eksploratora plików, Zdjęć, przeglądarek i innych znanych programów.</v:String>
<v:String x:Key="tgl4_desc_intf">Poprawka zwiększa częstotliwość migania kursora tekstowego. Domyślnie kursor miga co 530 milisekund.</v:String>
<v:String x:Key="tgl5_desc_intf">Poprawka zmniejsza grubość suwaków przewijania w klasycznych aplikacjach Windows, w tym Eksploratorze plików, przeglądarkach i innych starszych programach. Nie wpływa jednak na nowoczesne interfejsy, ponieważ używają one własnych elementów sterujących niezależnych od ustawień systemowych.</v:String>
@@ -257,8 +260,6 @@
<v:String x:Key="tgl30_desc_intf">Poprawka wyłączy podpowiedzi dla elementów pulpitu po najechaniu kursorem myszy.</v:String>
<v:String x:Key="tgl31_desc_intf">Domyślnie Windows wysyła wszystko, czego szukasz w menu „Start”, na swoje serwery, aby dostarczyć wyniki wyszukiwania Bing. Jeśli nie potrzebujesz integracji Bing w menu „Start”, możesz zastosować poprawkę, aby wyłączyć wyszukiwanie internetowe. Uwaga, ekran może mignąć.</v:String>
<v:String x:Key="tgl32_desc_intf">Domyślnie po otwarciu Eksploratora pierwsza karta to „Szybki dostęp”. Aby otworzyć dowolny dysk, trzeba wykonać niepotrzebne ruchy. Ta poprawka sprawi, że po otwarciu będzie pokazywany „Ten komputer”, a nie „Szybki dostęp”.</v:String>
- <v:String x:Key="tgl33_desc_intf">Domyślnie Windows ukrywa rozszerzenia plików, co sprawia, że widok Eksploratora jest mniej zagracony. Jeśli potrzebujesz, możesz włączyć wyświetlanie rozszerzeń nazw plików za pomocą tej poprawki, oszczędzając czas na szukanie. Uwaga, ekran może mignąć.</v:String>
- <v:String x:Key="tgl34_desc_intf">Na niektórych urządzeniach jasność ekranu może zmieniać się samoczynnie w zależności od wyświetlanego obrazu. Jeśli wyłączenie HDR, dynamicznej jasności i ustawień zasilania nie rozwiązuje problemu (problem ten jest szczególnie częsty na laptopach działających na baterii), możesz spróbować tej poprawki – wymusza wyłączenie automatycznej regulacji jasności na poziomie systemu. Ręczna regulacja jasności pozostaje dostępna.</v:String>
<!--#endregion-->
<!--#region Packages Page -->
diff --git a/.Source/GTweak/Languages/pt-BR/Localize.xaml b/.Source/GTweak/Languages/pt-BR/Localize.xaml
index e9657bdf..8c6c762e 100644
--- a/.Source/GTweak/Languages/pt-BR/Localize.xaml
+++ b/.Source/GTweak/Languages/pt-BR/Localize.xaml
@@ -4,8 +4,9 @@
<v:String x:Key="defaultDescription">Passe o mouse sobre qualquer ajuste para obter sua descrição</v:String>
<v:String x:Key="defaultDescriptionApp">Passe o mouse sobre o ícone de qualquer aplicativo para ver seu nome</v:String>
-
- <!--#region Load Window -->
+ <v:String x:Key="btn_default">Padrão</v:String>
+
+ <!--#region Load Window -->
<v:String x:Key="title_load">Carregando</v:String>
<v:String x:Key="step1_load">Carregando perfil</v:String>
<v:String x:Key="step2_load">Buscando dados</v:String>
@@ -190,8 +191,10 @@
<!--#endregion-->
<!--#region Interface Page -->
- <v:String x:Key="tgl1_intf">Seleção de cor padrão do cursor</v:String>
- <v:String x:Key="tgl2_intf">Cor padrão da dica de ferramenta</v:String>
+ <v:String x:Key="color1_intf">Cor de seleção do cursor:</v:String>
+ <v:String x:Key="color2_intf">Cor da dica de ferramenta:</v:String>
+ <v:String x:Key="tgl1_intf">Exibição de extensões de arquivo no explorador</v:String>
+ <v:String x:Key="tgl2_intf">Mudanças espontâneas de brilho</v:String>
<v:String x:Key="tgl3_intf">Tamanho padrão dos botões do sistema</v:String>
<v:String x:Key="tgl4_intf">Frequência de piscar padrão do cursor</v:String>
<v:String x:Key="tgl5_intf">Tamanho padrão da barra de rolagem</v:String>
@@ -222,11 +225,11 @@
<v:String x:Key="tgl30_intf">Dicas de ferramentas para elementos da área de trabalho</v:String>
<v:String x:Key="tgl31_intf">Pesquisa com "Bing" integrada ao menu Iniciar</v:String>
<v:String x:Key="tgl32_intf">Abrir "Acesso rápido" em vez de "Este Computador"</v:String>
- <v:String x:Key="tgl33_intf">Exibição de extensões de arquivo no explorador</v:String>
- <v:String x:Key="tgl34_intf">Mudanças espontâneas de brilho</v:String>
-
- <v:String x:Key="tgl1_desc_intf">Mudará a cor da seleção do cursor de azul para cinza "asfalto molhado".</v:String>
- <v:String x:Key="tgl2_desc_intf">Mudará a cor da dica de ferramenta em alguns programas de amarelo para azul claro "azure".</v:String>
+
+ <v:String x:Key="color1_desc_intf">Ajusta a cor de fundo ao selecionar texto ou objetos com o cursor.</v:String>
+ <v:String x:Key="color2_desc_intf">Ajusta a cor das dicas de ferramenta (tooltip) em aplicativos compatíveis.</v:String>
+ <v:String x:Key="tgl1_desc_intf">Por padrão, o Windows oculta as extensões de arquivo, o que torna a visualização do Explorador de Arquivos menos confusa. Se necessário, você pode ativar a exibição de extensões de arquivo usando este ajuste, economizando o tempo gasto na pesquisa. Atenção, a tela pode piscar.</v:String>
+ <v:String x:Key="tgl2_desc_intf">Em alguns dispositivos, o brilho da tela pode mudar espontaneamente dependendo do conteúdo exibido. Se desligar o HDR, o brilho dinâmico e as configurações de energia não resolverem o problema (comum em laptops na bateria), você pode tentar este ajuste — ele desativa forçadamente o ajuste automático de brilho no nível do sistema. O controle de brilho manual permanece disponível.</v:String>
<v:String x:Key="tgl3_desc_intf">Um ajuste reduz o tamanho dos botões Minimizar, Maximizar e Fechar, tornando-os menos volumosos. Ele ajusta o tamanho para todas as janelas, incluindo o Explorador de Arquivos, Fotos, navegadores e outros programas familiares.</v:String>
<v:String x:Key="tgl4_desc_intf">Um ajuste aumenta a frequência de piscar do cursor de texto. Por padrão, o cursor pisca a cada 530 milissegundos.</v:String>
<v:String x:Key="tgl5_desc_intf">Um ajuste reduz a espessura das barras de rolagem em aplicativos clássicos do Windows, incluindo o Explorador de Arquivos, navegadores e outros programas legados. No entanto, não afeta as interfaces modernas, pois elas utilizam seus próprios elementos de controle independentes das configurações do sistema.</v:String>
@@ -257,8 +260,6 @@
<v:String x:Key="tgl30_desc_intf">O ajuste desativará as dicas de ferramentas para elementos da área de trabalho ao passar o cursor do mouse.</v:String>
<v:String x:Key="tgl31_desc_intf">Por padrão, o Windows envia tudo o que você pesquisa no menu "Iniciar" para seus servidores para fornecer resultados de pesquisa do Bing. Se você não precisa da integração do Bing no menu "Iniciar", pode aplicar um ajuste para desativar a pesquisa na web. Atenção, a tela pode piscar.</v:String>
<v:String x:Key="tgl32_desc_intf">Por padrão, ao abrir o Explorador, a primeira guia será "Acesso rápido". E para abrir qualquer disco, você precisa fazer movimentos desnecessários. Este ajuste fará com que "Este Computador" seja aberto ao ser aberto, em vez de "Acesso rápido".</v:String>
- <v:String x:Key="tgl33_desc_intf">Por padrão, o Windows oculta as extensões de arquivo, o que torna a visualização do Explorador de Arquivos menos confusa. Se necessário, você pode ativar a exibição de extensões de arquivo usando este ajuste, economizando o tempo gasto na pesquisa. Atenção, a tela pode piscar.</v:String>
- <v:String x:Key="tgl34_desc_intf">Em alguns dispositivos, o brilho da tela pode mudar espontaneamente dependendo do conteúdo exibido. Se desligar o HDR, o brilho dinâmico e as configurações de energia não resolverem o problema (comum em laptops na bateria), você pode tentar este ajuste — ele desativa forçadamente o ajuste automático de brilho no nível do sistema. O controle de brilho manual permanece disponível.</v:String>
<!--#endregion-->
<!--#region Packages Page -->
@@ -526,3 +527,4 @@
+
diff --git a/.Source/GTweak/Languages/ru/Localize.xaml b/.Source/GTweak/Languages/ru/Localize.xaml
index 28930642..c60779db 100644
--- a/.Source/GTweak/Languages/ru/Localize.xaml
+++ b/.Source/GTweak/Languages/ru/Localize.xaml
@@ -4,6 +4,7 @@
<v:String x:Key="defaultDescription">Наведите указатель мыши на любой твик, чтобы получить его описание</v:String>
<v:String x:Key="defaultDescriptionApp">Наведите указатель мыши на иконку любого приложения, чтобы получить его название</v:String>
+ <v:String x:Key="btn_default">По умолчанию</v:String>
<!--#region Load Window -->
<v:String x:Key="title_load">Загрузка</v:String>
@@ -190,8 +191,10 @@
<!--#endregion-->
<!--#region Interface Page -->
- <v:String x:Key="tgl1_intf">Стандартный цвет выделение курсором</v:String>
- <v:String x:Key="tgl2_intf">Стандартный цвет всплывающей подсказки</v:String>
+ <v:String x:Key="color1_intf">Цвет курсорного выделения:</v:String>
+ <v:String x:Key="color2_intf">Цвет всплывающей подсказки:</v:String>
+ <v:String x:Key="tgl1_intf">Отображение расширений файлов в проводнике</v:String>
+ <v:String x:Key="tgl2_intf">Самопроизвольное изменение яркости</v:String>
<v:String x:Key="tgl3_intf">Стандартный размер системных кнопок</v:String>
<v:String x:Key="tgl4_intf">Стандартная частота мерцания курсора</v:String>
<v:String x:Key="tgl5_intf">Стандартный размер полосы прокрутки</v:String>
@@ -222,11 +225,11 @@
<v:String x:Key="tgl30_intf">Всплывающие подсказки для элементов рабочего стола</v:String>
<v:String x:Key="tgl31_intf">Поисковый запрос с итреграцией «Bing» в меню пуск</v:String>
<v:String x:Key="tgl32_intf">Открывать «Быстрый доступ» вместо «Этот компьютер»</v:String>
- <v:String x:Key="tgl33_intf">Отображение расширений файлов в проводнике</v:String>
- <v:String x:Key="tgl34_intf">Самопроизвольное изменение яркости</v:String>
-
- <v:String x:Key="tgl1_desc_intf">Изменят цвет выделение курсором с синего на серый «цвет мокрого асфальта».</v:String>
- <v:String x:Key="tgl2_desc_intf">Изменит цвет всплывающей подсказки в некоторых программах с жёлтого на светло голубой «небесная лазурь».</v:String>
+
+ <v:String x:Key="color1_desc_intf">Настройка цвета фона при выделении текста или объектов курсором в системе.</v:String>
+ <v:String x:Key="color2_desc_intf">Настройка цвета всплывающих подсказок (tooltip) в поддерживаемых приложениях.</v:String>
+ <v:String x:Key="tgl1_desc_intf">По умолчанию расширения файлов скрыты в Windows, что делает вид проводника менее загроможденным. При необходимости вы можете отображать расширения файлов с помощью этого твика, не тратя время на поиск. Внимание может моргать экран.</v:String>
+ <v:String x:Key="tgl2_desc_intf">На некоторых устройствах яркость экрана может самопроизвольно меняться в зависимости от отображаемого контента. Если отключение HDR, динамической яркости и параметров электропитания не помогает (особенно часто проблема проявляется на ноутбуках при работе от батареи), вы можете попробовать данный твик - он на системном уровне принудительно отключает автоматическую регулировку яркости. При этом ручное изменение яркости остаётся доступным.</v:String>
<v:String x:Key="tgl3_desc_intf">Твик уменьшит размер кнопок Свернуть, Развернуть, Закрыть делая их менее громоздкими. Изменяет размер для всех окон, включая Проводник, фотографии, браузеры и другие известные вам программы.</v:String>
<v:String x:Key="tgl4_desc_intf">Твик ускоряет частоту мерцания текстового курсора. По умолчанию она составляет каждые 530 миллисекунд.</v:String>
<v:String x:Key="tgl5_desc_intf">Твик уменьшает толщину полосы прокрутки в классических приложениях Windows, включая проводник, браузеры и другие программы. Однако он не влияет на современные интерфейсы, поскольку они используют собственные элементы управления, не зависящие от системных настроек.</v:String>
@@ -257,8 +260,6 @@
<v:String x:Key="tgl30_desc_intf">Твик отключит всплывающие подсказки для элементов рабочего стола при наведении курсора мыши.</v:String>
<v:String x:Key="tgl31_desc_intf">По умолчанию Windows отправляет всё, что вы ищете в меню «Пуск», на свои серверы, чтобы предоставить вам результаты поиска в Bing. Если вам не нужна интеграция с Bing в меню «Пуск», вы можете применить твик, чтобы отключить веб-поиск. Внимание может моргать экран.</v:String>
<v:String x:Key="tgl32_desc_intf">По умолчанию, когда вы открываете проводник, первая вкладка будет «Быстрый доступ». И чтобы открыть какой-либо диск, нужно сделать лишние движения. Данный твик сделает, чтобы при открытии открывался «Этот компьютер», а не «Быстрый доступ».</v:String>
- <v:String x:Key="tgl33_desc_intf">По умолчанию расширения файлов скрыты в Windows, что делает вид проводника менее загроможденным. При необходимости вы можете отображать расширения файлов с помощью этого твика, не тратя время на поиск. Внимание может моргать экран.</v:String>
- <v:String x:Key="tgl34_desc_intf">На некоторых устройствах яркость экрана может самопроизвольно меняться в зависимости от отображаемого контента. Если отключение HDR, динамической яркости и параметров электропитания не помогает (особенно часто проблема проявляется на ноутбуках при работе от батареи), вы можете попробовать данный твик - он на системном уровне принудительно отключает автоматическую регулировку яркости. При этом ручное изменение яркости остаётся доступным.</v:String>
<!--#endregion-->
<!--#region Packages Page -->
diff --git a/.Source/GTweak/Languages/uk/Localize.xaml b/.Source/GTweak/Languages/uk/Localize.xaml
index ea932821..0da03212 100644
--- a/.Source/GTweak/Languages/uk/Localize.xaml
+++ b/.Source/GTweak/Languages/uk/Localize.xaml
@@ -4,7 +4,8 @@
<v:String x:Key="defaultDescription">Наведіть вказівник миші на будь-яке налаштування, щоб отримати його опис</v:String>
<v:String x:Key="defaultDescriptionApp">Наведіть вказівник миші на піктограму будь-якого додатку, щоб отримати його назву</v:String>
-
+ <v:String x:Key="btn_default">За замовчуванням</v:String>
+
<!--#region Load Window -->
<v:String x:Key="title_load">Завантаження</v:String>
<v:String x:Key="step1_load">Завантаження профілю</v:String>
@@ -190,8 +191,10 @@
<!--#endregion-->
<!--#region Interface Page -->
- <v:String x:Key="tgl1_intf">Стандартний колір виділення курсором</v:String>
- <v:String x:Key="tgl2_intf">Стандартний колір спливної підказки</v:String>
+ <v:String x:Key="color1_intf">Колір курсорного виділення:</v:String>
+ <v:String x:Key="color2_intf">Колір спливаючої підказки:</v:String>
+ <v:String x:Key="tgl1_intf">Відображення розширень файлів у провіднику</v:String>
+ <v:String x:Key="tgl2_intf">Спонтанна зміна яскравості</v:String>
<v:String x:Key="tgl3_intf">Стандартний розмір системних кнопок</v:String>
<v:String x:Key="tgl4_intf">Стандартна частота мерехтіння курсору</v:String>
<v:String x:Key="tgl5_intf">Стандартний розмір смуги прокручування</v:String>
@@ -222,11 +225,11 @@
<v:String x:Key="tgl30_intf">Спливні підказки для елементів робочого столу</v:String>
<v:String x:Key="tgl31_intf">Пошуковий запит з інтеграцією «Bing» в меню «Пуск»</v:String>
<v:String x:Key="tgl32_intf">Відкривати «Швидкий доступ» замість «Цей ПК»</v:String>
- <v:String x:Key="tgl33_intf">Відображення розширень файлів у провіднику</v:String>
- <v:String x:Key="tgl34_intf">Спонтанна зміна яскравості</v:String>
- <v:String x:Key="tgl1_desc_intf">Це налаштування змінить колір виділення курсором з синього на сірий «колір мокрого асфальту».</v:String>
- <v:String x:Key="tgl2_desc_intf">Це налаштування змінить колір спливної підказки в деяких програмах з жовтого на блідо-блакитний «небесна блакить».</v:String>
+ <v:String x:Key="color1_desc_intf">Налаштування кольору фону при виділенні тексту або об'єктів курсором у системі.</v:String>
+ <v:String x:Key="color2_desc_intf">Налаштування кольору спливаючих підказок (tooltip) у підтримуваних додатках.</v:String>
+ <v:String x:Key="tgl1_desc_intf">Як усталено, розширення файлів у Windows приховуються, що робить інтерфейс Провідника менш завантаженим. Якщо потрібно, можна увімкнути відображення розширень файлів за допомогою цього налаштування, заощаджуючи час на пошук. Увага, екран може мерехтіти.</v:String>
+ <v:String x:Key="tgl2_desc_intf">На деяких пристроях яскравість екрана може спонтанно змінюватися залежно від вмісту, що відображається. Якщо вимкнення HDR, динамічної яскравості та налаштувань живлення не допомагає (проблема особливо поширена на ноутбуках, які працюють від акумулятора), можна спробувати це тонке налаштування - воно примусово вимикає автоматичне регулювання яскравості на системному рівні. Проте ручна зміна яскравості залишається доступною.</v:String>
<v:String x:Key="tgl3_desc_intf">Це налаштування зменшить розмір стандартних кнопок вікна Згорнути, Розгорнути, Закрити. Змінюється розмір для всіх вікон, таких як провідник, фотографії, браузери та інші відомі програми.</v:String>
<v:String x:Key="tgl4_desc_intf">Це налаштування прискорить швидкість мерехтіння текстового курсору. Усталене значення - 530 мілісекунд.</v:String>
<v:String x:Key="tgl5_desc_intf">Це налаштування зменшить товщину смуги прокручування (scrollbar) у вікнах браузерів та додатків. Не впливає на сучасні інтерфейси додатків.</v:String>
@@ -257,8 +260,6 @@
<v:String x:Key="tgl30_desc_intf">Це налаштування вимикає спливні підказки для елементів Робочого столу під час наведення на них вказівника миші.</v:String>
<v:String x:Key="tgl31_desc_intf">Як усталено, Windows надсилає все, що ви шукаєте у меню «Пуск», на свої сервери, щоб надавати вам результати пошуку в Bing. Якщо вам не потрібна інтеграція з Bing у меню «Пуск», застосуйте це налаштування, щоб вимкнути пошук у веб. Увага, екран може мерехтіти.</v:String>
<v:String x:Key="tgl32_desc_intf">Як усталено, файловий провідник відкривається на вкладці «Швидкий доступ». Щоб відкрити будь-який диск, потрібно виконати додаткові дії. Якщо це налаштування вимкнено, файловий провідник відкриває вкладку «Цей ПК», а не «Швидкий доступ».</v:String>
- <v:String x:Key="tgl33_desc_intf">Як усталено, розширення файлів у Windows приховуються, що робить інтерфейс Провідника менш завантаженим. Якщо потрібно, можна увімкнути відображення розширень файлів за допомогою цього налаштування, заощаджуючи час на пошук. Увага, екран може мерехтіти.</v:String>
- <v:String x:Key="tgl34_desc_intf">На деяких пристроях яскравість екрана може спонтанно змінюватися залежно від вмісту, що відображається. Якщо вимкнення HDR, динамічної яскравості та налаштувань живлення не допомагає (проблема особливо поширена на ноутбуках, які працюють від акумулятора), можна спробувати це тонке налаштування - воно примусово вимикає автоматичне регулювання яскравості на системному рівні. Проте ручна зміна яскравості залишається доступною.</v:String>
<!--#endregion-->
<!--#region Packages Page -->
diff --git a/.Source/GTweak/Languages/zh-CN/Localize.xaml b/.Source/GTweak/Languages/zh-CN/Localize.xaml
index 9194bd21..b5df9aab 100644
--- a/.Source/GTweak/Languages/zh-CN/Localize.xaml
+++ b/.Source/GTweak/Languages/zh-CN/Localize.xaml
@@ -4,7 +4,8 @@
<v:String x:Key="defaultDescription">将鼠标悬停在任何微调项目上即可查看其说明</v:String>
<v:String x:Key="defaultDescriptionApp">将鼠标悬停在任何应用程序的图标上,即可查看其名称</v:String>
-
+ <v:String x:Key="btn_default">默认</v:String>
+
<!--#region Load Window -->
<v:String x:Key="title_load">载入中</v:String>
<v:String x:Key="step1_load">载入个人数据</v:String>
@@ -190,8 +191,10 @@
<!--#endregion-->
<!--#region Interface Page -->
- <v:String x:Key="tgl1_intf">标准游标颜色选项</v:String>
- <v:String x:Key="tgl2_intf">标准工具提示颜色</v:String>
+ <v:String x:Key="color1_intf">光标选择颜色:</v:String>
+ <v:String x:Key="color2_intf">工具提示颜色:</v:String>
+ <v:String x:Key="tgl1_intf">文档总管中显示扩展名</v:String>
+ <v:String x:Key="tgl2_intf">亮度异常变化</v:String>
<v:String x:Key="tgl3_intf">系统按钮标准尺寸</v:String>
<v:String x:Key="tgl4_intf">标准游标闪烁频率</v:String>
<v:String x:Key="tgl5_intf">标准卷动列尺寸</v:String>
@@ -222,11 +225,11 @@
<v:String x:Key="tgl30_intf">桌面元素工具提示</v:String>
<v:String x:Key="tgl31_intf">开始功能表中整合"Bing"的搜索查询</v:String>
<v:String x:Key="tgl32_intf">开启"快速存取"而非"本机"</v:String>
- <v:String x:Key="tgl33_intf">文档总管中显示扩展名</v:String>
- <v:String x:Key="tgl34_intf">亮度异常变化</v:String>
- <v:String x:Key="tgl1_desc_intf">将游标选取的颜色从蓝色变更为灰色"湿沥青"。</v:String>
- <v:String x:Key="tgl2_desc_intf">将某些程序的工具提示颜色从黄色变更为浅蓝色"蔚蓝"。</v:String>
+ <v:String x:Key="color1_desc_intf">设置使用光标选择文本或对象时的背景颜色。</v:String>
+ <v:String x:Key="color2_desc_intf">设置受支持应用程序中工具提示(tooltip)的颜色。</v:String>
+ <v:String x:Key="tgl1_desc_intf">预设情况下,Windows 会隐藏文档扩展名,使文档总管接口更简洁。若需显示扩展名,可透过此调整功能启用,节省搜索时间。注意:屏幕可能闪烁。</v:String>
+ <v:String x:Key="tgl2_desc_intf">部分装置的屏幕亮度可能随显示内容自动变化。若关闭 HDR、动态亮度及电源设置仍无法解决问题(此状况在电池供电的笔记型电脑上尤为常见),可尝试此调整项——它将在系统层级强制停用自动亮度调节功能。手动亮度控制功能仍可正常使用。</v:String>
<v:String x:Key="tgl3_desc_intf">此调整会缩小最小化、最大化及关闭按钮的尺寸,使其更为精简。此设置将套用至所有窗口,包含文档总管、照片、浏览器及其他常用程序。</v:String>
<v:String x:Key="tgl4_desc_intf">此调整会提高文字游标的闪烁频率。预设情况下,游标每 530 毫秒闪烁一次。</v:String>
<v:String x:Key="tgl5_desc_intf">此调整功能可降低经典 Windows 应用程序(包含文档总管、浏览器及其他旧版程序)中卷动列的粗细。但此设置不影响现代化接口,因其采用独立于系统设置的专属控制元件。</v:String>
@@ -257,8 +260,6 @@
<v:String x:Key="tgl30_desc_intf">此调整将停用鼠标悬停于桌面元素时的工具提示功能。</v:String>
<v:String x:Key="tgl31_desc_intf">预设情况下,Windows 会将您在"开始"功能表中的所有搜索内容传送至其服务器,以提供 Bing 搜索结果。若您不需要"开始"功能表整合 Bing 功能,可透过调整设置停用网页搜索。请注意画面可能闪烁。</v:String>
<v:String x:Key="tgl32_desc_intf">预设情况下,开启文档总管时,第一个标签页会显示"快速存取"。若要开启任何磁盘机,则需进行多余的操作。此调整将使开启文档总管时预设显示"本机"而非"快速存取"。</v:String>
- <v:String x:Key="tgl33_desc_intf">预设情况下,Windows 会隐藏文档扩展名,使文档总管接口更简洁。若需显示扩展名,可透过此调整功能启用,节省搜索时间。注意:屏幕可能闪烁。</v:String>
- <v:String x:Key="tgl34_desc_intf">部分装置的屏幕亮度可能随显示内容自动变化。若关闭 HDR、动态亮度及电源设置仍无法解决问题(此状况在电池供电的笔记型电脑上尤为常见),可尝试此调整项——它将在系统层级强制停用自动亮度调节功能。手动亮度控制功能仍可正常使用。</v:String>
<!--#endregion-->
<!--#region Packages Page -->
diff --git a/.Source/GTweak/Languages/zh-TW/Localize.xaml b/.Source/GTweak/Languages/zh-TW/Localize.xaml
index 722fdc2e..4b25382e 100644
--- a/.Source/GTweak/Languages/zh-TW/Localize.xaml
+++ b/.Source/GTweak/Languages/zh-TW/Localize.xaml
@@ -4,7 +4,8 @@
<v:String x:Key="defaultDescription">將滑鼠懸停在任何微調項目上即可查看其說明</v:String>
<v:String x:Key="defaultDescriptionApp">將滑鼠懸停在任何應用程式的圖示上,即可查看其名稱</v:String>
-
+ <v:String x:Key="btn_default">預設</v:String>
+
<!--#region Load Window -->
<v:String x:Key="title_load">載入中</v:String>
<v:String x:Key="step1_load">載入個人資料</v:String>
@@ -190,8 +191,10 @@
<!--#endregion-->
<!--#region Interface Page -->
- <v:String x:Key="tgl1_intf">標準游標顏色選項</v:String>
- <v:String x:Key="tgl2_intf">標準工具提示顏色</v:String>
+ <v:String x:Key="color1_intf">游標選取顏色:</v:String>
+ <v:String x:Key="color2_intf">工具提示顏色:</v:String>
+ <v:String x:Key="tgl1_intf">檔案總管中顯示副檔名</v:String>
+ <v:String x:Key="tgl2_intf">亮度異常變化</v:String>
<v:String x:Key="tgl3_intf">系統按鈕標準尺寸</v:String>
<v:String x:Key="tgl4_intf">標準游標閃爍頻率</v:String>
<v:String x:Key="tgl5_intf">標準捲動列尺寸</v:String>
@@ -222,11 +225,11 @@
<v:String x:Key="tgl30_intf">桌面元素工具提示</v:String>
<v:String x:Key="tgl31_intf">開始功能表中整合"Bing"的搜尋查詢</v:String>
<v:String x:Key="tgl32_intf">開啟"快速存取"而非"本機"</v:String>
- <v:String x:Key="tgl33_intf">檔案總管中顯示副檔名</v:String>
- <v:String x:Key="tgl34_intf">亮度異常變化</v:String>
- <v:String x:Key="tgl1_desc_intf">將游標選取的顏色從藍色變更為灰色"濕瀝青"。</v:String>
- <v:String x:Key="tgl2_desc_intf">將某些程式的工具提示顏色從黃色變更為淺藍色"蔚藍"。</v:String>
+ <v:String x:Key="color1_desc_intf">設定使用游標選取文字或物件時的背景顏色。</v:String>
+ <v:String x:Key="color2_desc_intf">設定受支援應用程式中工具提示(tooltip)的顏色。</v:String>
+ <v:String x:Key="tgl1_desc_intf">預設情況下,Windows 會隱藏檔案副檔名,使檔案總管介面更簡潔。若需顯示副檔名,可透過此調整功能啟用,節省搜尋時間。注意:螢幕可能閃爍。</v:String>
+ <v:String x:Key="tgl2_desc_intf">部分裝置的螢幕亮度可能隨顯示內容自動變化。若關閉 HDR、動態亮度及電源設定仍無法解決問題(此狀況在電池供電的筆記型電腦上尤為常見),可嘗試此調整項——它將在系統層級強制停用自動亮度調節功能。手動亮度控制功能仍可正常使用。</v:String>
<v:String x:Key="tgl3_desc_intf">此調整會縮小最小化、最大化及關閉按鈕的尺寸,使其更為精簡。此設定將套用至所有視窗,包含檔案總管、相片、瀏覽器及其他常用程式。</v:String>
<v:String x:Key="tgl4_desc_intf">此調整會提高文字游標的閃爍頻率。預設情況下,游標每 530 毫秒閃爍一次。</v:String>
<v:String x:Key="tgl5_desc_intf">此調整功能可降低經典 Windows 應用程式(包含檔案總管、瀏覽器及其他舊版程式)中捲動列的粗細。但此設定不影響現代化介面,因其採用獨立於系統設定的專屬控制元件。</v:String>
@@ -257,8 +260,6 @@
<v:String x:Key="tgl30_desc_intf">此調整將停用滑鼠懸停於桌面元素時的工具提示功能。</v:String>
<v:String x:Key="tgl31_desc_intf">預設情況下,Windows 會將您在"開始"功能表中的所有搜尋內容傳送至其伺服器,以提供 Bing 搜尋結果。若您不需要"開始"功能表整合 Bing 功能,可透過調整設定停用網頁搜尋。請注意畫面可能閃爍。</v:String>
<v:String x:Key="tgl32_desc_intf">預設情況下,開啟檔案總管時,第一個標籤頁會顯示"快速存取"。若要開啟任何磁碟機,則需進行多餘的操作。此調整將使開啟檔案總管時預設顯示"本機"而非"快速存取"。</v:String>
- <v:String x:Key="tgl33_desc_intf">預設情況下,Windows 會隱藏檔案副檔名,使檔案總管介面更簡潔。若需顯示副檔名,可透過此調整功能啟用,節省搜尋時間。注意:螢幕可能閃爍。</v:String>
- <v:String x:Key="tgl34_desc_intf">部分裝置的螢幕亮度可能隨顯示內容自動變化。若關閉 HDR、動態亮度及電源設定仍無法解決問題(此狀況在電池供電的筆記型電腦上尤為常見),可嘗試此調整項——它將在系統層級強制停用自動亮度調節功能。手動亮度控制功能仍可正常使用。</v:String>
<!--#endregion-->
<!--#region Packages Page -->
diff --git a/.Source/GTweak/Utilities/Controls/SettingsEngine.cs b/.Source/GTweak/Utilities/Controls/SettingsEngine.cs
index d07a6eb5..139165ad 100644
--- a/.Source/GTweak/Utilities/Controls/SettingsEngine.cs
+++ b/.Source/GTweak/Utilities/Controls/SettingsEngine.cs
@@ -125,7 +125,7 @@ namespace GTweak.Utilities.Controls
INIManager iniManager = new INIManager(PathLocator.Files.Config);
iniManager.Write("GTweak", "Author", "Greedeks");
- iniManager.Write("GTweak", "FormatVersion", "2");
+ iniManager.Write("GTweak", "FormatVersion", "3");
iniManager.WriteAll(INIManager.SectionConf, INIManager.TempTweaksConf);
iniManager.WriteAll(INIManager.SectionIntf, INIManager.TempTweaksIntf);
iniManager.WriteAll(INIManager.SectionSvc, INIManager.TempTweaksSvc);
@@ -151,9 +151,9 @@ namespace GTweak.Utilities.Controls
PathLocator.Files.Config = vistaOpenFileDialog.FileName;
INIManager iniManager = new INIManager(PathLocator.Files.Config);
- if (iniManager.GetKeysOrValue("GTweak", false).Contains("Greedeks") && iniManager.GetKeysOrValue("GTweak").Contains("FormatVersion") && iniManager.GetKeysOrValue("GTweak", false).Contains("2"))
+ if (iniManager.GetKeysOrValue("GTweak", false).Contains("Greedeks") && iniManager.GetKeysOrValue("GTweak").Contains("FormatVersion") && iniManager.GetKeysOrValue("GTweak", false).Contains("3"))
{
- if (File.ReadLines(PathLocator.Files.Config).Any(line => line.Contains("TglButton")) || File.ReadLines(PathLocator.Files.Config).Any(line => line.Contains("Slider")))
+ if (File.ReadLines(PathLocator.Files.Config).Any(line => line.Contains("TglButton")) || File.ReadLines(PathLocator.Files.Config).Any(line => line.Contains("Slider")) || File.ReadLines(PathLocator.Files.Config).Any(line => line.Contains("ColorPicker")))
{
new ImportWindow(Path.GetFileName(vistaOpenFileDialog.FileName)).ShowDialog();
}
diff --git a/.Source/GTweak/Utilities/Managers/ControlWriterManager.cs b/.Source/GTweak/Utilities/Managers/ControlWriterManager.cs
index 1faeceee..25869644 100644
--- a/.Source/GTweak/Utilities/Managers/ControlWriterManager.cs
+++ b/.Source/GTweak/Utilities/Managers/ControlWriterManager.cs
@@ -9,12 +9,14 @@ namespace GTweak.Utilities.Managers
internal ButtonCollection Button { get; }
internal SliderCollection Slider { get; }
+ internal ColorPickerCollection ColorPicker { get; }
internal ControlWriterManager(Dictionary<string, object> controlStates)
{
_controlStates = controlStates ?? new Dictionary<string, object>();
Button = new ButtonCollection(_controlStates);
Slider = new SliderCollection(_controlStates);
+ ColorPicker = new ColorPickerCollection(_controlStates);
}
internal class ButtonCollection
@@ -58,5 +60,25 @@ namespace GTweak.Utilities.Managers
}
}
}
+
+ internal class ColorPickerCollection
+ {
+ private readonly Dictionary<string, object> _controlStates;
+ private static readonly ConcurrentDictionary<int, string> KeyCache = new ConcurrentDictionary<int, string>();
+
+ internal ColorPickerCollection(Dictionary<string, object> controlStates) => _controlStates = controlStates;
+
+ internal object this[int index]
+ {
+ set
+ {
+ string key = KeyCache.GetOrAdd(index, i => $"ColorPicker{i}");
+ if (_controlStates != null)
+ {
+ _controlStates[key] = value;
+ }
+ }
+ }
+ }
}
}
\ No newline at end of file
diff --git a/.Source/GTweak/Utilities/Managers/NotificationManager.cs b/.Source/GTweak/Utilities/Managers/NotificationManager.cs
index 8d0ef075..ab4f28be 100644
--- a/.Source/GTweak/Utilities/Managers/NotificationManager.cs
+++ b/.Source/GTweak/Utilities/Managers/NotificationManager.cs
@@ -20,8 +20,7 @@ namespace GTweak.Utilities.Managers
internal static readonly Dictionary<string, NoticeAction> IntfActions = new Dictionary<string, NoticeAction>()
{
- ["TglButton1"] = NoticeAction.Logout,
- ["TglButton2"] = NoticeAction.Logout,
+ ["TglButton2"] = NoticeAction.Restart,
["TglButton3"] = NoticeAction.Logout,
["TglButton4"] = NoticeAction.Logout,
["TglButton5"] = NoticeAction.Logout,
@@ -31,7 +30,6 @@ namespace GTweak.Utilities.Managers
["TglButton20"] = NoticeAction.Restart,
["TglButton22"] = NoticeAction.Logout,
["TglButton23"] = NoticeAction.Restart,
- ["TglButton34"] = NoticeAction.Restart
};
internal static readonly Dictionary<string, NoticeAction> SysActions = new Dictionary<string, NoticeAction>()
diff --git a/.Source/GTweak/Utilities/Tweaks/InterfaceTweaks.cs b/.Source/GTweak/Utilities/Tweaks/InterfaceTweaks.cs
index ff6785a9..0c3711b8 100644
--- a/.Source/GTweak/Utilities/Tweaks/InterfaceTweaks.cs
+++ b/.Source/GTweak/Utilities/Tweaks/InterfaceTweaks.cs
@@ -18,14 +18,16 @@ namespace GTweak.Utilities.Tweaks
internal void AnalyzeAndUpdate()
{
+ _сontrolWriter.ColorPicker[1] = RegistryHelp.GetValue(@"HKEY_CURRENT_USER\Control Panel\Colors", "Hilight", "0 120 215");
+
+ _сontrolWriter.ColorPicker[2] = RegistryHelp.GetValue(@"HKEY_CURRENT_USER\Control Panel\Colors", "InfoWindow", "255 255 225");
+
_сontrolWriter.Button[1] =
- RegistryHelp.CheckValue(@"HKEY_CURRENT_USER\Control Panel\Colors", "Hilight", "80 80 80") ||
- RegistryHelp.CheckValue(@"HKEY_CURRENT_USER\Control Panel\Colors", "HotTrackingColor", "80 80 80");
+ RegistryHelp.CheckValue(@"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced", "HideFileExt", "1");
_сontrolWriter.Button[2] =
- RegistryHelp.CheckValue(@"HKEY_USERS\.DEFAULT\Control Panel\Colors", "InfoWindow", "240 255 255") ||
- RegistryHelp.CheckValue(@"HKEY_USERS\S-1-5-19\Control Panel\Colors", "InfoWindow", "240 255 255") ||
- RegistryHelp.CheckValue(@"HKEY_USERS\S-1-5-20\Control Panel\Colors", "InfoWindow", "240 255 255");
+ RegistryHelp.CheckValue(@"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\GraphicsDrivers", "DisableCABC", "1") ||
+ (HardwareData.OS.Build >= 22000m && RegistryHelp.CheckValue(@"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\GraphicsDrivers", "CABCOption", "0"));
_сontrolWriter.Button[3] =
RegistryHelp.CheckValue(@"HKEY_CURRENT_USER\Control Panel\Desktop\WindowMetrics", "CaptionHeight", "-270") ||
@@ -176,13 +178,26 @@ namespace GTweak.Utilities.Tweaks
_сontrolWriter.Button[32] =
HardwareData.OS.IsWin11 && RegistryHelp.CheckValue(@"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer", "HubMode", "1") ||
HardwareData.OS.IsWin10 && RegistryHelp.CheckValue(@"HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced", "LaunchTo", "1");
+ }
- _сontrolWriter.Button[33] =
- RegistryHelp.CheckValue(@"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced", "HideFileExt", "1");
+ internal void ApplyTweaksColor(string tweak, string value)
+ {
+ INIManager.TempWrite(INIManager.TempTweaksIntf, tweak, value);
- _сontrolWriter.Button[34] =
- RegistryHelp.CheckValue(@"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\GraphicsDrivers", "DisableCABC", "1") ||
- (HardwareData.OS.Build >= 22000m && RegistryHelp.CheckValue(@"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\GraphicsDrivers", "CABCOption", "0"));
+ switch (tweak)
+ {
+ case "ColorPicker1":
+ RegistryHelp.Write(Registry.CurrentUser, @"Control Panel\Colors", "Hilight", value, RegistryValueKind.String);
+ RegistryHelp.Write(Registry.CurrentUser, @"Control Panel\Colors", "HotTrackingColor", value == "0 120 215" ? "0 102 204" : value, RegistryValueKind.String);
+ break;
+ case "ColorPicker2":
+ RegistryHelp.Write(Registry.Users, @".DEFAULT\Control Panel\Colors", "InfoWindow", value, RegistryValueKind.String);
+ RegistryHelp.Write(Registry.Users, @"S-1-5-19\Control Panel\Colors", "InfoWindow", value, RegistryValueKind.String);
+ RegistryHelp.Write(Registry.Users, @"S-1-5-20\Control Panel\Colors", "InfoWindow", value, RegistryValueKind.String);
+ break;
+ default:
+ break;
+ }
}
internal void ApplyTweaks(string tweak, bool isDisabled)
@@ -192,13 +207,25 @@ namespace GTweak.Utilities.Tweaks
switch (tweak)
{
case "TglButton1":
- RegistryHelp.Write(Registry.CurrentUser, @"Control Panel\Colors", "Hilight", isDisabled ? "80 80 80" : "0 120 215", RegistryValueKind.String);
- RegistryHelp.Write(Registry.CurrentUser, @"Control Panel\Colors", "HotTrackingColor", isDisabled ? "80 80 80" : "0 102 204", RegistryValueKind.String);
+ RegistryHelp.Write(Registry.CurrentUser, @"Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced", "HideFileExt", isDisabled ? 1 : 0, RegistryValueKind.DWord);
break;
case "TglButton2":
- RegistryHelp.Write(Registry.Users, @".DEFAULT\Control Panel\Colors", "InfoWindow", isDisabled ? "240 255 255" : "255 255 255", RegistryValueKind.String);
- RegistryHelp.Write(Registry.Users, @"S-1-5-19\Control Panel\Colors", "InfoWindow", isDisabled ? "240 255 255" : "255 255 255", RegistryValueKind.String);
- RegistryHelp.Write(Registry.Users, @"S-1-5-20\Control Panel\Colors", "InfoWindow", isDisabled ? "240 255 255" : "255 255 255", RegistryValueKind.String);
+ if (isDisabled)
+ {
+ RegistryHelp.Write(Registry.LocalMachine, @"SYSTEM\CurrentControlSet\Control\GraphicsDrivers", "DisableCABC", 1, RegistryValueKind.DWord);
+ if (HardwareData.OS.Build >= 22000m)
+ {
+ RegistryHelp.Write(Registry.LocalMachine, @"SYSTEM\CurrentControlSet\Control\GraphicsDrivers", "CABCOption", 0, RegistryValueKind.DWord);
+ }
+ }
+ else
+ {
+ RegistryHelp.DeleteValue(Registry.LocalMachine, @"SYSTEM\CurrentControlSet\Control\GraphicsDrivers", "DisableCABC");
+ if (HardwareData.OS.Build >= 22000m)
+ {
+ RegistryHelp.DeleteValue(Registry.LocalMachine, @"SYSTEM\CurrentControlSet\Control\GraphicsDrivers", "CABCOption");
+ }
+ }
break;
case "TglButton3":
RegistryHelp.Write(Registry.CurrentUser, @"Control Panel\Desktop\WindowMetrics", "CaptionHeight", isDisabled ? "-270" : "-330", RegistryValueKind.String);
@@ -612,27 +639,6 @@ namespace GTweak.Utilities.Tweaks
}
}
break;
- case "TglButton33":
- RegistryHelp.Write(Registry.CurrentUser, @"Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced", "HideFileExt", isDisabled ? 1 : 0, RegistryValueKind.DWord);
- break;
- case "TglButton34":
- if (isDisabled)
- {
- RegistryHelp.Write(Registry.LocalMachine, @"SYSTEM\CurrentControlSet\Control\GraphicsDrivers", "DisableCABC", 1, RegistryValueKind.DWord);
- if (HardwareData.OS.Build >= 22000m)
- {
- RegistryHelp.Write(Registry.LocalMachine, @"SYSTEM\CurrentControlSet\Control\GraphicsDrivers", "CABCOption", 0, RegistryValueKind.DWord);
- }
- }
- else
- {
- RegistryHelp.DeleteValue(Registry.LocalMachine, @"SYSTEM\CurrentControlSet\Control\GraphicsDrivers", "DisableCABC");
- if (HardwareData.OS.Build >= 22000m)
- {
- RegistryHelp.DeleteValue(Registry.LocalMachine, @"SYSTEM\CurrentControlSet\Control\GraphicsDrivers", "CABCOption");
- }
- }
- break;
default:
break;
}
diff --git a/.Source/GTweak/View/AddonsView.xaml b/.Source/GTweak/View/AddonsView.xaml
index 8e1804e7..9499d1ea 100644
--- a/.Source/GTweak/View/AddonsView.xaml
+++ b/.Source/GTweak/View/AddonsView.xaml
@@ -4,7 +4,7 @@
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:uc="clr-namespace:GTweak.Assets.UserControl"
+ xmlns:uc="clr-namespace:GTweak.Assets.UserControls"
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
xmlns:local="clr-namespace:GTweak.View"
mc:Ignorable="d" d:Width="1014" Style="{StaticResource LaunchPage}">
diff --git a/.Source/GTweak/View/ConfidentialityView.xaml b/.Source/GTweak/View/ConfidentialityView.xaml
index 20e6e41f..eb749e24 100644
--- a/.Source/GTweak/View/ConfidentialityView.xaml
+++ b/.Source/GTweak/View/ConfidentialityView.xaml
@@ -4,7 +4,7 @@
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:uc="clr-namespace:GTweak.Assets.UserControl"
+ xmlns:uc="clr-namespace:GTweak.Assets.UserControls"
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
xmlns:local="clr-namespace:GTweak.View"
mc:Ignorable="d" d:Width="1014" Style="{StaticResource LaunchPage}">
diff --git a/.Source/GTweak/View/ConfidentialityView.xaml.cs b/.Source/GTweak/View/ConfidentialityView.xaml.cs
index 77488831..d5781899 100644
--- a/.Source/GTweak/View/ConfidentialityView.xaml.cs
+++ b/.Source/GTweak/View/ConfidentialityView.xaml.cs
@@ -1,7 +1,7 @@
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
-using GTweak.Assets.UserControl;
+using GTweak.Assets.UserControls;
using GTweak.Utilities.Managers;
using GTweak.Utilities.Tweaks;
diff --git a/.Source/GTweak/View/DataSystemView.xaml b/.Source/GTweak/View/DataSystemView.xaml
index 2c0862ce..6713c535 100644
--- a/.Source/GTweak/View/DataSystemView.xaml
+++ b/.Source/GTweak/View/DataSystemView.xaml
@@ -4,7 +4,7 @@
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:uc="clr-namespace:GTweak.Assets.UserControl"
+ xmlns:uc="clr-namespace:GTweak.Assets.UserControls"
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
xmlns:xrpb="http://XamlRadialProgressBar/DotNet"
xmlns:anim="clr-namespace:GTweak.Utilities.Animation"
diff --git a/.Source/GTweak/View/InterfaceView.xaml b/.Source/GTweak/View/InterfaceView.xaml
index 8f5bcd6c..d037964c 100644
--- a/.Source/GTweak/View/InterfaceView.xaml
+++ b/.Source/GTweak/View/InterfaceView.xaml
@@ -4,7 +4,8 @@
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:uc="clr-namespace:GTweak.Assets.UserControl"
+ xmlns:uc="clr-namespace:GTweak.Assets.UserControls"
+ xmlns:cp="clr-namespace:GTweak.Assets.UserControls.ColorWheelPicker"
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
xmlns:local="clr-namespace:GTweak.View"
mc:Ignorable="d" d:Width="1014" Style="{StaticResource LaunchPage}">
@@ -31,6 +32,18 @@
<uc:FlowPanel VerticalSpacing="20" HorizontalSpacing="5" Margin="10">
+ <StackPanel Orientation="Vertical" Margin="0,-10,0,-10">
+ <StackPanel Orientation="Horizontal" Height="45" MouseEnter="Tweak_MouseEnter" MouseLeave="Tweak_MouseLeave" ToolTip="{DynamicResource color1_desc_intf}" ToolTipService.IsEnabled="False">
+ <TextBlock Style="{StaticResource TextDefault}" VerticalAlignment="Center" Text="{DynamicResource color1_intf}"/>
+ <cp:ColorPicker x:Name="ColorPicker1" SelectedColorString="{Binding [ColorPicker1].Value}" DefaultColor="#0077D4" Margin="7,5,5,0" Height="32" VerticalAlignment="Center" ColorPicked="ColorPicker_ColorPicked" PickerClosed="ColorPicker_PickerClosed"/>
+ </StackPanel>
+
+ <StackPanel Orientation="Horizontal" Height="45" MouseEnter="Tweak_MouseEnter" MouseLeave="Tweak_MouseLeave" ToolTip="{DynamicResource color2_desc_intf}" ToolTipService.IsEnabled="False">
+ <TextBlock Style="{StaticResource TextDefault}" VerticalAlignment="Center" Text="{DynamicResource color2_intf}"/>
+ <cp:ColorPicker x:Name="ColorPicker2" SelectedColorString="{Binding [ColorPicker2].Value}" DefaultColor="#FFFFE1" Margin="7,5,5,0" Height="32" VerticalAlignment="Center" ColorPicked="ColorPicker_ColorPicked" PickerClosed="ColorPicker_PickerClosed"/>
+ </StackPanel>
+ </StackPanel>
+
<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}" />
<uc:ToggleButton x:Name="TglButton3" Style="{StaticResource ToggleStyle}" StateNA="{Binding [TglButton3].State}" TextResource="{DynamicResource tgl3_intf}" Description="{DynamicResource tgl3_desc_intf}" />
@@ -63,9 +76,7 @@
<uc:ToggleButton x:Name="TglButton30" Style="{StaticResource ToggleStyle}" StateNA="{Binding [TglButton30].State}" TextResource="{DynamicResource tgl30_intf}" Description="{DynamicResource tgl30_desc_intf}" />
<uc:ToggleButton x:Name="TglButton31" Style="{StaticResource ToggleStyle}" StateNA="{Binding [TglButton31].State}" TextResource="{DynamicResource tgl31_intf}" Description="{DynamicResource tgl31_desc_intf}" />
<uc:ToggleButton x:Name="TglButton32" Style="{StaticResource ToggleStyle}" StateNA="{Binding [TglButton32].State}" TextResource="{DynamicResource tgl32_intf}" Description="{DynamicResource tgl32_desc_intf}" />
- <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:FlowPanel>
</ScrollViewer>
diff --git a/.Source/GTweak/View/InterfaceView.xaml.cs b/.Source/GTweak/View/InterfaceView.xaml.cs
index ab1bd1e4..3a24d0ac 100644
--- a/.Source/GTweak/View/InterfaceView.xaml.cs
+++ b/.Source/GTweak/View/InterfaceView.xaml.cs
@@ -1,7 +1,10 @@
+using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
-using GTweak.Assets.UserControl;
+using System.Windows.Media;
+using GTweak.Assets.UserControls;
+using GTweak.Assets.UserControls.ColorWheelPicker;
using GTweak.Utilities.Maintenance;
using GTweak.Utilities.Managers;
using GTweak.Utilities.Tweaks;
@@ -22,19 +25,37 @@ namespace GTweak.View
}
}
-
private void Tweak_MouseEnter(object sender, MouseEventArgs e)
{
- string description = ((ToggleButton)sender!).Description?.ToString() ?? string.Empty;
+ string description = string.Empty;
+
+ switch (sender)
+ {
+ case StackPanel panel:
+ description = panel.ToolTip?.ToString() ?? string.Empty;
+ break;
+ case ToggleButton toggle:
+ description = toggle.Description?.ToString() ?? string.Empty;
+ break;
+ default:
+ break;
+ }
if (DescBlock.Text != description)
{
DescBlock.Text = description;
}
}
-
private void Tweak_MouseLeave(object sender, MouseEventArgs e) => DescBlock.Text = DescBlock.DefaultText;
+ private void ColorPicker_ColorPicked(object sender, Color e)
+ {
+ ColorPicker colorPicker = (ColorPicker)sender;
+ _intfTweaks.ApplyTweaksColor(colorPicker.Name, colorPicker.SelectedColorString);
+ }
+
+ private void ColorPicker_PickerClosed(object sender, EventArgs e) => NotificationManager.Show().WithDelay(300).Logout();
+
private void TglButton_ChangedState(object sender, RoutedEventArgs e)
{
ToggleButton toggleButton = (ToggleButton)sender;
diff --git a/.Source/GTweak/View/PakagesView.xaml b/.Source/GTweak/View/PakagesView.xaml
index cccb79f6..bc345853 100644
--- a/.Source/GTweak/View/PakagesView.xaml
+++ b/.Source/GTweak/View/PakagesView.xaml
@@ -4,7 +4,7 @@
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:uc="clr-namespace:GTweak.Assets.UserControl"
+ xmlns:uc="clr-namespace:GTweak.Assets.UserControls"
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
xmlns:local="clr-namespace:GTweak.View"
mc:Ignorable="d" d:Width="1014" Style="{StaticResource LaunchPage}">
diff --git a/.Source/GTweak/View/ServicesView.xaml b/.Source/GTweak/View/ServicesView.xaml
index 7503fe1b..bfef8053 100644
--- a/.Source/GTweak/View/ServicesView.xaml
+++ b/.Source/GTweak/View/ServicesView.xaml
@@ -4,7 +4,7 @@
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:uc="clr-namespace:GTweak.Assets.UserControl"
+ xmlns:uc="clr-namespace:GTweak.Assets.UserControls"
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
xmlns:local="clr-namespace:GTweak.View"
mc:Ignorable="d" d:Width="1014" Style="{StaticResource LaunchPage}">
diff --git a/.Source/GTweak/View/ServicesView.xaml.cs b/.Source/GTweak/View/ServicesView.xaml.cs
index 2b0d996a..e933e79f 100644
--- a/.Source/GTweak/View/ServicesView.xaml.cs
+++ b/.Source/GTweak/View/ServicesView.xaml.cs
@@ -1,7 +1,7 @@
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
-using GTweak.Assets.UserControl;
+using GTweak.Assets.UserControls;
using GTweak.Utilities.Managers;
using GTweak.Utilities.Tweaks;
diff --git a/.Source/GTweak/View/SystemView.xaml b/.Source/GTweak/View/SystemView.xaml
index c480c4a5..8a48b3e6 100644
--- a/.Source/GTweak/View/SystemView.xaml
+++ b/.Source/GTweak/View/SystemView.xaml
@@ -4,7 +4,7 @@
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:uc="clr-namespace:GTweak.Assets.UserControl"
+ xmlns:uc="clr-namespace:GTweak.Assets.UserControls"
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
xmlns:local="clr-namespace:GTweak.View"
mc:Ignorable="d" d:Width="1014" Style="{StaticResource LaunchPage}">
@@ -53,7 +53,6 @@
<uc:ToggleButton x:Name="TglButton2" Style="{StaticResource ToggleStyle}" StateNA="{Binding [TglButton2].State}" Margin="0,20,0,0" TextResource="{DynamicResource tgl2_sys}" Description="{DynamicResource tgl2_desc_sys}" />
</StackPanel>
-
<uc:ToggleButton x:Name="TglButton3" Style="{StaticResource ToggleStyle}" StateNA="{Binding [TglButton3].State}" TextResource="{DynamicResource tgl3_sys}" Description="{DynamicResource tgl3_desc_sys}" />
<uc:ToggleButton x:Name="TglButton4" Style="{StaticResource ToggleStyle}" StateNA="{Binding [TglButton4].State}" TextResource="{DynamicResource tgl4_sys}" Description="{DynamicResource tgl4_desc_sys}" />
<uc:ToggleButton x:Name="TglButton5" Style="{StaticResource ToggleStyle}" StateNA="{Binding [TglButton5].State}" TextResource="{DynamicResource tgl5_sys}" Description="{DynamicResource tgl5_desc_sys}" />
diff --git a/.Source/GTweak/View/SystemView.xaml.cs b/.Source/GTweak/View/SystemView.xaml.cs
index 1557fc25..11f829f0 100644
--- a/.Source/GTweak/View/SystemView.xaml.cs
+++ b/.Source/GTweak/View/SystemView.xaml.cs
@@ -1,7 +1,7 @@
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
-using GTweak.Assets.UserControl;
+using GTweak.Assets.UserControls;
using GTweak.Utilities.Managers;
using GTweak.Utilities.Tweaks;
diff --git a/.Source/GTweak/View/UtilsView.xaml b/.Source/GTweak/View/UtilsView.xaml
index 4001d4de..392df735 100644
--- a/.Source/GTweak/View/UtilsView.xaml
+++ b/.Source/GTweak/View/UtilsView.xaml
@@ -3,7 +3,7 @@
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:uc="clr-namespace:GTweak.Assets.UserControl"
+ xmlns:uc="clr-namespace:GTweak.Assets.UserControls"
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
xmlns:local="clr-namespace:GTweak.View"
mc:Ignorable="d" d:Width="1014" Style="{StaticResource LaunchPage}">
diff --git a/.Source/GTweak/Windows/ImportWindow.xaml.cs b/.Source/GTweak/Windows/ImportWindow.xaml.cs
index 3cc6042c..8e20011a 100644
--- a/.Source/GTweak/Windows/ImportWindow.xaml.cs
+++ b/.Source/GTweak/Windows/ImportWindow.xaml.cs
@@ -140,7 +140,14 @@ namespace GTweak.Windows
var (Section, TweakAction, NoticeActions, ExplorerMapping) =
allSections.First(s => s.Section == section);
- TweakAction?.Invoke(tweak, Convert.ToBoolean(value));
+ if (section == INIManager.SectionIntf && tweak.StartsWith("ColorPicker"))
+ {
+ _intfTweaks.ApplyTweaksColor(tweak, value);
+ }
+ else
+ {
+ TweakAction?.Invoke(tweak, Convert.ToBoolean(value));
+ }
if (NoticeActions != null)
{
diff --git a/.Source/GTweak/Windows/MainWindow.xaml b/.Source/GTweak/Windows/MainWindow.xaml
index 639fdb0a..449dbcf5 100644
--- a/.Source/GTweak/Windows/MainWindow.xaml
+++ b/.Source/GTweak/Windows/MainWindow.xaml
@@ -4,7 +4,7 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:vm="clr-namespace:GTweak.Core.ViewModel"
- xmlns:uc="clr-namespace:GTweak.Assets.UserControl"
+ xmlns:uc="clr-namespace:GTweak.Assets.UserControls"
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
xmlns:local="clr-namespace:GTweak"
mc:Ignorable="d" Icon="/GTweak.ico"