Skip to content

知了 Cicada · 任何会议和直播的实时字幕、同声传译、AI 会议纪要,Mac、Windows、Linux、Android 免费开源。Live subtitles, interpreting and meeting notes for any call or stream, on Mac, Windows, Linux and Android.

fix(windows): on a small screen, the talk bar no longer covers the notes panel's live line

wquguru82e8138e6895
diff --git a/site/changelog.json b/site/changelog.json
index 09eda2c..50d7a49 100644
--- a/site/changelog.json
+++ b/site/changelog.json
@@ -134,6 +134,14 @@
],
"title": "Linux 上开新会议时,纪要窗口不再一直留着上一场会议同传说过的那句。",
"text": "上一场会议结束后,“同声传译 · 线上听到…”那张卡片会一直留到之后的会议里;现在新会议开始时清空。"
+ },
+ {
+ "kind": "fixed",
+ "platforms": [
+ "windows"
+ ],
+ "title": "小屏幕上按住说话键时,底部的同传提示条不再压住纪要窗口里正在说的那句。",
+ "text": "提示条居中会碰到纪要窗口时,改放到旁边更宽的空位里。"
}
]
},
diff --git a/windows/src/Cicada/App.cs b/windows/src/Cicada/App.cs
index a77b529..43256bb 100644
--- a/windows/src/Cicada/App.cs
+++ b/windows/src/Cicada/App.cs
@@ -733,6 +733,9 @@ sealed class Controller
// MARK: Speaking (同声传译)
public bool NotesVisible => notesWindow?.IsVisible == true;
+ /// Where the notes panel is on screen, when it shows as a panel: the talk bar keeps out of it.
+ public Rect? NotesBounds => NotesVisible && Settings.View == "notes"
+ ? new Rect(notesWindow!.Left, notesWindow.Top, notesWindow.ActualWidth, notesWindow.ActualHeight) : null;
public void SetFakeMic(string? path) { fakeMic = path; Log.Debug($"speak: fake mic {(path is null ? "off" : "on")}"); }
diff --git a/windows/src/Cicada/SpeakBar.cs b/windows/src/Cicada/SpeakBar.cs
index a0c55f7..5958157 100644
--- a/windows/src/Cicada/SpeakBar.cs
+++ b/windows/src/Cicada/SpeakBar.cs
@@ -36,6 +36,14 @@ sealed class SpeakBar : Window
Left = area.Left + (area.Width - ActualWidth) / 2;
var above = app.Settings.View == "subtitles" && app.NotesVisible ? 150 : 16;
Top = area.Bottom - ActualHeight - above + Ui.ShadowRoom;
+ // Centred, it would sit over the notes panel's live card on a small screen: centre it in the
+ // wider free side instead, if it fits there.
+ if (app.NotesBounds is { } n && new Rect(Left, Top, ActualWidth, ActualHeight).IntersectsWith(n))
+ {
+ double leftRoom = n.Left - area.Left, rightRoom = area.Right - n.Right;
+ if (leftRoom >= rightRoom && leftRoom >= ActualWidth) Left = area.Left + (leftRoom - ActualWidth) / 2;
+ else if (rightRoom >= ActualWidth) Left = n.Right + (rightRoom - ActualWidth) / 2;
+ }
}
public void Refresh()