Commit Graph

662 Commits

Author SHA1 Message Date
Yuhang Zhao fca63dbf54 Minor improvement
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2021-04-28 11:39:51 +08:00
Yuhang Zhao d12198a7bc Update
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2021-04-04 12:09:34 +08:00
Yuhang Zhao cdb7b87eb4 Remove acrylic related things
They'll be moved to a separate repo instead

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2021-04-02 12:02:46 +08:00
Yuhang Zhao 97d9009500 Utils: Win32: Fix API usage
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2021-04-02 09:06:32 +08:00
Yuhang Zhao 95d72997ed Update comment
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2021-04-01 09:56:27 +08:00
Yuhang Zhao ef34a7c699 Minor fixes
1. Fix MainWindow example issue
2. Add a comment about the inverted argument
3. Fix some memory leaks

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2021-04-01 09:52:38 +08:00
Yuhang Zhao 16f7d78035 Win32: Fix the flickering issue when resizing
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2021-03-31 20:35:21 +08:00
Yuhang Zhao f188c0f88d Examples: Quick: lower required version
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2021-03-30 11:03:16 +08:00
Yuhang Zhao 18d883b96a Minor tweaks
Amends commit 0759f7f010

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2021-03-26 17:35:33 +08:00
Julien 0759f7f010
NEW: QMainWindow example (#50)
* WIP: qmainwindow example

* NEW: option to disable acrylic on QMainWindow

* IMP: accept standard QMainWindow parameters

* NEW: enable acrylic in QMainWindow example

* IMP: qmainwindow sets acrylic outside constructor

* IMP: center windowTitle

* cleanup

* IMP: move setContentMargin in QtAcrylicMainWIndow class

* more cleanup

* small cleanup

* improvement copied from qtacrylicwidget

* minor improvement

* always connect needRepaint

* close button thickness is now similar to native windows buttons

* add context menu on left icon

* simpler context menu implementation

* IMP: use displaySystemMenu from Utilities

Co-authored-by: Julien Maille <julien.maille@data-pixel.com>
2021-03-26 16:53:32 +08:00
Yuhang Zhao d4a5239d26 Minor tweaks
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2021-03-26 09:27:43 +08:00
Yuhang Zhao 4cba3a4dd4 Minor improvements
1. Update margins when maximized for the examples
2. Prepare for the UNIX version of utility functions

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2021-03-25 15:12:47 +08:00
Yuhang Zhao 3e09c0f9b8 Example: Widget: Fix build below 5.14
Fixes: #54

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2021-03-24 11:15:58 +08:00
Yuhang Zhao 399b1cef1c Minor tweaks
1. Fix compilation error for QMake.
2. Fix some warning messages are in the wrong place.
3. Fix the IActiveDesktop can't get wallpaper.
4. Other minor tweaks.

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2021-03-22 09:38:48 +08:00
Yuhang Zhao 43d0e5f95d Minor tweaks
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2021-03-21 20:38:33 +08:00
Yuhang Zhao 85edd9abbd Minor tweaks
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2021-03-21 15:47:18 +08:00
Yuhang Zhao 8ebf9cfc58 Disable acrylic blur by default
If the user want to use it, the user should enable it.

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2021-03-21 11:13:09 +08:00
Yuhang Zhao 39232babdd Add a warning message
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2021-03-21 10:43:22 +08:00
Yuhang Zhao 42ee3f8a91 Minor improvements
1. QScopedPointer's get() function was introduced in Qt 5.11, too new, don't use it, use data() instead. They are the same.
2. Fixed a typo.
3. Use QGuiApplication::isRightToLeft() to simplify the code.

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2021-03-20 11:19:10 +08:00
Yuhang Zhao b62dabcc68 Minor tweaks
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2021-03-19 15:44:55 +08:00
Yuhang Zhao 0ad045ea74 Update README.md
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2021-03-19 10:20:58 +08:00
Yuhang Zhao 356c11960d Minor tweaks
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2021-03-19 10:19:47 +08:00
Yuhang Zhao 0f699161cd Simplify code
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2021-03-18 15:58:42 +08:00
Yuhang Zhao 86dcad3f3a Simplify code
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2021-03-18 10:42:08 +08:00
Yuhang Zhao 23d53fef87 Fix inverted logic
Amends commit 6adbefa814

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2021-03-18 10:17:01 +08:00
Yuhang Zhao 6bc6ed63cc Minor tweaks
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2021-03-18 09:48:55 +08:00
Yuhang Zhao 6adbefa814 Simplify code
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2021-03-18 09:12:19 +08:00
Yuhang Zhao 2823cbe34a Minor tweaks
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2021-03-18 09:06:12 +08:00
Yuhang Zhao 0a5e5aa67b Minor improvement
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2021-03-17 22:03:10 +08:00
Yuhang Zhao 4b66c244fc Minor improvement
We could return in paintBackground(), so we may miss to call restore()

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2021-03-17 21:23:56 +08:00
Yuhang Zhao 28c64a3725 Minor tweaks
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2021-03-16 20:07:27 +08:00
Yuhang Zhao ecd1a2312c Remove useless code
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2021-03-16 09:22:19 +08:00
Yuhang Zhao 9cb0ff7073 Remove unneeded include
Amends commit ae603926fc

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2021-03-15 20:03:12 +08:00
Yuhang Zhao a8228cf422
Merge pull request #49 from JulienMaille/patch-1
simple fix without the 500ms lag
2021-03-15 19:58:22 +08:00
Julien ae603926fc
Update framelesswindowsmanager.cpp
simple fix without the 500ms lag
2021-03-15 12:04:48 +01:00
Yuhang Zhao 0d7f3dba7e Win32: fix the multi-monitor issue again
This solution have no run-time overhead.

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2021-03-13 11:07:49 +08:00
Yuhang Zhao d4550b63bd Minor tweaks
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2021-03-12 09:07:48 +08:00
Yuhang Zhao be2a2a48a2 Do not leak connections
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2021-03-12 09:01:49 +08:00
Yuhang Zhao c19a4f7f74 Minor tweaks
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2021-03-11 21:07:06 +08:00
Yuhang Zhao bd05c66e23 Switch to traditional blur if the user disabled extra processing
Amends commit 070e8edc52

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2021-03-11 10:22:20 +08:00
Yuhang Zhao 070e8edc52 Add the ability to disable extra processing
If the user want to get full control of the Acrylic color.

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2021-03-11 10:08:13 +08:00
Yuhang Zhao 76fd19211d Win32: Utilities: Add more enums learned from other repos
We may not need it, but we record it here in case it become usable in the future.

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2021-03-11 09:43:19 +08:00
Yuhang Zhao b9ad74b81c Win32: Code tidies
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2021-03-11 09:38:50 +08:00
Yuhang Zhao 21774f9fbc Disable dynamic switching of Acrylic blur and wallpaper blur
After some testing, it's found that it's not reliable.
Maybe we should use another windows message to do this?
To be investigated.

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2021-03-11 09:20:09 +08:00
Yuhang Zhao c9be4858ec Use the official Acrylic blur whenever possible
And switch back to the wallpaper blur when the window is being moved or resized.

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2021-03-10 17:28:48 +08:00
Yuhang Zhao 54798e2f73 Update README
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2021-03-10 14:32:45 +08:00
Yuhang Zhao a183a6d4a1 Make the wallpaper blur dynamic update
The window background will update dynamically once
it's being moved.

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2021-03-10 14:18:08 +08:00
Yuhang Zhao 0931b73671 Some refactor
Rename some functions to make it more clear.

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2021-03-10 10:05:23 +08:00
Yuhang Zhao bc9edaf78a Minor tweaks
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2021-03-09 20:24:51 +08:00
Yuhang Zhao b51c6ce564 Use new screenshot
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2021-03-09 14:06:36 +08:00