mirror of
https://github.com/wavetermdev/wails.git
synced 2026-04-22 15:26:15 -07:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| db2745e453 | |||
| 56dba5c3a4 | |||
| 3ccf027624 |
@@ -250,7 +250,6 @@ func (cba *ControlBase) Size() (width, height int) {
|
||||
rect := w32.GetWindowRect(cba.hwnd)
|
||||
width = int(rect.Right - rect.Left)
|
||||
height = int(rect.Bottom - rect.Top)
|
||||
width, height = cba.scaleToDefaultDPI(width, height)
|
||||
return
|
||||
}
|
||||
|
||||
@@ -499,14 +498,6 @@ func (cba *ControlBase) scaleWithWindowDPI(width, height int) (int, int) {
|
||||
return scaledWidth, scaledHeight
|
||||
}
|
||||
|
||||
func (cba *ControlBase) scaleToDefaultDPI(width, height int) (int, int) {
|
||||
dpix, dpiy := cba.GetWindowDPI()
|
||||
scaledWidth := ScaleToDefaultDPI(width, dpix)
|
||||
scaledHeight := ScaleToDefaultDPI(height, dpiy)
|
||||
|
||||
return scaledWidth, scaledHeight
|
||||
}
|
||||
|
||||
func (cba *ControlBase) tryInvokeOnCurrentGoRoutine(f func()) bool {
|
||||
runtime.LockOSThread()
|
||||
defer runtime.UnlockOSThread()
|
||||
|
||||
@@ -149,8 +149,3 @@ func ScreenToClientRect(hwnd w32.HWND, rect *w32.RECT) *Rect {
|
||||
func ScaleWithDPI(pixels int, dpi uint) int {
|
||||
return (pixels * int(dpi)) / 96
|
||||
}
|
||||
|
||||
// ScaleToDefaultDPI scales the pixels from scaled DPI-Space to default DPI-Space (96).
|
||||
func ScaleToDefaultDPI(pixels int, dpi uint) int {
|
||||
return (pixels * 96) / int(dpi)
|
||||
}
|
||||
|
||||
-30
@@ -1,30 +0,0 @@
|
||||
# TODO
|
||||
|
||||
Informal and incomplete list of things needed in v3.
|
||||
|
||||
## General
|
||||
|
||||
- [ ] Generate Bindings
|
||||
- [ ] Generate TS Models
|
||||
- [ ] Port NSIS creation
|
||||
- [ ] Dev Mode
|
||||
- [ ] Generate Info.Plist from `info.json`
|
||||
|
||||
- [ ] Windows Port
|
||||
- [ ] Linux Port
|
||||
|
||||
## Runtime
|
||||
|
||||
- [ ] Pass window ID with runtime calls in JS
|
||||
- [ ] Implement alias for `window` in JS
|
||||
- [ ] Implement runtime dispatcher
|
||||
|
||||
## Templates
|
||||
|
||||
- [ ] Create plain template
|
||||
- [ ] Improve default template
|
||||
|
||||
## Runtime
|
||||
|
||||
- [ ] To log or not to log?
|
||||
- [ ] Unify cross-platform events, eg. `onClose`
|
||||
@@ -11,7 +11,6 @@ import (
|
||||
|
||||
func main() {
|
||||
app := clir.NewCli("Wails", "The Wails CLI", "v3")
|
||||
app.NewSubCommandFunction("build", "Build the project", commands.Build)
|
||||
app.NewSubCommandFunction("init", "Initialise a new project", commands.Init)
|
||||
task := app.NewSubCommand("task", "Run and list tasks")
|
||||
task.NewSubCommandFunction("run", "Run a task", commands.RunTask)
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
package commands
|
||||
|
||||
import (
|
||||
"github.com/wailsapp/wails/v3/internal/flags"
|
||||
)
|
||||
|
||||
func Build(options *flags.Build) error {
|
||||
return RunTask(&RunTaskOptions{
|
||||
Name: "build",
|
||||
})
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
package flags
|
||||
|
||||
type Build struct {
|
||||
Common
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user