#1057 expose ZoomFactor get/set and add the respective windows only options (#1463)

* #1057 expose ZoomFactor get/set and add the respective windows only options

* Remove debug log, use IsZoomControlEnabled as well

* use math.float to/from 64bits functions instead

* Add new windows options ZoomFactor and IsZoomControlEnabled doc

* Grammar

* Update options.mdx

Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
This commit is contained in:
Pierre Joye
2022-10-14 08:46:14 +11:00
committed by GitHub
co-authored by Lea Anthony
parent 7effede62b
commit f4adff1cb3
7 changed files with 69 additions and 5 deletions
+17
View File
@@ -42,6 +42,8 @@ func main() {
WindowStartState: options.Maximised,
CSSDragProperty: "--wails-draggable",
CSSDragValue: "drag",
ZoomFactor: 1.0,
IsZoomControlEnabled: false,
Bind: []interface{}{
app,
},
@@ -361,6 +363,21 @@ Indicates what value the `CSSDragProperty` style should have to drag the window.
Name: CSSDragValue<br/>
Type: `string`
### ZoomFactor
Name: ZoomFactor<br/>
Type: `float64`
This defines the zoom factor for the WebView2. This is the option matching the Edge user activated zoom in or out.
### IsZoomControlEnabled
Name: IsZoomControlEnabled<br/>
Type: `bool`
This enables the zoom factor to be changed by the user. Please note that the zoom factor can be set in the options while
disallowing the user to change it at runtime (f.e. for a kiosk application or similar).
### Bind
A slice of struct instances defining methods that need to be bound to the frontend.