Restyle notification close control (#30262)
Follow-up of https://github.com/zed-industries/zed/pull/30015 Merges suppress and close buttons into one, with `shift` changing the state and showing different tooltips. Currently, there's no tooltip for notification suppress action, hence none is displayed in the video: https://github.com/user-attachments/assets/678c4d76-a86e-4fe9-8d7b-92996470a8a8 Release Notes: - N/A
This commit is contained in:
parent
93b88a905a
commit
203cb7a7a2
4 changed files with 123 additions and 77 deletions
|
@ -5729,6 +5729,11 @@ impl Render for Workspace {
|
|||
|
||||
let theme = cx.theme().clone();
|
||||
let colors = theme.colors();
|
||||
let notification_entities = self
|
||||
.notifications
|
||||
.iter()
|
||||
.map(|(_, notification)| notification.entity_id())
|
||||
.collect::<Vec<_>>();
|
||||
|
||||
client_side_decorations(
|
||||
self.actions(div(), window, cx)
|
||||
|
@ -5744,6 +5749,11 @@ impl Render for Workspace {
|
|||
.text_color(colors.text)
|
||||
.overflow_hidden()
|
||||
.children(self.titlebar_item.clone())
|
||||
.on_modifiers_changed(move |_, _, cx| {
|
||||
for &id in ¬ification_entities {
|
||||
cx.notify(id);
|
||||
}
|
||||
})
|
||||
.child(
|
||||
div()
|
||||
.size_full()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue