mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-29 16:36:40 +01:00
Compare commits
8 Commits
leilzh/bgc
...
v0.49.1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1cd36eada8 | ||
|
|
0e382df5e6 | ||
|
|
1ed30247fa | ||
|
|
25a83c0d9d | ||
|
|
6dd74f5762 | ||
|
|
61b1a4b382 | ||
|
|
2a07c46500 | ||
|
|
f5bc7896dd |
1
.github/actions/spell-check/expect.txt
vendored
1
.github/actions/spell-check/expect.txt
vendored
@@ -655,6 +655,7 @@ finalizer
|
||||
findfast
|
||||
findstr
|
||||
FIXEDFILEINFO
|
||||
FFAA
|
||||
FLASHZONES
|
||||
FLASHZONESONQUICKSWITCH
|
||||
flt
|
||||
|
||||
@@ -51,7 +51,7 @@ UINT __stdcall ApplyModulesRegistryChangeSetsCA(MSIHANDLE hInstall)
|
||||
hr = WcaInitialize(hInstall, "ApplyModulesRegistryChangeSets");
|
||||
ExitOnFailure(hr, "Failed to initialize");
|
||||
hr = getInstallFolder(hInstall, installationFolder);
|
||||
ExitOnFailure(hr, "Failed to get installfolder.");
|
||||
ExitOnFailure(hr, "Failed to get installFolder.");
|
||||
for (const auto& changeSet : getAllModulesChangeSets(installationFolder, false))
|
||||
{
|
||||
if (!changeSet.apply())
|
||||
@@ -76,7 +76,7 @@ UINT __stdcall UnApplyModulesRegistryChangeSetsCA(MSIHANDLE hInstall)
|
||||
hr = WcaInitialize(hInstall, "UndoModulesRegistryChangeSets"); // original func name is too long
|
||||
ExitOnFailure(hr, "Failed to initialize");
|
||||
hr = getInstallFolder(hInstall, installationFolder);
|
||||
ExitOnFailure(hr, "Failed to get installfolder.");
|
||||
ExitOnFailure(hr, "Failed to get installFolder.");
|
||||
for (const auto& changeSet : getAllModulesChangeSets(installationFolder, false))
|
||||
{
|
||||
changeSet.unApply();
|
||||
|
||||
@@ -54,6 +54,9 @@ protected:
|
||||
HWND m_hwnd;
|
||||
POINT m_sonarPos = ptNowhere;
|
||||
|
||||
// Only consider double left control click if at least 100ms passed between the clicks, to avoid keyboards that might be sending rapid clicks.
|
||||
static const int MIN_DOUBLE_CLICK_TIME = 100;
|
||||
|
||||
static constexpr int SonarRadius = 100;
|
||||
static constexpr int SonarZoomFactor = 9;
|
||||
static constexpr DWORD FadeDuration = 500;
|
||||
@@ -304,23 +307,39 @@ void SuperSonar<D>::OnSonarKeyboardInput(RAWINPUT const& input)
|
||||
break;
|
||||
|
||||
case SonarState::ControlUp1:
|
||||
case SonarState::ControlUp2:
|
||||
if (pressed)
|
||||
{
|
||||
m_sonarState = SonarState::ControlDown2;
|
||||
auto now = GetTickCount();
|
||||
auto doubleClickInterval = now - m_lastKeyTime;
|
||||
POINT ptCursor{};
|
||||
if (GetCursorPos(&ptCursor) &&
|
||||
now - m_lastKeyTime <= GetDoubleClickTime() &&
|
||||
doubleClickInterval >= MIN_DOUBLE_CLICK_TIME &&
|
||||
doubleClickInterval <= GetDoubleClickTime() &&
|
||||
IsEqual(m_lastKeyPos, ptCursor))
|
||||
{
|
||||
m_sonarState = SonarState::ControlDown2;
|
||||
StartSonar();
|
||||
}
|
||||
else
|
||||
{
|
||||
m_sonarState = SonarState::ControlDown1;
|
||||
m_lastKeyTime = GetTickCount();
|
||||
m_lastKeyPos = {};
|
||||
GetCursorPos(&m_lastKeyPos);
|
||||
UpdateMouseSnooping();
|
||||
}
|
||||
Logger::info("Detecting double left control click with {} ms interval.", doubleClickInterval);
|
||||
m_lastKeyTime = now;
|
||||
m_lastKeyPos = ptCursor;
|
||||
}
|
||||
break;
|
||||
|
||||
case SonarState::ControlUp2:
|
||||
// Also deactivate sonar with left control.
|
||||
if (pressed)
|
||||
{
|
||||
StopSonar();
|
||||
}
|
||||
break;
|
||||
case SonarState::ControlDown2:
|
||||
if (!pressed)
|
||||
{
|
||||
|
||||
@@ -77,7 +77,7 @@ namespace ColorPicker.Helpers
|
||||
/// <param name="color">The see cref="Color"/> for the hexadecimal presentation</param>
|
||||
/// <returns>A hexadecimal <see cref="string"/> representation of a RGB color</returns>
|
||||
private static string ColorToHex(Color color)
|
||||
=> $"#{color.R.ToString("X2", CultureInfo.InvariantCulture)}"
|
||||
=> $"{color.R.ToString("X2", CultureInfo.InvariantCulture)}"
|
||||
+ $"{color.G.ToString("X2", CultureInfo.InvariantCulture)}"
|
||||
+ $"{color.B.ToString("X2", CultureInfo.InvariantCulture)}";
|
||||
|
||||
|
||||
@@ -148,7 +148,9 @@ namespace ColorPicker.ViewModels
|
||||
new ColorFormatModel()
|
||||
{
|
||||
FormatName = ColorRepresentationType.HEX.ToString(),
|
||||
Convert = (Color color) => { return ColorRepresentationHelper.GetStringRepresentationFromMediaColor(color, ColorRepresentationType.HEX); },
|
||||
#pragma warning disable CA1304 // Specify CultureInfo
|
||||
Convert = (Color color) => { return ColorRepresentationHelper.GetStringRepresentationFromMediaColor(color, ColorRepresentationType.HEX).ToLower(); },
|
||||
#pragma warning restore CA1304 // Specify CultureInfo
|
||||
});
|
||||
|
||||
_allColorRepresentations.Add(
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace Microsoft.ColorPicker.UnitTests
|
||||
{
|
||||
[TestMethod]
|
||||
[DataRow(ColorRepresentationType.CMYK, "cmyk(0%, 0%, 0%, 100%)")]
|
||||
[DataRow(ColorRepresentationType.HEX, "#000000")]
|
||||
[DataRow(ColorRepresentationType.HEX, "000000")]
|
||||
[DataRow(ColorRepresentationType.NCol, "R0, 0%, 100%")]
|
||||
[DataRow(ColorRepresentationType.HSB, "hsb(0, 0%, 0%)")]
|
||||
[DataRow(ColorRepresentationType.HSI, "hsi(0, 0%, 0%)")]
|
||||
|
||||
@@ -277,7 +277,7 @@ namespace Microsoft.PowerToys.Run.Plugin.System.Properties {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Use localized system commands instead of english ones.
|
||||
/// Looks up a localized string similar to Use localized system commands instead of English ones.
|
||||
/// </summary>
|
||||
internal static string Use_localized_system_commands {
|
||||
get {
|
||||
|
||||
@@ -213,6 +213,6 @@
|
||||
<comment>This should align to the action in Windows of a making your computer go to sleep.</comment>
|
||||
</data>
|
||||
<data name="Use_localized_system_commands" xml:space="preserve">
|
||||
<value>Use localized system commands instead of english ones</value>
|
||||
<value>Use localized system commands instead of English ones</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -180,11 +180,7 @@ void PowerPreviewModule::apply_settings(const PowerToysSettings::PowerToyValues&
|
||||
{
|
||||
const bool isElevated = is_process_elevated(false);
|
||||
bool notifyShell = false;
|
||||
if (!isElevated)
|
||||
{
|
||||
show_update_warning_message();
|
||||
return;
|
||||
}
|
||||
bool updatesNeeded = false;
|
||||
|
||||
for (auto& fileExplorerModule : m_fileExplorerModules)
|
||||
{
|
||||
@@ -195,6 +191,11 @@ void PowerPreviewModule::apply_settings(const PowerToysSettings::PowerToyValues&
|
||||
{
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Mark that updates were to the registry were needed
|
||||
updatesNeeded = true;
|
||||
}
|
||||
|
||||
// (Un)Apply registry changes depending on the new setting value
|
||||
const bool updated = *toggle ? fileExplorerModule.registryChanges.apply() : fileExplorerModule.registryChanges.unApply();
|
||||
@@ -209,6 +210,10 @@ void PowerPreviewModule::apply_settings(const PowerToysSettings::PowerToyValues&
|
||||
Trace::PowerPreviewSettingsUpdateFailed(fileExplorerModule.settingName.c_str(), !*toggle, *toggle, true);
|
||||
}
|
||||
}
|
||||
if (!isElevated && updatesNeeded)
|
||||
{
|
||||
show_update_warning_message();
|
||||
}
|
||||
if (notifyShell)
|
||||
{
|
||||
SHChangeNotify(SHCNE_ASSOCCHANGED, SHCNF_IDLIST, NULL, NULL);
|
||||
|
||||
@@ -45,7 +45,7 @@ namespace Microsoft.PowerToys.Settings.UI.Library.ViewModels
|
||||
SelectableColorRepresentations = new Dictionary<ColorRepresentationType, string>
|
||||
{
|
||||
{ ColorRepresentationType.CMYK, "CMYK - cmyk(100%, 50%, 75%, 0%)" },
|
||||
{ ColorRepresentationType.HEX, "HEX - #FFAA00" },
|
||||
{ ColorRepresentationType.HEX, "HEX - ffaa00" },
|
||||
{ ColorRepresentationType.HSB, "HSB - hsb(100, 50%, 75%)" },
|
||||
{ ColorRepresentationType.HSI, "HSI - hsi(100, 50%, 75%)" },
|
||||
{ ColorRepresentationType.HSL, "HSL - hsl(100, 50%, 75%)" },
|
||||
@@ -199,7 +199,7 @@ namespace Microsoft.PowerToys.Settings.UI.Library.ViewModels
|
||||
var cielabFormatName = ColorRepresentationType.CIELAB.ToString();
|
||||
var ciexyzFormatName = ColorRepresentationType.CIEXYZ.ToString();
|
||||
|
||||
formatsUnordered.Add(new ColorFormatModel(hexFormatName, "#EF68FF", visibleFormats.ContainsKey(hexFormatName) && visibleFormats[hexFormatName]));
|
||||
formatsUnordered.Add(new ColorFormatModel(hexFormatName, "ef68ff", visibleFormats.ContainsKey(hexFormatName) && visibleFormats[hexFormatName]));
|
||||
formatsUnordered.Add(new ColorFormatModel(rgbFormatName, "rgb(239, 104, 255)", visibleFormats.ContainsKey(rgbFormatName) && visibleFormats[rgbFormatName]));
|
||||
formatsUnordered.Add(new ColorFormatModel(hslFormatName, "hsl(294, 100%, 70%)", visibleFormats.ContainsKey(hslFormatName) && visibleFormats[hslFormatName]));
|
||||
formatsUnordered.Add(new ColorFormatModel(hsvFormatName, "hsv(294, 59%, 100%)", visibleFormats.ContainsKey(hsvFormatName) && visibleFormats[hsvFormatName]));
|
||||
|
||||
@@ -314,7 +314,7 @@
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PRIResource Include="Strings\en-us\Resources.resw" />
|
||||
<PRIResource Include="Strings\*\Resources.resw" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Page Include="Controls\ColorPickerButton.xaml">
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
using Microsoft.PowerToys.Settings.UI.Library;
|
||||
using Microsoft.PowerToys.Settings.UI.OOBE.Enums;
|
||||
using Microsoft.PowerToys.Settings.UI.OOBE.ViewModel;
|
||||
using Microsoft.PowerToys.Settings.UI.Views;
|
||||
using Windows.UI.Xaml.Controls;
|
||||
using Windows.UI.Xaml.Navigation;
|
||||
|
||||
@@ -26,6 +27,11 @@ namespace Microsoft.PowerToys.Settings.UI.OOBE.Views
|
||||
|
||||
private void SettingsLaunchButton_Click(object sender, Windows.UI.Xaml.RoutedEventArgs e)
|
||||
{
|
||||
if (OobeShellPage.OpenMainWindowCallback != null)
|
||||
{
|
||||
OobeShellPage.OpenMainWindowCallback(typeof(VideoConferencePage));
|
||||
}
|
||||
|
||||
ViewModel.LogOpeningSettingsEvent();
|
||||
}
|
||||
|
||||
|
||||
@@ -45,13 +45,10 @@
|
||||
x:Uid="ImagesSizesListView"
|
||||
ItemsSource="{x:Bind ViewModel.Sizes, Mode=TwoWay}"
|
||||
SelectionMode="None"
|
||||
ScrollViewer.HorizontalScrollMode="Enabled"
|
||||
ScrollViewer.HorizontalScrollBarVisibility="Auto"
|
||||
ScrollViewer.IsHorizontalRailEnabled="True"
|
||||
ContainerContentChanging="ImagesSizesListView_ContainerContentChanging">
|
||||
<ListView.ItemTemplate>
|
||||
<DataTemplate x:Name="SingleLineDataTemplate" x:DataType="models:ImageSize">
|
||||
<Grid AutomationProperties.Name="{x:Bind Name, Mode=OneWay}"
|
||||
<Grid AutomationProperties.Name="{x:Bind Name, Mode=OneWay}"
|
||||
HorizontalAlignment="Stretch"
|
||||
Background="{ThemeResource CardBackgroundBrush}"
|
||||
BorderThickness="{ThemeResource CardBorderThickness}"
|
||||
@@ -59,12 +56,10 @@
|
||||
CornerRadius="{ThemeResource ControlCornerRadius}"
|
||||
Padding="0,0,16,0"
|
||||
MinHeight="68">
|
||||
|
||||
|
||||
<Grid.ColumnDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="56" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="52" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<StackPanel Orientation="Vertical" VerticalAlignment="Center" Grid.Column="1" Margin="0,0,16,0">
|
||||
|
||||
Reference in New Issue
Block a user