mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-16 19:57:57 +01:00
Fixing accent brush and corner radius on dashboard (#31031)
* Removing background accent. It causes eye to target ones differently due to shading differences * forcing radius * Update DashboardPage.xaml * Remove unused accent color from modules listing --------- Co-authored-by: Jaime Bernardo <jaime@janeasystems.com>
This commit is contained in:
@@ -132,38 +132,6 @@ namespace Microsoft.PowerToys.Settings.UI.Helpers
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Color GetModuleAccentColor(ModuleType moduleType)
|
|
||||||
{
|
|
||||||
return moduleType switch
|
|
||||||
{
|
|
||||||
ModuleType.AlwaysOnTop => Color.FromArgb(255, 74, 196, 242), // #4ac4f2
|
|
||||||
ModuleType.Awake => Color.FromArgb(255, 40, 177, 233), // #28b1e9
|
|
||||||
ModuleType.ColorPicker => Color.FromArgb(255, 7, 129, 211), // #0781d3
|
|
||||||
ModuleType.CropAndLock => Color.FromArgb(255, 32, 166, 228), // #20a6e4
|
|
||||||
ModuleType.EnvironmentVariables => Color.FromArgb(255, 16, 132, 208), // #1084d0
|
|
||||||
ModuleType.FancyZones => Color.FromArgb(255, 65, 209, 247), // #41d1f7
|
|
||||||
ModuleType.FileLocksmith => Color.FromArgb(255, 245, 161, 20), // #f5a114
|
|
||||||
ModuleType.FindMyMouse => Color.FromArgb(255, 104, 109, 112), // #686d70
|
|
||||||
ModuleType.Hosts => Color.FromArgb(255, 16, 132, 208), // #1084d0
|
|
||||||
ModuleType.ImageResizer => Color.FromArgb(255, 85, 207, 248), // #55cff8
|
|
||||||
ModuleType.KeyboardManager => Color.FromArgb(255, 224, 231, 238), // #e0e7ee
|
|
||||||
ModuleType.MouseHighlighter => Color.FromArgb(255, 17, 126, 199), // #117ec7
|
|
||||||
ModuleType.MouseJump => Color.FromArgb(255, 240, 240, 239), // #f0f0ef
|
|
||||||
ModuleType.MousePointerCrosshairs => Color.FromArgb(255, 25, 115, 182), // #1973b6
|
|
||||||
ModuleType.MouseWithoutBorders => Color.FromArgb(255, 31, 164, 227), // #1fa4e3
|
|
||||||
ModuleType.PastePlain => Color.FromArgb(255, 243, 156, 16), // #f39c10
|
|
||||||
ModuleType.Peek => Color.FromArgb(255, 255, 214, 103), // #ffd667
|
|
||||||
ModuleType.PowerRename => Color.FromArgb(255, 43, 186, 243), // #2bbaf3
|
|
||||||
ModuleType.PowerLauncher => Color.FromArgb(255, 51, 191, 240), // #33bff0
|
|
||||||
ModuleType.PowerAccent => Color.FromArgb(255, 84, 89, 92), // #54595c
|
|
||||||
ModuleType.RegistryPreview => Color.FromArgb(255, 17, 80, 138), // #11508a
|
|
||||||
ModuleType.MeasureTool => Color.FromArgb(255, 135, 144, 153), // #879099
|
|
||||||
ModuleType.ShortcutGuide => Color.FromArgb(255, 193, 202, 209), // #c1cad1
|
|
||||||
ModuleType.PowerOCR => Color.FromArgb(255, 24, 153, 224), // #1899e0
|
|
||||||
_ => Color.FromArgb(255, 255, 255, 255), // never called, all values listed above
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
public static System.Type GetModulePageType(ModuleType moduleType)
|
public static System.Type GetModulePageType(ModuleType moduleType)
|
||||||
{
|
{
|
||||||
return moduleType switch
|
return moduleType switch
|
||||||
|
|||||||
@@ -310,6 +310,7 @@
|
|||||||
Background="Transparent"
|
Background="Transparent"
|
||||||
BorderThickness="0"
|
BorderThickness="0"
|
||||||
Click="DashboardListItemClick"
|
Click="DashboardListItemClick"
|
||||||
|
CornerRadius="{StaticResource OverlayCornerRadius}"
|
||||||
Tag="{x:Bind Tag, Mode=OneWay}">
|
Tag="{x:Bind Tag, Mode=OneWay}">
|
||||||
<Grid
|
<Grid
|
||||||
Background="{ThemeResource CardBackgroundFillColorDefaultBrush}"
|
Background="{ThemeResource CardBackgroundFillColorDefaultBrush}"
|
||||||
@@ -321,14 +322,6 @@
|
|||||||
<RowDefinition />
|
<RowDefinition />
|
||||||
<RowDefinition />
|
<RowDefinition />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<Border Grid.RowSpan="2" Opacity="0.05">
|
|
||||||
<Border.Background>
|
|
||||||
<LinearGradientBrush StartPoint="0,0" EndPoint="1,3">
|
|
||||||
<GradientStop Offset="0.5" Color="{x:Bind AccentColor, Mode=OneWay}" />
|
|
||||||
<GradientStop Offset="0.9" Color="Transparent" />
|
|
||||||
</LinearGradientBrush>
|
|
||||||
</Border.Background>
|
|
||||||
</Border>
|
|
||||||
<Grid Margin="16,8,16,0" ColumnSpacing="12">
|
<Grid Margin="16,8,16,0" ColumnSpacing="12">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="Auto" />
|
<ColumnDefinition Width="Auto" />
|
||||||
@@ -408,6 +401,7 @@
|
|||||||
Background="Transparent"
|
Background="Transparent"
|
||||||
BorderThickness="0"
|
BorderThickness="0"
|
||||||
Click="DashboardListItemClick"
|
Click="DashboardListItemClick"
|
||||||
|
CornerRadius="{StaticResource OverlayCornerRadius}"
|
||||||
Tag="{x:Bind Tag, Mode=OneWay}">
|
Tag="{x:Bind Tag, Mode=OneWay}">
|
||||||
<Grid
|
<Grid
|
||||||
Padding="16,12"
|
Padding="16,12"
|
||||||
|
|||||||
@@ -25,8 +25,6 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
|
|||||||
|
|
||||||
public ModuleType Tag { get; set; }
|
public ModuleType Tag { get; set; }
|
||||||
|
|
||||||
public Color AccentColor { get; set; } = Colors.Transparent;
|
|
||||||
|
|
||||||
public bool IsLocked { get; set; }
|
public bool IsLocked { get; set; }
|
||||||
|
|
||||||
public bool IsEnabled
|
public bool IsEnabled
|
||||||
|
|||||||
@@ -80,7 +80,6 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
|
|||||||
IsLocked = gpo == GpoRuleConfigured.Enabled || gpo == GpoRuleConfigured.Disabled,
|
IsLocked = gpo == GpoRuleConfigured.Enabled || gpo == GpoRuleConfigured.Disabled,
|
||||||
Icon = ModuleHelper.GetModuleTypeFluentIconName(moduleType),
|
Icon = ModuleHelper.GetModuleTypeFluentIconName(moduleType),
|
||||||
EnabledChangedCallback = EnabledChangedOnUI,
|
EnabledChangedCallback = EnabledChangedOnUI,
|
||||||
AccentColor = ModuleHelper.GetModuleAccentColor(moduleType),
|
|
||||||
DashboardModuleItems = GetModuleItems(moduleType),
|
DashboardModuleItems = GetModuleItems(moduleType),
|
||||||
});
|
});
|
||||||
if (moduleType == ModuleType.KeyboardManager && gpo != GpoRuleConfigured.Disabled)
|
if (moduleType == ModuleType.KeyboardManager && gpo != GpoRuleConfigured.Disabled)
|
||||||
|
|||||||
Reference in New Issue
Block a user