Hacktoberfest 2026 : les issues que les mainteneurs ont marquées pour octobre, ouvertes et accessibles aux débutants. Parcourir les issues Hacktoberfest

SetAspectRatio should constrain the content area consistently across platforms

Ouverte
#64 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

Évaluation

Difficulté
4/5
Temps estimé
3-5 jours
Accessibilité débutants
48/100
Type d'issue
Bug
Clarté
Plutôt claire
Activité
Active
Stack technique
cpp
Domaine
desktop

Piste de recherche

Start at Window::SetAspectRatio and trace the platform-specific implementations, especially Windows WM_SIZING and programmatic resize handling, alongside Linux geometry hints and macOS contentAspectRatio. Done means the Flutter content area, rather than the whole window including non-client decorations, maintains the requested aspect ratio consistently across platforms.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

bug

Window::SetAspectRatio() behaves differently per platform:

  • macOS constrains the content area (contentAspectRatio), unless the content is full-size.
  • Windows constrains the whole window rect in WM_SIZING, title bar and borders included, so the Flutter view ends up with a different ratio.
  • Linux uses geometry hints on the window, and users report the content not matching the ratio.

Expected: the ratio applies to the content area on all platforms. On Windows, subtract the non-client size before applying the ratio in WM_SIZING, and apply it to programmatic resizes too.

Background:

  • leanflutter/window_manager#437: exclude the title bar from the aspect-ratio calculation
  • leanflutter/window_manager#520: actual window ratio differs from the one set
  • leanflutter/window_manager#566: setAspectRatio behaves differently on Windows and Linux
Langage dominant
C++
Étoiles
34
Forks
7
Merge moyen
3 j 1 h
PR mergées (30 j)
1

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de libnativeapi/nativeapi

Toutes les issues de libnativeapi/nativeapi

Issues similaires

Plus d'issues C++

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.