Skip to content

Commit efd550d

Browse files
feat: add automatic Markdown preview and prepare v2.2.0
1 parent e83480d commit efd550d

12 files changed

Lines changed: 618 additions & 33 deletions

‎README.en.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ Choose a portable ZIP on the release page, extract it, and run `FloatNote.exe`.
4040
Choose an application ZIP, not **Source code**. Extract into a writable folder. Binaries are unsigned and may trigger SmartScreen; SHA-256 checksums are included on the release page.
4141

4242
- Hover near the top to reveal controls; drag the bottom-right grip to resize.
43+
- Notes start in Markdown preview. Click text to edit; click blank space, a control or another window to save and return to preview. See [Quick start](docs/QUICKSTART.md) for supported syntax.
4344
- `Ctrl+Alt+E` restores editing; `Ctrl+Alt+H` toggles visibility; `Ctrl+Alt+P` toggles click-through.
4445
- `Ctrl+wheel` changes font size. Double-click the tray icon to recover the note.
4546
- To upgrade, exit the old app and replace the executable. **Keep and back up the existing `data` folder.**

‎README.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
选择应用 ZIP,而非 **Source code**。解压到可写目录;程序未签名,可能触发 SmartScreen。发布页提供 SHA-256 校验文件。
4141

4242
- 顶部显示操作按钮,右下角拖动调整大小。
43+
- 默认预览 Markdown;点击文字编辑,点击空白、控件或其他窗口后自动保存并回到预览。支持范围见[快速开始](docs/QUICKSTART.md)。
4344
- `Ctrl+Alt+E` 恢复编辑;`Ctrl+Alt+H` 显示/隐藏;`Ctrl+Alt+P` 切换鼠标穿透。
4445
- `Ctrl+滚轮` 调整字号;双击托盘图标可找回便签。
4546
- 升级时退出旧版、替换程序,**保留并备份原目录的 `data` 文件夹**。

‎RELEASE_NOTES.md‎

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,37 @@
1-
# FloatNote 2.1.0
1+
# FloatNote 2.2.0
22

3-
液态玻璃更易读,收放与控件响应更顺畅。
3+
液态玻璃便签支持 Markdown 自动预览:点击文字编辑,点击别处回到排版后的便签。
44

5-
- **自动字色**:根据文字区域的实际背景切换深浅字色,平滑过渡,减少反复闪烁。
6-
- **自适应控件**:黑白控件随周围背景变化;关闭按钮保留红色悬停反馈,尺寸提示跟随正文字色。
7-
- **玻璃光照**:根据局部背景的颜色和纹理调整曲面明暗与反光。
8-
- **交互优化**:收放复用着色器与图形资源,加快控件出现;修复窗口较多时独立控件的层级问题。
5+
- **自动切换**:默认显示预览;点击文字进入原文编辑,点击空白、操作控件或其他窗口后自动保存并返回预览。暂停打字不会退出编辑。
6+
- **Markdown 排版**:支持标题、粗体、斜体、删除线、有序/无序列表、任务列表、引用、行内代码、围栏代码块和链接文字。
7+
- **原生编辑**:保留中文输入、光标定位和撤销记录;切换时等待输入法合成结束。空便签仍可点击输入。
8+
- **玻璃显示**:排版适配窗口宽度和字号,文字保持清晰,预览支持滚动。
9+
10+
内容继续按 Markdown 原文保存在 `data/note.txt`,已有普通文本便签可直接使用。点击链接或任务标记会进入编辑;本版暂不渲染表格、图片和 HTML,也不加载远程内容。Markdown 支持是常用语法子集,并非完整 CommonMark/GFM 实现。
911

1012
## 下载与升级
1113

1214
下载 Assets 中的 ZIP,解压运行 `FloatNote.exe`:**x64 适合大多数电脑**,arm64 适合 Windows on ARM,x86 适合 32 位环境。无需额外运行库。
1315

1416
升级前退出旧版,替换 EXE,**保留并备份原目录的 `data` 文件夹**。发布包不含个人数据;校验值见 `SHA256SUMS.txt`。
1517

16-
液态玻璃主要面向支持的 Windows 11 环境。部分截图、录屏和远程共享仍可能看不到实时玻璃,需要时切换毛玻璃;本次未解决该限制。设置和材质面板目前为中文,程序未签名。
18+
液态玻璃主要面向支持的 Windows 11 环境。部分截图、录屏和远程共享可能看不到实时玻璃,需要时切换毛玻璃。设置和材质面板目前为中文,程序未签名。自动检查不等同于所有输入法、显卡和远程环境的实机验收。
1719

1820
---
1921

2022
## English
2123

22-
More readable liquid glass, smoother transitions and more responsive controls.
24+
Markdown preview comes to the liquid-glass note: click text to edit, then click elsewhere to return to the formatted note.
25+
26+
- **Automatic switching**: notes start in preview. Clicking text opens source editing; clicking blank space, a control or another window saves and restores preview. Pausing typing does not leave editing.
27+
- **Markdown formatting**: headings, bold, italic, strikethrough, ordered/unordered lists, tasks, quotes, inline/fenced code and link labels.
28+
- **Native editing**: retains Chinese input, source-position-aware caret placement and undo history. Preview waits for IME composition to finish. Empty notes remain clickable for input.
29+
- **Glass presentation**: text wraps to the note width, follows font-size changes and remains readable over transparent backgrounds. Preview can be scrolled.
2330

24-
- **Automatic text color** follows the rendered background, with smooth transitions and hysteresis to reduce flicker.
25-
- **Adaptive monochrome controls** follow the surrounding background. Close retains red hover feedback; the resize hint follows text color.
26-
- **Glass lighting** responds to local background color and texture.
27-
- **Interaction improvements** reuse shaders and graphics resources during collapse/restore, reveal controls sooner, and remove a window-count limit from control stacking.
31+
Content remains Markdown source in `data/note.txt`, and existing plain-text notes continue to work. Clicking a link or task marker edits its source. Tables, images and HTML are not rendered; no remote content is loaded. This is a subset of common Markdown syntax, not a complete CommonMark/GFM implementation.
2832

2933
Download a ZIP from Assets: **x64 for most PCs**, arm64 for Windows on ARM, or x86 for 32-bit environments. Extract and run `FloatNote.exe`; no additional runtime is required.
3034

3135
Exit before upgrading, replace the EXE, and **keep and back up the existing `data` folder**. Packages contain no personal data. Verify downloads with `SHA256SUMS.txt`.
3236

33-
Liquid glass targets supported Windows 11 environments. Some capture and remote-sharing methods still omit live glass; use frosted glass when needed. This release does not resolve that limitation. Settings/material panels remain in Chinese. Binaries are unsigned. Automated tests do not certify every GPU or remote environment.
37+
Liquid glass targets supported Windows 11 environments. Some capture and remote-sharing methods omit live glass; use frosted glass when needed. Settings/material panels remain in Chinese. Binaries are unsigned. Automated checks do not certify every IME, GPU or remote environment.

‎docs/DEVELOPMENT.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,13 @@ For the liquid-glass renderer, source map and adaptation boundaries, start with
1212
- `src/liquid_backdrop.h` and `monitor_backdrop_capture.h` — local GPU material and monitor capture.
1313

1414
- `src/main.cpp` — Win32 window, input, persistence, tray, and rendering behavior.
15+
- `src/markdown.h` / `src/markdown_preview.h` — local Markdown parsing, source-position mapping and DirectWrite/Direct2D preview; native EDIT retains input, IME and undo.
1516
- `src/backdrop.h` — isolated Windows Composition host-backdrop integration.
1617
- `src/platform.h` — small Windows helpers and atomic file writes.
1718
- `src/localization.h` — English and Simplified Chinese strings.
1819
- `src/version.h` / `src/resources.rc` — the single product version and executable metadata.
1920
- `tests/regression.cpp` — hidden, deterministic native behavior checks.
21+
- `tests/glass_markdown.cpp` — automatic preview/edit switching, source persistence, undo, IME lifecycle, wrapping and transparent text composition with isolated data.
2022
- `tests/integration.cpp` — focused compositor and interaction checks that open temporary windows.
2123
- `tests/visuals.cpp` — shadow, tint, text antialiasing, custom text color, and settings screenshot checks.
2224
- `tests/visual_test_support.h` — shared fixtures and compositor capture helpers.

‎docs/QUICKSTART.md‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# FloatNote 2.0 — 快速开始 / Quick start
1+
# FloatNote 2.2.0 — 快速开始 / Quick start
22

33
1. 解压 ZIP 到可写目录,双击 FloatNote.exe。无需编译源码。
44
2. 鼠标移到便签顶部提示附近,进入设置;右下角拖动调整大小。
@@ -7,10 +7,16 @@
77
5. 升级前退出旧版,只替换 EXE,保留 data 文件夹;建议先备份 data。
88
6. 截图或远程看不到便签时,在设置里切换毛玻璃。
99

10+
便签默认预览 Markdown。点击文字进入原文编辑,点击空白、操作控件或切到其他窗口后自动保存并回到预览;仅暂停打字不会退出编辑。空便签点击文字区域即可输入。
11+
支持标题、粗体、斜体、删除线、有序/无序列表、任务列表、引用、行内代码、围栏代码块和链接文字。链接和任务标记点击后进入编辑。内容仍按 Markdown 原文保存在本地 `data/note.txt`,普通文本照常使用;表格、图片和 HTML 暂按原文显示,不加载远程内容。
12+
1013
Extract the ZIP into a writable folder and run FloatNote.exe. No build step is needed.
1114
Hover near the top hint for settings; resize with the bottom-right grip. Shrink vertically to tuck the note away, and click the remaining bar to restore it.
1215
Ctrl+Alt+E restores editing, Ctrl+Alt+H toggles visibility, and Ctrl+Alt+P toggles click-through. Running the app again also restores the note.
1316
Exit before upgrading, replace the EXE and keep your data folder. Use frosted glass when screenshot/remote visibility is needed.
1417
The new settings panel is currently in Chinese. Binaries are unsigned; checksums are provided on the release page.
1518

19+
Notes start in Markdown preview. Click text to edit its source; click blank space, a control, or another window to save and return to preview. Pausing typing does not leave editing. Click anywhere in an empty note's text area to start writing.
20+
Headings, emphasis, strikethrough, lists, tasks, quotes, inline/fenced code and link labels are supported. Clicking a link or task marker edits its source. Markdown remains in `data/note.txt`; plain text still works. Tables, images and HTML are shown as source, with no remote content loading.
21+
1622
Downloads / feedback: https://github.com/Fryingpan-Jason/FloatNote-Liquid-Glass/releases/latest

‎experiments/glass_experience.h‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,7 @@ HRESULT CALLBACK ExperienceCloseDialogProcedure(HWND window,UINT message,WPARAM,
206206
}
207207
void RequestExperienceClose() {
208208
if(!experienceReady || g_closing || experienceCloseDialogOpen || experienceColorDialogOpen || experienceColorRequestPending)return;
209+
LeaveMarkdownEditor();
209210
experiencePanel.Close(false);
210211
auto decision=GlassClose::Resolve(experienceCloseBehavior,GlassClose::Behavior::Ask,false,false);
211212
if(experienceCloseBehavior==GlassClose::Behavior::Ask) {
@@ -401,6 +402,7 @@ void TickExperienceAbsorb() {
401402
void CloseExperienceMenu() {if(experienceReady)experiencePanel.Close();}
402403
void ToggleExperienceMenu() {
403404
if(ExperienceInputBlocked() || experienceCloseDialogOpen || experienceColorDialogOpen || experienceColorRequestPending)return;
405+
LeaveMarkdownEditor();
404406
if(!experienceReady)CreateExperienceUI();
405407
if(!experienceReady)return;
406408
if(experienceFolded){ExpandExperienceNote();return;}
@@ -417,6 +419,7 @@ void ToggleExperienceMenu() {
417419
SyncExperienceUI();
418420
}
419421
void ExperienceAction(GlassControlPopover::Action action,int value) {
422+
LeaveMarkdownEditor();
420423
using A=GlassControlPopover::Action;
421424
switch(action){
422425
case A::ToggleTopmost:SetTopmost(!ExperienceState().pinned);break;
@@ -483,7 +486,7 @@ void CreateExperienceUI() {
483486
experienceIsland.Create(g_instance,[]{ToggleExperienceMenu();},[](int,int){
484487
if(experienceDragging){experienceDragging=false;RecoverWindowPosition();SaveSettings();SyncExperienceUI();}
485488
},[](int dx,int dy){
486-
if(!experienceDragging){GetWindowRect(g_window,&experienceDragOrigin);experienceDragging=true;CloseExperienceMenu();}
489+
if(!experienceDragging){LeaveMarkdownEditor();GetWindowRect(g_window,&experienceDragOrigin);experienceDragging=true;CloseExperienceMenu();}
487490
SetWindowPos(g_window,nullptr,experienceDragOrigin.left+dx,experienceDragOrigin.top+dy,0,0,
488491
SWP_NOSIZE|SWP_NOZORDER|SWP_NOACTIVATE);
489492
},[]{PostMessageW(g_window,kExperienceCloseRequest,0,0);});

0 commit comments

Comments
 (0)