-
-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is it also possible to apply acrylic effect? #4
Comments
I was able to get acrylic working by enabling #Include "./GuiEnhancerKit.ahk"
; https://learn.microsoft.com/en-us/windows/win32/api/dwmapi/ne-dwmapi-dwmwindowattribute
DWMWA_USE_HOSTBACKDROPBRUSH := 16
DWMWA_SYSTEMBACKDROP_TYPE := 38
; https://learn.microsoft.com/en-us/windows/win32/api/dwmapi/ne-dwmapi-dwm_systembackdrop_type
DWMSBT_AUTO := 0
DWMSBT_NONE := 1
DWMSBT_MAINWINDOW := 2
DWMSBT_TRANSIENTWINDOW := 3
DWMSBT_TABBEDWINDOW := 4
ShowTestWindow() {
Win := GuiExt()
Win.SetFont("cWhite s16", "Segoe UI")
Win.SetDarkTitle() ; needed for dark window background apparently, even though there's no title bar
Win.SetDarkMenu() ; should be unnecessary in this simple example
Win.BackColor := 0x000000
; Sample content
Win.Add("Text", "x0 y0 w300 h200 Center +0x200", "Hello, world!")
; Close when pressing Escape
Win.OnEvent("Escape", (*) => Win.Destroy())
; Always on top makes it easy to preview the blur effect against different backgrounds.
Win.Opt("+AlwaysOnTop -SysMenu -Caption -Border +Owner")
; Seem to have to show the window before enabling the blur effect
Win.Show("w300 h200")
; Enables rounded corners.
; Doesn't seem to hide the border if the window is already shown, but `-Border` takes care of that.
Win.SetBorderless(6)
; Set blur-behind accent effect. (Supported starting with Windows 11 Build 22000.)
if (VerCompare(A_OSVersion, "10.0.22600") >= 0) {
Win.SetWindowAttribute(DWMWA_USE_HOSTBACKDROPBRUSH, true) ; required for DWMSBT_TRANSIENTWINDOW
Win.SetWindowAttribute(DWMWA_SYSTEMBACKDROP_TYPE, DWMSBT_TRANSIENTWINDOW)
}
}
ShowTestWindow() Notes:
|
@1j01 Wonderful, thank you very much! |
@H5820121 I don't know. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I would be very grateful if you could write, how you can apply for mygui an acrylic effect or other effects, Or you can't just Mica (Alt)?
Thank you!
The text was updated successfully, but these errors were encountered: