Hacktoberfest 2026: as issues que os mantenedores marcaram para outubro, abertas e boas para iniciantes. Ver issues do Hacktoberfest

SetAspectRatio should constrain the content area consistently across platforms

Aberta
#64 0 comentários 0 reações 0 responsáveis Ver no GitHub

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
4/5
Tempo estimado
3-5 dias
Facilidade para iniciantes
48/100
Tipo de issue
Bug
Clareza
Razoavelmente clara
Status de atividade
Ativa
Stack de tecnologia
cpp
Domínio
desktop

Direção de pesquisa

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.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

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
Linguagem predominante
C++
Estrelas
34
Forks
7
Merge médio
3d 1h
PRs com merge (30d)
1

Guia de contribuição

Nenhum guia de contribuição indexado para este repositório

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de libnativeapi/nativeapi

Todas as issues de libnativeapi/nativeapi

Issues semelhantes

Mais issues de C++

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.