Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions Ink Canvas/MainWindow_cs/MW_Notification.cs
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,9 @@ private void ApplyDynamicNotificationPlacement(NotificationMessage message = nul
case "FloatingBarAbove":
ApplyDynamicNotificationFloatingBarPlacement();
break;
case "BottomBarAbove":
ApplyDynamicNotificationBottomBarPlacement();

@augmentcode augmentcode Bot Oct 6, 2026 •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At Ink Canvas/MainWindow_cs/MW_Notification.cs:188, consider entering whiteboard mode while a notification is already visible: ApplyDynamicNotificationPlacement runs only when a notification is requested, and SwitchBackground never recalculates its margin. The notification therefore remains at the desktop floating-toolbar coordinates instead of moving above BlackboardCenterSide, and similarly retains the whiteboard position on exit.

Severity: medium

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

break;
}
}

Expand Down Expand Up @@ -219,6 +222,54 @@ private void ApplyDynamicNotificationFloatingBarPlacement()
}
}

private void ApplyDynamicNotificationBottomBarPlacement()
{
if (DynamicNotification == null || ViewboxFloatingBar == null)
{
return;
}
try
{
if(ViewboxFloatingBar.Visibility == Visibility.Visible)
{
//这里浮动栏是在的,直接采用浮动栏上方的计算方法
ApplyDynamicNotificationFloatingBarPlacement();
return;
}
else
{
if(isFloatingBarFolded && BlackboardCenterSide.Visibility!=Visibility.Visible || BlackboardCenterSide.ActualWidth < 1 || BlackboardCenterSide.ActualHeight < 1)
{
//这时的情况应是点击了浮动栏隐藏或白板未完成布局,直接顶部居中
DynamicNotification.HorizontalAlignment = HorizontalAlignment.Center;
DynamicNotification.VerticalAlignment = VerticalAlignment.Top;
DynamicNotification.Margin = new Thickness(0);
return;
}
if (BlackboardCenterSide.Visibility == Visibility.Visible)
{
//进白板了
var topLeft = BlackboardCenterSide.TranslatePoint(new Point(0, 0), this);
var bottomRight = BlackboardCenterSide.TranslatePoint(
new Point(BlackboardCenterSide.ActualWidth, BlackboardCenterSide.ActualHeight), this);
double notificationWidth = DynamicNotification.ActualWidth > 0 ? DynamicNotification.ActualWidth : DynamicNotification.Width;
double notificationHeight = DynamicNotification.ActualHeight > 0 ? DynamicNotification.ActualHeight : 72;

@augmentcode augmentcode Bot Oct 6, 2026 •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At Ink Canvas/MainWindow_cs/MW_Notification.cs:256, consider a ForcePopup notification or clicking to expand one in whiteboard mode: placement runs before DynamicNotification.Show populates the control, and subsequent size changes never recalculate this margin. Using the previous message's height or 72 means expanded content can overlap the bottom toolbar and be clipped at the window's lower edge.

Severity: medium

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

double left = (topLeft.X + bottomRight.X) / 2 - notificationWidth / 2;
double top = topLeft.Y - notificationHeight - 12;
left = Math.Max(12, Math.Min(ActualWidth - notificationWidth - 12, left));
top = Math.Max(12, top);

DynamicNotification.HorizontalAlignment = HorizontalAlignment.Left;
DynamicNotification.VerticalAlignment = VerticalAlignment.Top;
DynamicNotification.Margin = new Thickness(left, top, 0, 0);
}
}
}
catch
{

}
}
private void OnAnnouncementUnreadCountChanged()
{
if (_startupUnreadNotificationShown) return;
Expand Down
2 changes: 2 additions & 0 deletions Ink Canvas/Properties/NotificationStrings.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion Ink Canvas/Properties/NotificationStrings.en-US.resx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<root>
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
Expand Down Expand Up @@ -150,6 +150,9 @@
<data name="PlacementFloatingBarAbove" xml:space="preserve">
<value>Above floating toolbar</value>
</data>
<data name="PlacementBottomBarAbove" xml:space="preserve">
<value>Above bottom bar</value>
</data>
<data name="Provider_Announcement" xml:space="preserve">
<value>Announcement provider</value>
</data>
Expand Down
5 changes: 4 additions & 1 deletion Ink Canvas/Properties/NotificationStrings.resx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<root>
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
Expand Down Expand Up @@ -150,6 +150,9 @@
<data name="PlacementFloatingBarAbove" xml:space="preserve">
<value>浮动栏上方</value>
</data>
<data name="PlacementBottomBarAbove" xml:space="preserve">
<value>底栏上方</value>
</data>
<data name="Provider_Announcement" xml:space="preserve">
<value>公告提供商</value>
</data>
Expand Down
3 changes: 3 additions & 0 deletions Ink Canvas/Properties/NotificationStrings.zh-ME.resx
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,9 @@
<data name="PlacementFloatingBarAbove" xml:space="preserve">
<value>浮动栏上方</value>
</data>
<data name="PlacementBottomBarAbove" xml:space="preserve">
<value>底栏上方</value>
</data>
<data name="Provider_Announcement" xml:space="preserve">
<value>公告提供商</value>
</data>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@
<ComboBoxItem Content="{x:Static props:NotificationStrings.PlacementTopRight}" Tag="TopRight" />
<ComboBoxItem Content="{x:Static props:NotificationStrings.PlacementTopLeft}" Tag="TopLeft" />
<ComboBoxItem Content="{x:Static props:NotificationStrings.PlacementFloatingBarAbove}" Tag="FloatingBarAbove" />
<ComboBoxItem Content="{x:Static props:NotificationStrings.PlacementBottomBarAbove}" Tag="BottomBarAbove" />
</ComboBox>
</ui:SettingsCard>

Expand Down
Loading