Commit Graph

827 Commits

Author SHA1 Message Date
Yuhang Zhao 3a0e6f081f titlebar: allow use alternative background
Set this property to true if you want to use your own background color/pixmap
instead of system's current accent color.

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-05-15 11:46:27 +08:00
Yuhang Zhao 1cd39fd7b2 quick: a little code simplification
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-05-14 10:02:42 +08:00
Yuhang Zhao 45b3657d7e minor tweaks
Doesn't seem to affect the final appearance

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-05-13 20:51:03 +08:00
Yuhang Zhao d13d74783f quick: simplify implementation
1. Merge the three system buttons into one class.
2. Fixed some color calculation errors of system button.
3. Removed some not used bundled resources.
4. Added function to retrieve runtime version of FramelessHelper.

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-05-13 17:33:01 +08:00
Yuhang Zhao 8042a78b8f various fixes and improvements
1. Make all demo applications be able to record and restore the previous window geometry.
2. Improve the robustness of the widgets and quick implementation.

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-05-13 14:19:50 +08:00
Julien 915e775d94
FIX: crash in isFixedSize when calling destructors (#131)
Fixes: #130

Co-authored-by: Julien Maille <julien.maille@data-pixel.com>
2022-05-13 11:05:11 +08:00
Yuhang Zhao 1a3d1c82a1 update readme
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-05-12 17:50:38 +08:00
Yuhang Zhao 1db02751d7 update readme
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-05-12 17:39:53 +08:00
Yuhang Zhao 5c3b8b70df general: fix the system button background color in various cases
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-05-12 17:25:10 +08:00
Yuhang Zhao 8cb24c61b3 general improvements
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-05-12 15:07:57 +08:00
Yuhang Zhao bebd20f01e win32: finish the fixed size fix
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-05-11 21:18:25 +08:00
Yuhang Zhao ab20f3433b remove useless code
And that also fixes the bug for Qt Quick applications

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-05-11 20:24:29 +08:00
Yuhang Zhao a1acc3e06f common: minor tweaks
Code simplification, format changes, etc ...

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-05-11 17:32:14 +08:00
Yuhang Zhao aad6957a52 win32: fix fixed size behavior
The code was from 2.0 and due to we changed solution in 2.1,
it needs to be tweaked accordingly but was forgotten.

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-05-11 11:04:03 +08:00
Yuhang Zhao 059013a338 update readme
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-05-09 14:32:21 +08:00
Yuhang Zhao ecef5bb9fd fix wrong discord link
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-05-09 11:51:09 +08:00
Yuhang Zhao 54496f9fe0 lower warning level for msvc
Bug reports from users indicate that /W4 causes many
warnings for MSVC 2019 and the warnings come from
private Qt headers so no way to fix them in FramelessHelper.

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-05-09 11:39:15 +08:00
Yuhang Zhao 66d77112ed win32: fix possible crash in some very rare cases
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-05-08 21:50:08 +08:00
Yuhang Zhao a10ac4e32d demos: simplify some code
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-05-08 18:24:09 +08:00
Yuhang Zhao c853cc63c6 re-fix wrong parameter for xcb
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-05-08 16:42:55 +08:00
Yuhang Zhao 053d6b104e centralize how we handle global options
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-05-08 16:09:00 +08:00
Yuhang Zhao 286811c9df expose private headers, someone may need
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-05-07 18:02:44 +08:00
Yuhang Zhao c936a7da80 minor tweaks
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-05-06 21:00:07 +08:00
Yuhang Zhao 2135d2f15f update docs
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-05-06 17:59:53 +08:00
Yuhang Zhao 196aeb1ce1 linux: minor fixes of the xcb usage
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-05-06 16:32:59 +08:00
Yuhang Zhao 4b136295a8 update docs
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-05-06 10:36:35 +08:00
Yuhang Zhao e7f434c5a4 demo: center window on first show
Looks better than before.

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-05-05 20:23:35 +08:00
Yuhang Zhao 1c6e02d81b code tidies, prepare for the 2.1 release
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-05-05 18:02:38 +08:00
Yuhang Zhao cfb0842726 win: make sure we can still compile this project using some old windows sdks
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-05-04 17:09:30 +08:00
Yuhang Zhao 9d71baffd1 remove the last piece of Qt internal classes
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-05-04 16:08:47 +08:00
Yuhang Zhao a97b1782ae redesign the title bar interface
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-05-04 14:50:11 +08:00
Yuhang Zhao 8ccbe2cf94 file rename, step 2
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-05-03 19:06:30 +08:00
Yuhang Zhao 6977db1e02 file rename, step 1
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-05-03 19:05:53 +08:00
Yuhang Zhao 81e736570f refactor widgets interface
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-05-03 19:02:39 +08:00
Yuhang Zhao 306ebfc717 Refactor the Quick implementation, interface is now simpler
Now we use attached properties instead, it make things simpler.

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-05-02 12:26:57 +08:00
Yuhang Zhao d6fa6a163e quick: fix build on Qt5
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-04-30 13:30:30 +08:00
Yuhang Zhao ff8252aaf4 Add initial snap layout implementation
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-04-30 12:47:51 +08:00
Yuhang Zhao fbe241f29e internal refactor
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-04-29 18:03:39 +08:00
Yuhang Zhao 16b7841bac update roadmap
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-04-29 10:36:50 +08:00
Yuhang Zhao 2f629a9e5b Quick: make the titleBarItem become a property
By making it a Q_PROPERTY we can use it more conveniently.

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-04-25 14:50:41 +08:00
Yuhang Zhao fd2b3f5e84 Linux: fix mouse release event not being sent due to wrong parameter
Also simplifies a little Windows implementation.

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-04-25 13:48:19 +08:00
Yuhang Zhao 3d7576e062 macOS: remove the system buttons, fix implementation
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-04-24 21:03:46 +08:00
Yuhang Zhao 3c0209c979 Linux: fix the mouse grab issue, for real
Port previous workaround from 1.x to 2.0

And some minor tweaks.

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-04-24 13:37:10 +08:00
Yuhang Zhao 2915d1f33a Widgets: move FramelessWidgetsHelper to source directory
It's pure implementation detail, so should not be publicly visible

Also fixed the crash of the QOpenGLWidget demo application.

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-04-24 11:33:05 +08:00
Yuhang Zhao a0a9b8d108 Final code of version 2.0.0!
Some minor issues are known to exist and they'll get fixed before 2.1 is officially released.

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-04-23 14:59:27 +08:00
Yuhang Zhao 8460995d7f quick module: minor improvements
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-04-22 15:49:00 +08:00
Yuhang Zhao 201f54e7a5 widgets module: fix two issues
1. The top border has a one pixel gap under some circumstances, fixed
2. The zoomed property didn't get notified correctly sometimes, fixed

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-04-22 12:57:00 +08:00
Yuhang Zhao 3f17626c64 misc: minor tweaks
1. Finish the simple title bar of the QOpenGLWidget demo
2. Minor improvements of the Quick implementation

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-04-22 12:04:38 +08:00
Yuhang Zhao 130d174dc2 misc: improve old Qt version support
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-04-21 21:13:16 +08:00
Yuhang Zhao 701d8d0927 fix build on 5.12 & add initial opengl demo
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-04-21 15:10:16 +08:00