wails icon indicating copy to clipboard operation
wails copied to clipboard

DisableResize sets an effective MinHeight of 200

Open GnRlLeclerc opened this issue 9 months ago • 3 comments

Description

When settings both DisableResize: true and Height: 50 (any value below 200) or MaxHeight: 50, the window cannot be resized (expectedly so) but has a height of 200 and not 50.

To Reproduce

  1. Generate a new project with wails init -n wails-debug -t svelte-ts
  2. Go to the project (cd wails-debug)
  3. In main.go, in the &options.App{} struct, set DisableResize: true and Height: 50
  4. Run wails dev
  5. The window has a height of 200

Expected behaviour

The window should have a height of 50.

Screenshots

No response

Attempted Fixes

No response

System Details

Wails Doctor          
                                

                                                                                                                                                                         
# Wails
Version         | v2.9.2 
Package Manager | nixpkgs

# System
┌───────────────────────────────────────────────────┐
| OS           | NixOS                              |
| Version      | 25.05                              |
| ID           | nixos                              |
| Go Version   | go1.23.6                           |
| Platform     | linux                              |
| Architecture | amd64                              |
| CPU          | AMD Ryzen 7 6800HS Creator Edition |
| GPU 1        | Unknown                            |
| GPU 2        | Unknown                            |
| Memory       | 28GB                               |
└───────────────────────────────────────────────────┘

# Dependencies
┌────────────────────────────────────────────────────────────┐
| Dependency | Package Name     | Status    | Version        |
| *docker    | nixos.docker     | Installed | 25.0.6         |
| gcc        | nixos.gcc        | Installed | 13.2.0         |
| libgtk-3   | nixos.gtk3       | Available | 3.24.43        |
| libwebkit  | nixos.webkitgtk  | Available | 2.44.3+abi=4.0 |
| npm        | nixos.nodejs     | Installed | 20.15.1        |
| *nsis      | nixos.nsis       | Available | 3.06.1         |
| pkg-config | nixos.pkg-config | Installed | 0.29.2         |
| *upx       | nixos.upx        | Available | 4.2.3          |
└───────────────── * - Optional Dependency ──────────────────┘

# Diagnosis
Required package(s) installation details: 
  - libgtk-3: nix-env -iA nixos.gtk3
  - libwebkit: nix-env -iA nixos.webkitgtk

Optional package(s) installation details: 
  - nsis: nix-env -iA nixos.nsis
  - upx: nix-env -iA nixos.upx

 WARNING  Your system has missing dependencies!

Additional context

No response

GnRlLeclerc avatar Apr 22 '25 22:04 GnRlLeclerc

I have just tried it with tauri, and get the same behavior. This may not be related to Wails, but to Gnome / Wayland / Webkit.

GnRlLeclerc avatar Apr 22 '25 22:04 GnRlLeclerc

Related issue for Tauri: https://github.com/tauri-apps/tao/issues/561

GnRlLeclerc avatar Apr 22 '25 22:04 GnRlLeclerc

A long long time ago... #1517

superDingda avatar Apr 23 '25 06:04 superDingda