Skip to content

Commit d5feabe

Browse files
committed
Based on QPV v3.1.2
1 parent 91c6291 commit d5feabe

12 files changed

+22
-7
lines changed

.vs/QuickLibrary/v16/.suo

-2 KB
Binary file not shown.

QuickLibrary/NativeMan.cs

+11
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,14 @@ public enum ScrollBarDirection
7979
SB_BOTH = 3
8080
}
8181

82+
public enum DPI_AWARENESS_CONTEXT
83+
{
84+
DPI_AWARENESS_CONTEXT_UNAWARE = 16,
85+
DPI_AWARENESS_CONTEXT_SYSTEM_AWARE = 17,
86+
DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE = 18,
87+
DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2 = 34
88+
}
89+
8290
// STRUCTURES
8391

8492
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)]
@@ -140,6 +148,9 @@ public struct SHFILEOPSTRUCT
140148

141149
// USER32 METHODS
142150

151+
[DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Unicode)]
152+
public static extern bool SetProcessDpiAwarenessContext(DPI_AWARENESS_CONTEXT dpiFlag);
153+
143154
[DllImport("user32.dll")]
144155
public static extern bool ShowScrollBar(IntPtr hWnd, ScrollBarDirection wBar, bool bShow);
145156

QuickLibrary/Properties/AssemblyInfo.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,6 @@
3232
// You can specify all the values or you can default the Build and Revision Numbers
3333
// by using the '*' as shown below:
3434
// [assembly: AssemblyVersion("1.0.*")]
35-
[assembly: AssemblyVersion("2.5.7")]
36-
[assembly: AssemblyFileVersion("2.5.7")]
35+
[assembly: AssemblyVersion("2.5.8")]
36+
[assembly: AssemblyFileVersion("2.5.8")]
3737
[assembly: NeutralResourcesLanguage("en")]

QuickLibrary/QlibContextMenuStrip.cs

+4
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ public class QlibContextMenuStrip : ContextMenuStrip
4444
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never)]
4545
public new Padding Padding { get { return base.Padding; } set { } }
4646

47+
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never)]
48+
public new bool UseWaitCursor { get { return base.UseWaitCursor; } set { } }
49+
4750
#endregion
4851

4952
#region PUBLIC PROPS
@@ -71,6 +74,7 @@ public QlibContextMenuStrip(IContainer components) : base(components)
7174
base.AllowDrop = false;
7275
base.AutoSize = true;
7376
base.Padding = new Padding(32, 2, 2, 2);
77+
base.UseWaitCursor = false;
7478
}
7579

7680
#endregion

QuickLibrary/QlibFixedForm.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ protected override void OnLoad(EventArgs e)
205205

206206
protected override void OnHandleCreated(EventArgs e)
207207
{
208-
ThemeMan.EnableDarkTitlebar(Handle, DarkMode);
208+
ThemeMan.ApplyDarkTitlebar(Handle, DarkMode);
209209
(new DropShadow()).ApplyShadows(this);
210210
base.OnHandleCreated(e);
211211
}

QuickLibrary/QlibNumeric.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -204,8 +204,8 @@ private void QlibNumericBox_GotFocus(object sender, EventArgs e)
204204
private void QlibNumericBox_SizeChanged(object sender, EventArgs e)
205205
{
206206
numeric.Size = new Size(Size.Width - 14, numeric.Size.Height);
207-
upBtn.Location = new Point(Size.Width - 21, 0);
208-
downBtn.Location = new Point(Size.Width - 21, 16);
207+
upBtn.Location = new Point(Size.Width - upBtn.Width, 0);
208+
downBtn.Location = new Point(Size.Width - downBtn.Width, 16);
209209
}
210210

211211
internal class InternalNumericUpDown : NumericUpDown

QuickLibrary/ThemeMan.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ private struct WindowCompositionAttribData
7777
[DllImport("user32.dll")]
7878
private static extern bool SetWindowCompositionAttribute(IntPtr hwnd, ref WindowCompositionAttribData data);
7979

80-
public static void EnableDarkTitlebar(IntPtr handle, bool dark)
80+
public static void ApplyDarkTitlebar(IntPtr handle, bool dark)
8181
{
8282
AllowDarkModeForWindow(handle, dark);
8383

@@ -95,7 +95,7 @@ public static void EnableDarkTitlebar(IntPtr handle, bool dark)
9595
Marshal.FreeHGlobal(dataPtr);
9696
}
9797

98-
public static void allowDarkModeForApp(bool dark)
98+
public static void AllowAppDarkMode(bool dark)
9999
{
100100
AllowDarkModeForApp(dark);
101101
}
512 Bytes
Binary file not shown.
2 KB
Binary file not shown.
Binary file not shown.
512 Bytes
Binary file not shown.
2 KB
Binary file not shown.

0 commit comments

Comments
 (0)