# ndd **Repository Path**: dddpeter/notepad-- ## Basic Information - **Project Name**: ndd - **Description**: notepad--是一个国产跨平台、轻量级的文本编辑器,是替换notepad++的一种选择。其内置强大的代码对比功能,让你丢掉付费的beyond compare。 - **Primary Language**: C++ - **License**: GPL-3.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 2000 - **Created**: 2025-10-27 - **Last Updated**: 2026-01-21 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Notepad-- (Enhanced Fork) [中文](README.md) | [English](README_EN.md) > This project is forked from [original Notepad-- project](https://gitee.com/cxasm/notepad--) with comprehensive improvements ## Project Introduction Notepad-- is a lightweight text editor written in C++ that works seamlessly across Windows, Linux, and Mac platforms. This fork version is **fully open source** with comprehensive optimizations for cross-platform compatibility, high-DPI displays, and modern desktop environments. ## ✨ Core Improvements ### 🍎 Complete macOS Support - ✅ **Proper App Bundling**: Fixed terminal app issue, added MACOSX_BUNDLE configuration - ✅ **App Icon Configuration**: Properly configured mac.icns icon and Info.plist - ✅ **Fusion Modern Style**: Unified modern interface across platforms - ✅ **Auto Deployment**: Integrated macdeployqt into CMake POST_BUILD hook, automatic packaging with make - ✅ **Retina Display Support**: Perfect support for high-resolution displays ### 🎨 Perfect Dark Mode - ✅ **QPalette Configuration**: Complete dark mode palette (no QSS colors) - ✅ **All Widgets Adapted**: All UI widgets display correctly in dark mode - ✅ **System Theme Auto-Follow**: Auto-detects and follows macOS/Windows/Linux system theme - ✅ **Smart Theme Switching**: Dark mode uses Choco theme, light mode uses default theme ### 🐧 Enhanced Wayland/GNOME Stability - ✅ **Crash Prevention**: QT_WAYLAND_FORCE_DPI=physical and other critical configurations - ✅ **GNOME-Specific Fixes**: Disabled shader cache to prevent GNOME desktop crashes - ✅ **Single Instance Fix**: Fixed program startup issues on Wayland - ✅ **Thread Safety**: Using QMutex and QMetaObject::invokeMethod for thread safety - ✅ **Auto Platform Adaptation**: Auto-detects Wayland/X11 platform and adapts - ✅ **Stability Guarantees**: - Disabled native menu bar (AA_DontUseNativeMenuBar) - Disabled native widget siblings (AA_DontCreateNativeWidgetSiblings) - Disabled shader disk cache (AA_DisableShaderDiskCache) ### 📺 Complete 4K/8K High-DPI Support - ✅ **Fractional Scaling**: Full support for 125%, 150%, 175%, 200%, 250%, 300% scaling - ✅ **PassThrough Policy**: Using HighDpiScaleFactorRoundingPolicy::PassThrough - ✅ **Mixed DPI**: Support for multi-monitor mixed DPI environments - ✅ **Auto DPI Detection**: Automatically detects and adapts to monitor DPI - ✅ **Sharp Rendering**: Text and icons remain sharp at any scaling level ### 📝 System Default Editor - ✅ **Linux Configuration**: desktop file with InitialPreference=9 high priority - ✅ **macOS Configuration**: Info.plist complete file type associations, LSHandlerRank=Default - ✅ **File Type Support**: Supports 80+ text and code file types - ✅ **One-Command Setup**: Provided install-default-editor.sh auto-configuration script ### 🔧 Other Improvements - ✅ **Fully Open Source**: Removed registration and donation related code - ✅ **Build Optimization**: Optimized CMake configuration, one-command build and package - ✅ **Error Diagnostics**: Comprehensive error logging for easy troubleshooting ## 📥 Download & Installation ### Latest Version **Project**: [https://gitee.com/dddpeter/notepad--](https://gitee.com/dddpeter/notepad--) **Issues**: [https://gitee.com/dddpeter/notepad--/issues](https://gitee.com/dddpeter/notepad--/issues) ### Build from Source #### Ubuntu/Debian **Option 1: DEB Package (Recommended - Uses system Qt libraries)** ```bash # Install dependencies sudo apt-get install qtbase5-dev qt5-qmake qtbase5-dev-tools \ libqt5printsupport5 libqt5xmlpatterns5-dev # Build cd how_build cmake -B build -DCMAKE_BUILD_TYPE=Release cd build && make -j$(nproc) # Package DEB (~2MB, requires system Qt libraries) cpack # Set as default editor (Optional) cd ../scripts ./install-default-editor.sh ``` **Option 2: AppImage (Bundled Qt libraries - Portable)** ```bash # One-command build AppImage (~60MB, includes all Qt libraries) cd how_build ./build_appimage.sh # Run chmod +x build_appimage/*.AppImage ./build_appimage/*.AppImage ``` **Features**: - ✅ Full Wayland and X11 support - ✅ Prevents GNOME crashes - ✅ 4K/8K display support (fractional scaling) - ✅ System theme auto-follow - ✅ AppImage includes all Qt libraries, no dependencies required #### macOS ```bash # Install dependencies brew install cmake qt@5 # One-command build (Recommended, auto-bundles Qt libraries) cd how_build ./build_macos.sh # Or manual build cd how_build cmake -B build -DCMAKE_BUILD_TYPE=Release cd build && make -j$(sysctl -n hw.ncpu) # Automatically runs macdeployqt # Create DMG installer (Optional) cd build && cpack ``` **Features**: - ✅ Auto-deploy Qt frameworks into .app (macdeployqt) - ✅ All Qt libraries bundled inside app, no extra installation needed - ✅ Proper .app bundle (not terminal app) - ✅ App icon and file associations - ✅ System theme auto-follow - ✅ Retina display support #### Arch Linux ```bash yay -S notepad---git ``` Detailed build instructions: - `how_build/linux开源编译及下载说明.txt` - `docs/WAYLAND_IMPROVEMENTS.md` ## 📚 Documentation - `README_CHANGES.md` - Detailed improvements - `docs/PACKAGING_GUIDE.md` - Packaging guide (Qt library bundling instructions) - `docs/WAYLAND_IMPROVEMENTS.md` - Wayland support documentation - `docs/GTK_THEME_INTEGRATION.md` - GTK theme integration documentation - `docs/QT6_MIGRATION_GUIDE.md` - Qt6 migration guide - `docs/maintenance/` - Maintenance documentation and changelogs - `scripts/README.md` - Maintenance scripts usage guide ## 🔧 Project Configuration ### .gitignore Configuration The project has a comprehensive `.gitignore` file that includes: - Compiled files (.o, .exe, .app, .dll, etc.) - Qt-related temporary files (moc_*, ui_*, qrc_*, etc.) - IDE configuration files (.vs/, .vscode/, .idea/, etc.) - System temporary files (.DS_Store, Thumbs.db, etc.) - Build directories and cache files - Root directory temporary files (preserving files in organized directories) For detailed ignore rules, see the [`.gitignore`](.gitignore) file. ## 🤝 Feedback Submit issues at [Issues Page](https://gitee.com/dddpeter/notepad--/issues) ## 📜 License This project is licensed under GPL-2.0-or-later. See [LICENSE](LICENSE) file for details. ## 🙏 Acknowledgments Thanks to the authors and contributors of the [Original Notepad-- Project](https://gitee.com/cxasm/notepad--) ## Preview **Windows:** ![Screenshot](png/0828.png) ![Screenshot](png/20240105.png) ![File Comparison](png/6.png) **macOS:** ![Screenshot](png/010501.png) ![Screenshot](png/010502.png) ![Screenshot](010503.png) **RedHat 7.x:** ![Screenshot](png/010505.png) **UOS Deepin:** ![Screenshot](png/0809.png) **Kylin openkylin amd x64:** ![Screenshot](png/kinly01.png) ![Screenshot](png/kinly02.png) ![Screenshot](png/kinly03.png)