Commit Graph

110 Commits

Author SHA1 Message Date
Altair Wei 1ebead3148 sync with 1.x changes 2021-11-14 22:31:02 +08:00
Altair Wei 7d29ee5b95 create widget-level APIs 2021-10-17 22:33:36 +08:00
Altair Wei dcb5fb1da4 make mac window buttons location settable 2021-10-11 18:03:44 +08:00
Altair Wei 92681dc9d9 copy WindowButtonsProxy from electron 2021-10-10 21:08:42 +08:00
Altair Wei c8cfefb3ca init implementation of MacOS window btn location 2021-10-07 19:29:45 +08:00
Altair Wei d8c137d11f mv source code into src folder 2021-10-07 15:13:34 +08:00
Altair Wei 0e63a053de fix examples on MacOS 2021-10-06 22:05:15 +08:00
Altair Wei 420d942762 fix examples on Windows 2021-10-06 20:53:24 +08:00
Altair Wei d680ad87b1 fix examples for Core API 2.0 2021-10-06 20:42:10 +08:00
Altair Wei 183aa9a730 integrate Windows implementation into 2.0 Core API 2021-10-06 15:10:53 +08:00
Altair Wei 5e96c3fec6 fix build error on Windows 2021-10-03 17:44:55 +08:00
Altair Wei de1d6abaf0 add showMacWindowButton 2021-10-02 15:50:22 +08:00
Altair Wei ce69d1a4c5 implement Core API on MacOS 2021-10-02 14:19:46 +08:00
Altair Wei 989de57f33 fix HiDPI position calculate error 2021-09-21 15:42:11 +08:00
Altair Wei 5f58937588 add hitTestVisible logic 2021-09-20 19:41:24 +08:00
Altair Wei 96f49ded2f fix move and resize determination 2021-09-20 14:47:49 +08:00
Altair Wei a365499455 implemented linux x11 moving 2021-09-20 00:08:43 +08:00
Altair Wei 93ac6f6ee3 minimal example that only depends on Core API 2021-09-19 22:24:00 +08:00
Yuhang Zhao 138a2b90cb Minor refactor
1. Remove compiler specific flags
2. Build shared library by default
3. Remove unused functions
4. Minor tweaks of some internal logic, the final behavior is not affected

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2021-09-06 14:24:43 +08:00
Yuhang Zhao 8367331278 Win32: move all win32 staff to one header
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2021-09-05 13:24:12 +08:00
Yuhang Zhao d64b38a8db Improve the widget example
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2021-09-05 12:27:16 +08:00
Yuhang Zhao bc8a70dbb2 Win32: Fix window content will be cut-off for some pixels when window is fullscreened
1. Fix that bug
2. Some adjustments of the variable names to make them more clear
3. Some tweaks to the title bar height value

TODO: Add a button to switch between fullscreen and windowed mode for the widget example
TODO: Add a title text to the widget example

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2021-09-04 22:40:13 +08:00
Yuhang Zhao 2c106ffef9 Minor tweaks
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2021-09-01 15:26:36 +08:00
Altair Wei 01dd43c356
fix unwanted cursor change when leave edge region (#80) 2021-08-23 09:29:50 +08:00
Yuhang Zhao f18468dcca Win32: QMake: fix build error
Fixes: #76

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2021-08-16 16:24:14 +08:00
Yuhang Zhao 5a2d498445 Minor tweaks
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2021-08-11 17:58:47 +08:00
Yuhang Zhao 2b6d0fccb6 Minor tweaks
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2021-07-23 11:04:48 +08:00
Yuhang Zhao 6698033a1a Fix Qt 5.9 build
Use lower import version for Qt Quick

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2021-07-21 17:23:10 +08:00
Yuhang Zhao d43d126d3f Fix wrong system button size in example
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2021-07-21 11:16:45 +08:00
Yuhang Zhao 233ebba3ec Minor tweaks
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2021-07-20 09:58:00 +08:00
Yuhang Zhao f30339ff54 Minor cleanup
1. Remove unneeded functions
2. Rename some functions and variables to match their real functionality

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2021-07-19 10:43:10 +08:00
Yuhang Zhao 151e8a1664 Minor tweaks
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2021-07-06 10:54:11 +08:00
Yuhang Zhao 28144b1e74 Minor tweaks
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2021-06-09 13:27:11 +08:00
Julien 938756a757
FIX frame in QMainWindow (#58)
Co-authored-by: Julien Maille <julien.maille@data-pixel.com>
2021-06-09 08:59:51 +08:00
Yuhang Zhao e0b5244420 Rename function
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2021-06-01 13:10:05 +08:00
Yuhang Zhao 4139cf0ab2 redesign API 2021-05-31 11:52:32 +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 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 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 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 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 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 b51c6ce564 Use new screenshot
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2021-03-09 14:06:36 +08:00
Yuhang Zhao 8b3da2d31a Add CMake project files for the examples
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2021-03-09 13:43:46 +08:00
Yuhang Zhao f70158a276 Add cross-platform Acrylic Effect
Currently still lacking Linux and macOS support,
but will be added sooner.

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
2021-03-08 14:10:55 +08:00