Skip to content

Fix note list rendering at fractional display scaling#769

Open
Shriram-Vasudevan wants to merge 2 commits into
nuttyartist:masterfrom
Shriram-Vasudevan:fix-164-note-list-dpi-scaling
Open

Fix note list rendering at fractional display scaling#769
Shriram-Vasudevan wants to merge 2 commits into
nuttyartist:masterfrom
Shriram-Vasudevan:fix-164-note-list-dpi-scaling

Conversation

@Shriram-Vasudevan
Copy link
Copy Markdown

Summary

  • set Qt high-DPI scale factor rounding to pass through before creating the application
  • create note-list delegate paint buffers with the owning widget/window device-pixel ratio
  • use logical buffer geometry while painting cropped row backgrounds/labels, so Windows fractional scaling does not mix physical pixmap pixels with logical item rects

Fixes #164.

Verification

  • git diff --check
  • c++ -std=c++17 -fsyntax-only -include arm_acle.h ... src/notelistdelegate.cpp src/notelistdelegateeditor.cpp against locally installed Qt 6.9.2 headers
  • syntax-only check for QGuiApplication::setHighDpiScaleFactorRoundingPolicy(...) against Qt 6.9.2 headers

I could not run the full CMake build locally because cmake is not installed in this environment, and clang-format is also unavailable locally.

@zjeffer
Copy link
Copy Markdown
Collaborator

zjeffer commented May 11, 2026

@nuttyartist Do we have an AI-policy? Personally I'm not a big fan of these fully AI-generated PRs, I mean the OP didn't even bother to let the AI install cmake:

I could not run the full CMake build locally because cmake is not installed in this environment, and clang-format is also unavailable locally.

I recently added one in a personal repo if you want an example: https://github.com/zjeffer/split-monitor-workspaces/blob/main/CONTRIBUTING.md

@Shriram-Vasudevan
Copy link
Copy Markdown
Author

I installed the missing local build tooling and pushed follow-up commit 404e7cf with the clang-format adjustments found by the repo format gate.

Verification now run locally:

  • /opt/homebrew/opt/llvm/bin/clang-format -style=file --dry-run --Werror --color=false src/main.cpp src/notelistdelegate.cpp src/notelistdelegateeditor.cpp src/utils.h -> passed
  • find src/ -iregex '.*\.\(cpp\|h\|mm\)$' -print0 | xargs -n 1 -0 /opt/homebrew/opt/llvm/bin/clang-format -style=file --dry-run --Werror --color=false -> passed
  • cmake . --warn-uninitialized --warn-unused-vars -G Ninja -B build -DCMAKE_BUILD_TYPE=debug -DCMAKE_PREFIX_PATH="$(brew --prefix qt@6)" -DPRO_VERSION=OFF -> passed with Qt 6.9.2
  • cmake --build build -> passed
  • ctest --test-dir build --output-on-failure -> no tests registered
  • git diff --check -> passed

The build produced only existing/project-wide Qt deprecation and macOS deployment-target linker warnings, not errors in the touched note-list files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug - notes are not aligned well on some reported Windows machines [$80]

2 participants