Commit Graph

67 Commits

Author SHA1 Message Date
Yuhang Zhao ac9a05209e quick: fix misleading and annoying warning
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-09-30 12:58:13 +08:00
Yuhang Zhao f97f000cc7 avoid potential deadlocks
And some other minor tweaks.

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-09-25 10:35:00 +08:00
Yuhang Zhao eeda750a61 finalize api update
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-09-21 13:22:03 +08:00
Yuhang Zhao 47bf4da5ae allow user to remove a window from the frameless window list
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-09-20 15:56:59 +08:00
Yuhang Zhao 3d3607af7b refactor
and maybe avoid potential bugs.

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-09-16 17:38:13 +08:00
Yuhang Zhao 91bb8273b8 routine code quality improvement
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-09-15 18:24:34 +08:00
Yuhang Zhao 47dcb8f032 quick: emulate Windows behavior more, just like widget
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-09-14 17:07:06 +08:00
Yuhang Zhao 221f1c12aa fix button size can't be changed
widget: fix the bug
quick: add the interface to change size

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-09-13 17:38:10 +08:00
Yuhang Zhao 34596db939 fix various issues found by user
Issue list:

1. MinGW lacks some definitions so there's compilation errors
2. The chrome buttons' foreground color is incorrect when the window is inactive.
3. Adapt to new macros from Qt dev branch.
4. Remove unneeded parameter from setApplicationOSThemeAware().

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-09-10 13:11:55 +08:00
Yuhang Zhao b9f65aa783 add frameless dialog & demo
And some other minor fixes.

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-09-05 15:00:02 +08:00
Yuhang Zhao 7a35b09a74 add limited qmake support
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-08-31 16:34:30 +08:00
Yuhang Zhao abf4b29dca minor fixes of the last commit
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-08-31 10:45:26 +08:00
Yuhang Zhao 463ac0a999 add window icon support
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-08-31 10:21:24 +08:00
Yuhang Zhao 6c060b3946 demo: add shortcut to switch between fullscreen state
Can also help use better debugging the old style window frame
issue on Windows.

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-08-21 15:38:43 +08:00
Yuhang Zhao 0535276f55 win: use Qt functionalities as much as possible
If Qt provides the functionalities we need, use it
instead of reinventing the wheel.

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-08-16 15:24:14 +08:00
Yuhang Zhao 775b1a2aab minor tweaks
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-07-30 11:34:14 +08:00
Yuhang Zhao 7616161699 Implement homemade Mica material & other improvements
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-07-16 15:25:15 +08:00
Yuhang Zhao 011b4a85f5 fix Qt5 build
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-07-07 16:22:34 +08:00
Yuhang Zhao 2806cc811b code simplification, minor re-structure
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-07-07 13:43:09 +08:00
Yuhang Zhao 464e2af515 finish the chrome palette implementation
And with some other minor tweaks that improve user experience.

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-07-06 14:24:41 +08:00
Yuhang Zhao e8dcb6e6fe add api to set title bar and chrome button color
TODO:
1. Special handling for the close button
2. Move QuickChromePalette class to own files
3. More testing

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-07-05 17:58:04 +08:00
Yuhang Zhao 71f8a5aab1 add blurBehindWindowEnabled property
Current only implements for Windows,
macOS will be implemented later,
Linux won't be supported in the near future.

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-07-03 16:01:19 +08:00
Yuhang Zhao f90b49538a add support for qmltc tool
Also remove one useless enum.

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-07-01 15:52:28 +08:00
Yuhang Zhao 75f19218c6 minor tweaks
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-06-24 21:38:26 +08:00
Yuhang Zhao 888f9d0aca standardsystembutton: use icon font instead of svg images
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-06-24 18:04:49 +08:00
Yuhang Zhao a04fd53a38 general improvements
1. replace raw char array with QByteArray
2. Register QWindow for Quick module
3. Account for hidden and disable state when hovering controls
4. fix quick title bar label alignment

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-06-01 11:16:34 +08:00
Yuhang Zhao 0cff5ff48e add "hideWhenClose" property
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-05-23 21:09:09 +08:00
Yuhang Zhao 093040ec93 make windowFixedSize a Qt property
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-05-23 15:17:34 +08:00
Yuhang Zhao 5754f2ec20 common: improve robustness
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-05-20 17:36:44 +08:00
Yuhang Zhao 44b3730056 quick: remove not used code
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-05-19 10:23:18 +08:00
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 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
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 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 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 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 a97b1782ae redesign the title bar interface
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-05-04 14:50:11 +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 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 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 8460995d7f quick module: minor improvements
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-04-22 15:49: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 68296cc1ae linux: update the implementation based on previous commit
When implementing macOS functionalities, some functions changed signature, update accordingly.

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2022-04-18 19:11:23 +08:00