Skip to content

Commit edce38a

Browse files
Revert "Address review feedback."
This reverts commit e244aa1.
1 parent e244aa1 commit edce38a

File tree

4 files changed

+25
-30
lines changed

4 files changed

+25
-30
lines changed

src/System.Windows.Forms/System/Windows/Forms/Application.cs

Lines changed: 18 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@ namespace System.Windows.Forms;
2222
public sealed partial class Application
2323
{
2424
/// <summary>
25-
/// Hash table for our event list.
25+
/// Hash table for our event list
2626
/// </summary>
2727
private static EventHandlerList? s_eventHandlers;
2828
private static Font? s_defaultFont;
2929
/// <summary>
30-
/// Scaled version of non-system <see cref="s_defaultFont"/>.
30+
/// Scaled version of non system <see cref="s_defaultFont"/>.
3131
/// </summary>
3232
private static Font? s_defaultFontScaled;
3333
private static string? s_startupPath;
@@ -53,7 +53,7 @@ public sealed partial class Application
5353
private const int SystemDarkModeDisabled = 1;
5454

5555
/// <summary>
56-
/// Events the user can hook into.
56+
/// Events the user can hook into
5757
/// </summary>
5858
private static readonly object s_eventApplicationExit = new();
5959
private static readonly object s_eventThreadExit = new();
@@ -68,16 +68,16 @@ public sealed partial class Application
6868
private static bool s_parkingWindowCreated;
6969

7070
/// <summary>
71-
/// This class is static; there is no need to ever create it.
71+
/// This class is static, there is no need to ever create it.
7272
/// </summary>
7373
private Application()
7474
{
7575
}
7676

7777
/// <summary>
7878
/// Determines if the caller should be allowed to quit the application. This will return false,
79-
/// for example, if being called from a Windows Forms control being hosted within a web browser. The
80-
/// Windows Forms control should not attempt to quit the application.
79+
/// for example, if being called from a windows forms control being hosted within a web browser. The
80+
/// windows forms control should not attempt to quit the application.
8181
/// </summary>
8282
public static bool AllowQuit => ThreadContext.GetAllowQuit();
8383

@@ -276,7 +276,7 @@ internal static bool CustomThreadExceptionHandlerAttached
276276
/// </para>
277277
/// <para>
278278
/// Note that the dark color mode is only available from Windows 11 on or later versions. If the system
279-
/// is set to a accessibility contrast theme, the dark mode is not available.
279+
/// is set to a high contrast mode, the dark mode is not available.
280280
/// </para>
281281
/// <para>
282282
/// <b>Note for Visual Basic:</b> If you are using the Visual Basic Application Framework, you should set the
@@ -352,15 +352,14 @@ static void NotifySystemEventsOfColorChange()
352352
/// <remarks>
353353
/// <para>
354354
/// The color setting is determined based on the operating system version and its system settings.
355-
/// It returns <see cref="SystemColorMode.Dark"/> if dark mode is enabled in the system settings,
356-
/// or <see cref="SystemColorMode.Classic"/> if the color mode is set to the light, standard color setting.
355+
/// It returns <see cref="SystemColorMode.Dark"/> if the dark mode is enabled in the system settings,
356+
/// <see cref="SystemColorMode.Classic"/> if the color mode equals the light, standard color setting.
357357
/// </para>
358358
/// <para>
359-
/// <see cref="SystemColorMode"/> is supported on Windows 11 or later versions.
359+
/// SystemColorMode is supported on Windows 11 or later versions.
360360
/// </para>
361361
/// <para>
362-
/// <see cref="SystemColorMode"/> is not supported if a Windows OS high contrast theme has been
363-
/// enabled in the system settings.
362+
/// SystemColorModes is not supported, if the Windows OS <c>High Contrast Mode</c> has been enabled in the system settings.
364363
/// </para>
365364
/// </remarks>
366365
[Experimental(DiagnosticIDs.ExperimentalDarkMode, UrlFormat = DiagnosticIDs.UrlFormat)]
@@ -399,7 +398,7 @@ private static int GetSystemColorModeInternal()
399398

400399
/// <summary>
401400
/// Gets a value indicating whether the application is running in a dark system color context.
402-
/// Note: With a accessibility contrast theme selected in the OS, this will always return <see langword="false"/>.
401+
/// Note: In a high contrast mode, this will always return <see langword="false"/>.
403402
/// </summary>
404403
[Experimental(DiagnosticIDs.ExperimentalDarkMode, UrlFormat = DiagnosticIDs.UrlFormat)]
405404
public static bool IsDarkModeEnabled =>
@@ -915,7 +914,7 @@ internal static void DoEventsModal()
915914

916915
/// <summary>
917916
/// Enables visual styles for all subsequent <see cref="Run()"/> and <see cref="Control.CreateHandle"/> calls.
918-
/// Uses the default theming manifest file shipped with the redistributable package.
917+
/// Uses the default theming manifest file shipped with the redist.
919918
/// </summary>
920919
[UnconditionalSuppressMessage("SingleFile", "IL3002", Justification = "Single-file case is handled")]
921920
public static void EnableVisualStyles()
@@ -1329,10 +1328,6 @@ internal static void RunDialog(Form form)
13291328
/// This switch determines the default text rendering engine to use by some controls that support
13301329
/// switching rendering engine.
13311330
/// </summary>
1332-
/// <param name="defaultValue">The default value to use for compatible text rendering.</param>
1333-
/// <exception cref="InvalidOperationException">
1334-
/// Thrown if any window handle has already been created in the application.
1335-
/// </exception>
13361331
public static void SetCompatibleTextRenderingDefault(bool defaultValue)
13371332
{
13381333
if (NativeWindow.AnyHandleCreated)
@@ -1344,7 +1339,7 @@ public static void SetCompatibleTextRenderingDefault(bool defaultValue)
13441339
}
13451340

13461341
/// <summary>
1347-
/// Sets the default <see cref="Font"/> for the process.
1342+
/// Sets the default <see cref="Font"/> for process.
13481343
/// </summary>
13491344
/// <param name="font">The font to be used as a default across the application.</param>
13501345
/// <exception cref="ArgumentNullException"><paramref name="font"/> is <see langword="null"/>.</exception>
@@ -1353,11 +1348,11 @@ public static void SetCompatibleTextRenderingDefault(bool defaultValue)
13531348
/// </exception>
13541349
/// <remarks>
13551350
/// <para>
1356-
/// The system text scale factor will be applied to the font. For example, if the default font is set to "Calibri, 11f"
1357-
/// and the text scale factor is set to 150%, the resulting default font will be set to "Calibri, 16.5f".
1351+
/// The system text scale factor will be applied to the font, i.e. if the default font is set to "Calibri, 11f"
1352+
/// and the text scale factor is set to 150% the resulting default font will be set to "Calibri, 16.5f".
13581353
/// </para>
13591354
/// <para>
1360-
/// Users can adjust text scale with the "Make text bigger" slider on the Settings → Accessibility → Display screen.
1355+
/// Users can adjust text scale with the Make text bigger slider on the Settings -> Ease of Access -> Vision/Display screen.
13611356
/// </para>
13621357
/// </remarks>
13631358
/// <seealso href="https://docs.microsoft.com/windows/uwp/design/input/text-scaling">Windows Text scaling</seealso>
@@ -1373,7 +1368,7 @@ public static void SetDefaultFont(Font font)
13731368
}
13741369

13751370
/// <summary>
1376-
/// Scales <see cref="s_defaultFont"/> or <see cref="s_defaultFontScaled"/> if needed.
1371+
/// Scale <see cref="s_defaultFont"/> or <see cref="s_defaultFontScaled"/> if needed.
13771372
/// </summary>
13781373
internal static void ScaleDefaultFont()
13791374
{

src/System.Windows.Forms/System/Windows/Forms/Controls/Buttons/ButtonInternal/RadioButtonBaseAdapter.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,13 @@ protected void DrawCheckBackgroundFlat(PaintEventArgs e, Rectangle bounds, Color
6262

6363
if (!Control.Enabled)
6464
{
65-
// If we are not in contrast theme OR we opted into the legacy behavior
65+
// If we are not in HighContrast mode OR we opted into the legacy behavior
6666
if (!SystemInformation.HighContrast)
6767
{
6868
border = ControlPaint.ContrastControlDark;
6969
}
7070

71-
// Otherwise we are in a contrast theme
71+
// Otherwise we are in HighContrast mode
7272
field = SystemColors.Control;
7373
}
7474

src/System.Windows.Forms/System/Windows/Forms/Controls/PropertyGrid/PropertyGridInternal/CategoryGridEntry.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ public override void PaintLabel(
121121
Rectangle focusRect = new(indent, rect.Y, labelWidth + 3, rect.Height - 1);
122122
if (SystemInformation.HighContrast && !OwnerGrid.HasCustomLineColor)
123123
{
124-
// Line color is SystemColors.ControlDarkDark in a contrast theme scenario.
124+
// Line color is SystemColors.ControlDarkDark in high contrast mode.
125125
ControlPaint.DrawFocusRectangle(g, focusRect, SystemColors.ControlText, OwnerGrid.LineColor);
126126
}
127127
else

src/System.Windows.Forms/System/Windows/Forms/Controls/ToolStrips/ToolStripSystemRenderer.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -400,8 +400,8 @@ protected override void OnRenderImageMargin(ToolStripRenderEventArgs e)
400400
/// </summary>
401401
protected override void OnRenderButtonBackground(ToolStripItemRenderEventArgs e)
402402
{
403-
// If the user selected a contrast theme in the OS and a specific renderer-override is defined, use that.
404-
// For ToolStripSystemRenderer in a contrast theme, the RendererOverride property will be ToolStripHighContrastRenderer.
403+
// If system in high contrast mode and specific renderer override is defined, use that.
404+
// For ToolStripSystemRenderer in High Contrast mode the RendererOverride property will be ToolStripHighContrastRenderer.
405405
if (RendererOverride is not null)
406406
{
407407
base.OnRenderButtonBackground(e);
@@ -560,8 +560,8 @@ protected override void OnRenderToolStripStatusLabelBackground(ToolStripItemRend
560560
/// </summary>
561561
protected override void OnRenderSplitButtonBackground(ToolStripItemRenderEventArgs e)
562562
{
563-
// If the user selected a contrast theme in the OS and a specific renderer-override is defined, use that.
564-
// For ToolStripSystemRenderer in a contrast theme, the RendererOverride property will be ToolStripHighContrastRenderer.
563+
// If system in high contrast mode and specific renderer override is defined, use that.
564+
// For ToolStripSystemRenderer in High Contrast mode the RendererOverride property will be ToolStripHighContrastRenderer.
565565
if (RendererOverride is not null)
566566
{
567567
base.OnRenderSplitButtonBackground(e);

0 commit comments

Comments
 (0)