mirror of
https://github.com/ForLoopCodes/legacy-notepad.git
synced 2026-04-26 12:25:50 +03:00
[PR #18] [MERGED] Persist font settings via Windows Registry #22
Labels
No labels
bug
bug
documentation
enhancement
good first issue
good first issue
help wanted
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/legacy-notepad#22
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/ForLoopCodes/legacy-notepad/pull/18
Author: @Copilot
Created: 2/4/2026
Status: ✅ Merged
Merged: 2/4/2026
Merged by: @ForLoopCodes
Base:
main← Head:copilot/change-default-font-settings📝 Commits (5)
14e51d2Initial plan007e9f2Add font settings persistence via Windows Registry6d449d7Improve code quality: use named constants for font size limits1492c70Complete implementation of font settings persistence028710bClean up: remove build artifacts and update .gitignore📊 Changes
6 files changed (+96 additions, -1 deletions)
View changed files
📝
.gitignore(+3 -1)📝
CMakeLists.txt(+1 -0)📝
src/main.cpp(+2 -0)📝
src/modules/dialog.cpp(+2 -0)➕
src/modules/settings.cpp(+69 -0)➕
src/modules/settings.h(+19 -0)📄 Description
Font preferences (name and size) were not persisted across application restarts. Users had to reconfigure from Consolas 16pt every time.
Changes
New module:
src/modules/settings.cppLoadFontSettings()- reads fromHKCU\Software\LegacyNotepadon startupSaveFontSettings()- writes when user changes font via Format menuIntegration points:
main.cpp- loads settings before window creationdialog.cpp- saves settings afterFormatFont()completesCMakeLists.txt- added to buildImplementation
Registry values:
FontName(REG_SZ) - font face nameFontSize(REG_DWORD) - point sizeGracefully falls back to hardcoded defaults if registry key doesn't exist. Uses same registry pattern as existing
theme.cpp.Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.