Yuhang Zhao
86269c82b3
Avoid name conflicts.
...
They can be compiled but to reduce confusion, let change their names.
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2020-05-13 13:19:27 +08:00
Yuhang Zhao
921b87ab2e
Minor improvements.
...
Use global screen coordinates instead of local window coordinates to get more reliable hit test result.
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2020-05-13 12:56:03 +08:00
Yuhang Zhao
2ca6a90ae2
Add a Qt Quick helper class.
...
It's much easier to use it in Qt Quick now.
Fixes : #11
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2020-05-12 20:53:53 +08:00
Yuhang Zhao
9a70ebaaa1
Update Qt Quick example.
...
Fixes : #11
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2020-05-11 22:40:13 +08:00
Yuhang Zhao
2df22bdb64
Fix QWindow disappear bug of Qt Quick.
...
Restoring window styles to default will break Qt Quick applications.
The QWindow will disappear once we do it.
Qt Widgets applications are not affected.
Don't know why currently.
Disable it by default because it's not something we must do.
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2020-05-11 22:05:43 +08:00
Yuhang Zhao
48ff3280b1
UNIX helper: Use QSize instead of QRect
...
We only need the size, not the geometry.
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2020-05-11 12:50:07 +08:00
Yuhang Zhao
0bb929bd95
Add references in README_unix.md
...
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2020-05-11 09:11:35 +08:00
Yuhang Zhao
2a0a627b36
Add README_unix.md
...
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2020-05-11 09:05:13 +08:00
Yuhang Zhao
8762fd64da
Fix wrong link in README.md
...
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2020-05-11 08:26:13 +08:00
Yuhang Zhao
a34834c3f7
Fix bugs in UNIX helper.
...
Found during using it in a real project.
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2020-05-10 20:24:11 +08:00
Yuhang Zhao
f8cb5cf234
Update icons.
...
Use pt instead of px.
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2020-05-10 15:56:57 +08:00
Yuhang Zhao
36609f1715
Fix app crash.
...
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2020-05-09 14:19:48 +08:00
Yuhang Zhao
57d2667c5e
Update.
...
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2020-05-09 13:13:42 +08:00
Yuhang Zhao
136b865853
Minor improvements.
...
1. Use const more.
2. Add some missing ResolveWin32APIs() call
3. Move updateQtFrame to WinNativeEventFilter
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2020-05-09 12:58:01 +08:00
Yuhang Zhao
ae62a8fb49
Minor improvements.
...
Move the moveWindowToDesktopCenter function to FramelessHelper.
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2020-05-09 11:33:20 +08:00
Yuhang Zhao
ed6267461c
Minor improvements.
...
The ignore and draggable areas/objects are limited in the title bar area only.
There's no need to judge them outside the title bar area.
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2020-05-09 09:25:08 +08:00
Yuhang Zhao
c4fe56345f
Fix compilation error introduced by previous commit.
...
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2020-05-08 21:37:36 +08:00
Yuhang Zhao
0fe297b5e4
Add UNIX helper back.
...
With some improvements.
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2020-05-08 21:07:44 +08:00
Yuhang Zhao
4cbe603832
Minor improvements.
...
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2020-05-08 19:59:03 +08:00
Yuhang Zhao
53700554d2
Fix app crash.
...
Use pointers.
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2020-05-08 18:13:43 +08:00
Yuhang Zhao
43d83bf156
Remove useless header file.
...
It has been included already, by Qt's own header files, or whatever.
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2020-05-08 17:26:01 +08:00
Yuhang Zhao
45790ee099
Fix old Qt build again.
...
qAsConst was introduced in Qt 5.7
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2020-05-08 17:16:17 +08:00
Yuhang Zhao
e01d8a0183
README: Add requirements.
...
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2020-05-08 16:59:05 +08:00
Yuhang Zhao
b6865f7642
Fix old Qt builds.
...
Now should support Qt 5.6
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2020-05-08 16:37:15 +08:00
Yuhang Zhao
a04d1012c7
Fix non-Quick builds.
...
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2020-05-08 15:54:47 +08:00
Yuhang Zhao
09a2165e1a
Update README.md
...
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2020-05-08 14:56:38 +08:00
Yuhang Zhao
ac0e229312
Update screenshot pictures.
...
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2020-05-08 14:39:46 +08:00
Yuhang Zhao
7753161f9f
Add Qt Quick example.
...
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2020-05-08 14:19:41 +08:00
Yuhang Zhao
0b84006b14
Minor tweaks.
...
Maybe fix one issue of #9
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2020-05-07 17:45:22 +08:00
Yuhang Zhao
f3d5f6a0ce
Simplify the code a bit.
...
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2020-05-06 22:26:57 +08:00
Yuhang Zhao
f7d9e361f4
Add screenshot.
...
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2020-05-04 21:21:56 +08:00
Yuhang Zhao
91b4b676d1
Update README.md
...
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2020-05-04 13:04:28 +08:00
Yuhang Zhao
a49a134f24
Minor improvements.
...
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2020-05-04 09:01:39 +08:00
Yuhang Zhao
a3d4df1ebf
Minor improvement.
...
Fixes : #7
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2020-05-03 21:20:24 +08:00
Yuhang Zhao
092f7147ab
Fix typo in some comments.
...
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2020-05-03 21:10:03 +08:00
Yuhang Zhao
49c7b52a4e
Minor improvements.
...
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2020-05-03 21:05:01 +08:00
Yuhang Zhao
123c36c374
Add a new way to set ignore areas.
...
Fixes : #6
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2020-05-03 19:24:40 +08:00
Yuhang Zhao
60526b7be1
Update README.md
...
Add instructions about how to set ignore areas and etc.
Fixes : #5
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2020-05-02 19:00:07 +08:00
Yuhang Zhao
201a170948
Minor tweaks.
...
1. Use Qt functions instead of STL functions.
2. Add a comment explain the XXPtr functions.
3. Remove D2D usage. Using GetDeviceCaps is fine.
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2020-05-02 11:00:01 +08:00
Yuhang Zhao
5335114258
Add more comments.
...
These are important memo, it's better to write them in our code.
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2020-05-02 10:45:52 +08:00
Yuhang Zhao
63315acf75
Minor improvements.
...
1. Add more comments.
2. Add a function to change window geometry through Win32 API/
3. Add a function to move the window to the center of the desktop.
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2020-05-01 19:37:57 +08:00
Yuhang Zhao
a4423334ec
Add some comments.
...
It's a good memo since some developers may don't know these things.
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2020-04-30 15:21:13 +08:00
Yuhang Zhao
74d7dfad43
Fix flashing issue when maximizing.
...
The window will flash when maximizing and restoring (the whole will become totally transparent at that moment, and after it has been maximized or restored, it will become not transparent again).
Caused by passing negative values to DwmExtendFrameIntoClientArea.
Fixes : #4
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2020-04-29 22:02:25 +08:00
Yuhang Zhao
ff555585c2
Update comments.
...
Make it more clearly.
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2020-04-29 15:03:47 +08:00
Yuhang Zhao
b94e534906
Minor improvement.
...
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2020-04-27 10:49:54 +08:00
Yuhang Zhao
21a563a460
Minor tweaks.
...
Amends commit f0ef569b08
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2020-04-27 08:52:07 +08:00
Yuhang Zhao
f0ef569b08
Revert back to the original solution.
...
We will use the original solution in this branch.
The new Windows Terminal solution will be in another branch.
Partially reverts commit 01707907cd
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2020-04-26 21:40:37 +08:00
Yuhang Zhao
01707907cd
WIP. Adapt to Windows Terminal style.
...
Don't remove the window frame totally, only remove the title bar instead
(including the top border).
We can resize outside our window just like any other normal window in
this way. And many strange problems caused by the removal of window
frame are gone such as background flicker.
However, we will need to paint the top frame border ourself. Otherwise
the window doesn't look very good.
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2020-04-24 13:02:13 +08:00
Yuhang Zhao
f77e1adf61
Update.
...
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2020-04-22 15:27:52 +08:00
Yuhang Zhao
0239c298b3
Fix wrong condition introduced in last commit.
...
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2020-04-22 11:48:23 +08:00