Skip to content

Commit 5e1f600

Browse files
authored
Merge pull request #267 from unchihugo/update
Change Acrylic window background opacity
2 parents 46d8d16 + afe80d3 commit 5e1f600

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

‎FluentFlyoutWPF/Classes/Utils/StringWidth.cs‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,16 @@ internal static class StringWidth
1414
/// </summary>
1515
/// <param name="text">Text to measure</param>
1616
/// <param name="fontWeight">Weight of the font. Defaults to 500 (Medium)</param>
17+
/// <param name="fontSize">Size of the font in device-independent units (pixels). Defaults to 14.</param>
1718
/// <returns>The width of the specified text, in device-independent units (pixels), including a small padding.</returns>
18-
public static double GetStringWidth(string text, int fontWeight = 500)
19+
public static double GetStringWidth(string text, int fontWeight = 500, int fontSize = 14)
1920
{
2021
var formattedText = new FormattedText(
2122
text,
2223
System.Globalization.CultureInfo.CurrentCulture,
2324
FlowDirection.LeftToRight,
2425
fontWeight == 400 ? normalTypeface : mediumTypeface,
25-
14,
26+
fontSize,
2627
Brushes.Black,
2728
null,
2829
1);

‎FluentFlyoutWPF/Classes/WindowBlurHelper.cs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ public static class WindowBlurHelper
4747
/// </summary>
4848
/// <param name="window">The window to apply blur to</param>
4949
/// <param name="blurOpacity">Opacity of the blur (0-255)</param>
50-
/// <param name="blurBackgroundColor">Background color in BGR format (default: 0x990000)</param>
51-
public static void EnableBlur(Window window, uint blurOpacity = 150, uint blurBackgroundColor = 0x000000)
50+
/// <param name="blurBackgroundColor">Background color in BGR format (default: 0x000000)</param>
51+
public static void EnableBlur(Window window, uint blurOpacity = 175, uint blurBackgroundColor = 0x000000)
5252
{
5353
var windowHelper = new WindowInteropHelper(window);
5454

0 commit comments

Comments
 (0)