5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-05 05:09:07 +08:00
Commit Graph

64 Commits

Author SHA1 Message Date
Lea Anthony
bf9e17a6c8
[WEP] Customise Window Titlebars (#3508)
* Add proposal.
Reference Mac implementation

* Add windows support. Update proposal.

* Update example

* Rename Active->Enable,Inactive->Disabled. Ensure window can get controls back after hiding close on windows. Added guide. Updated example.

* Add ExStyle option for setting titlebar style.

* Fix linux builds

* Tidy up
2024-06-08 13:42:27 +10:00
Lea Anthony
e424a85a99
Menu improvements (#3492)
* Expose `DefaultApplicationMenu`.
Add `FindByLabel` and `ItemAt` for finding menu items in a menu

* Add `Menu.RemoveMenuItem()`, `MneuItem.GetAccelerator()` and `MenuItem.RemoveAccelerator()`

* Remove `Update`

* Iterate when removing menu items

* Add `GetSubmenu()`
2024-05-20 21:15:02 +10:00
Lea Anthony
2cee1edcb5
Add window.GetBorderSizes 2024-04-25 15:22:01 +10:00
abichinger
7c921d6a81
[v3 alpha] implement setIcon on linux (#3354)
* implement `linuxApp.setIcon`

* Move code into `linux_cgo.go`
2024-04-09 11:04:54 -05:00
abichinger
db5553ec75
[linux] fix closing of custom context menu #3329 (#3330)
* [linux] fix closing of custom context menu

* Update changelog

---------

Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
2024-03-24 16:51:45 +11:00
Lea Anthony
4ab6352504 Set default size for linux windows 2024-03-17 20:57:46 +11:00
Travis McLane
716f4af808 [linux] add missing implementations 2024-03-06 17:10:41 -06:00
Travis McLane
c21784037d wip: fixing rebase issue 2024-03-06 16:59:13 -06:00
Lea Anthony
161444107a Support linux systrays, of sorts... 2024-03-06 16:59:13 -06:00
Lea Anthony
12e2e2101a fix screens 2024-03-06 16:59:13 -06:00
Lea Anthony
e39097a17e fix min/max 2024-03-06 16:59:13 -06:00
Lea Anthony
29363fc07f ToggleDevTools -> OpenDevTools
More refactor CGO methods.
2024-03-06 16:59:13 -06:00
Lea Anthony
02a1b540ce [WIP] refactor CGO methods 2024-03-06 15:43:50 -06:00
Lea Anthony
a048233f4c Added menu cloning.
Introduced the ability to clone a menu, along with its submenus, in Linux-based web applications to create a full deep copy. This fixes reusing the application menu for window menus.
2024-03-06 15:40:28 -06:00
Lea Anthony
758c4c2c8d Refactor Linux application handling in webview
This update introduces a LinuxOptions struct for Linux-specific application configurations and refines webview for Linux. The 'windows' map has been renamed to 'windowMap' to avoid confusion. Moreover, a method to unregister Windows has been added to ensure the Linux application automatically quits when the last window closes, unless explicitly disabled in the new LinuxOptions structure. Reset Window position after hiding. Some debug output has been removed.
2024-03-06 11:52:06 -06:00
Lea Anthony
adae39efee Add webview GPU policy and update Linux options
The commit introduces a set of webview GPU policies to control hardware acceleration. These policies define when hardware acceleration is enabled on the webview. An option for this has been added to the LinuxWindow struct for Linux specific windows. Additional code modification was carried out to use this new GPU policy option when calling `windowNew` function. Finally, the sequence of the GPU Policies in the const declaration has been updated for better readability.
2024-03-06 11:49:11 -06:00
Lea Anthony
84e1bb4d9b Improve Linux application events and refactor app method receivers
This commit includes the addition of common events for the Linux platform. Refactored and standardized the method receivers for the application from 'm' to 'l'. Also, the application startup events in the window example have been updated according to the new naming scheme.
2024-03-06 11:48:26 -06:00
Lea Anthony
6b0daf3da9 Update windowSetupSignalHandlers & linux events 2024-03-06 11:44:55 -06:00
Lea Anthony
b6c5d90c9d Window Flash for Linux
Set Min/Max window buttons
2024-03-06 11:43:16 -06:00
Lea Anthony
a34ccbff33 ToggleDevTools -> OpenDevTools
More refactor CGO methods.
2024-03-06 11:43:12 -06:00
Lea Anthony
4cd4b46772 [WIP] refactor CGO methods 2024-03-06 11:42:19 -06:00
Lea Anthony
3d93c83920 Added menu cloning.
Introduced the ability to clone a menu, along with its submenus, in Linux-based web applications to create a full deep copy. This fixes reusing the application menu for window menus.
2024-03-06 11:42:19 -06:00
Lea Anthony
809863d61a Refactor Linux application handling in webview
This update introduces a LinuxOptions struct for Linux-specific application configurations and refines webview for Linux. The 'windows' map has been renamed to 'windowMap' to avoid confusion. Moreover, a method to unregister Windows has been added to ensure the Linux application automatically quits when the last window closes, unless explicitly disabled in the new LinuxOptions structure. Reset Window position after hiding. Some debug output has been removed.
2024-03-06 11:42:19 -06:00
Lea Anthony
4c7b643295 Add webview GPU policy and update Linux options
The commit introduces a set of webview GPU policies to control hardware acceleration. These policies define when hardware acceleration is enabled on the webview. An option for this has been added to the LinuxWindow struct for Linux specific windows. Additional code modification was carried out to use this new GPU policy option when calling `windowNew` function. Finally, the sequence of the GPU Policies in the const declaration has been updated for better readability.
2024-03-06 11:42:19 -06:00
Lea Anthony
05b16f1d63 Improve Linux application events and refactor app method receivers
This commit includes the addition of common events for the Linux platform. Refactored and standardized the method receivers for the application from 'm' to 'l'. Also, the application startup events in the window example have been updated according to the new naming scheme.
2024-03-06 11:42:19 -06:00
Lea Anthony
bfa53dfd6c Update windowSetupSignalHandlers & linux events 2024-03-06 11:42:19 -06:00
Lea Anthony
b249f0d0ce
Bring linux up to date with dev changes 2024-01-21 21:24:30 +11:00
Lea Anthony
1195464acb Improve window teardown on termination
This commit adds a robust teardown process for windows on application shutdown. It introduces a field to track the destruction state of each window and checks such before performing window operations. Also, it enhances the destroy functions within application for thorough clean up. Finally, redundant event handlers related to application termination were removed while fixing file generating challenge in go tasks.
2024-01-09 07:45:56 +11:00
Lea Anthony
0b48c3456b
[linux] Add webkit version detection + capabilities 2023-11-12 08:21:31 +11:00
Lea Anthony
1f16655769
[linux] Allow devtools by default 2023-11-11 19:05:03 +11:00
Travis McLane
385b1dbfd4 [linux] implement 'script-message-received' handling
- use unsafe.Pointers for 'signal_connect'
- add handler for 'script-message-received::external'
  need to update this to handle older versions of webkit2gtk better
  currently removed the ifdef guards (since they don't work in Go code
  directly) - need to reimplement using build tags if required.
2023-11-06 23:29:03 -06:00
Travis McLane
f787cf4bc2 [v3 linux] show dev tools if OpenInspectorAtStartup=true 2023-11-06 12:04:20 -06:00
Travis McLane
0fc535f2f1 [v3 linux] contextMenus 2023-11-06 10:41:14 -06:00
Travis McLane
c7c4cacc29 [v3 linux] auto-toggle devtools (if enabled) 2023-10-31 17:15:16 -05:00
Travis McLane
7e63355353 [v3 linux] correct type of window 2023-10-31 17:08:12 -05:00
Travis McLane
01652c7940 [v3 linux] update devtools behavior to match win/mac 2023-10-31 14:02:36 -05:00
Travis McLane
a6163849c6 [v3 linux] match windows transparency logic 2023-10-06 14:38:38 -05:00
Travis McLane
dbcf65b2d6 Revert "Merge branch 'v3-alpha-linux-systray' into v3-alpha"
This reverts commit 92b26488da, reversing
changes made to 1c48d567e1.
2023-10-05 08:34:12 -05:00
Travis McLane
efa67cb01c [v3 linux] systray implementation
Linux requires a `gtk_menu_bar` for a gtk_window to display a menu.
For the `systray` a `gtk_menu` is needed instead.
This change creates the correct type of `impl` for the `Menu`
depending on how it is being used.
2023-09-28 14:50:38 -05:00
Travis McLane
02d76835c9 [v3 linux] noop: remove spurious print 2023-09-28 11:48:46 -05:00
Travis McLane
03b79e9a67 [v3 linux] noop: handleKeyEvent skeleton 2023-09-27 16:31:59 -05:00
Lea Anthony
bb3a0cc54f
Add WebviewWindow.IsFocused() 2023-09-13 08:57:20 +10:00
Travis McLane
2f7c6834d0 [v3 linux] use invokeSync 2023-09-11 17:12:57 -05:00
Travis McLane
54fcacfed1 [v3 linux] correct transparency setting 2023-09-01 15:57:13 -05:00
Travis McLane
bd9f7deb98 [v3 linux] correct minimum zoom 2023-08-23 14:10:22 -05:00
Travis McLane
4804b34208
[v3 linux] api changes (#2830) 2023-08-19 06:12:34 +10:00
Lea Anthony
15f602f867
Move v2 assetserver to v3 2023-08-12 14:16:53 +10:00
Lea Anthony
d6cfe4414d
[v3 Windows] Add WebviewWindow.Flash() 2023-07-11 20:10:18 +10:00
Travis McLane
de5cff799e [v3 linux] setEnabled 2023-06-23 21:50:51 -05:00
Travis McLane
5a40f25d03 [v3 linux] webview setAbsolutePosition 2023-06-23 21:50:51 -05:00