Ensure panel and pane sizes are integral (#8619)
Fixes: #8050 For some reason that we didn't investigate, if you have view caching enabled, and you have non-integer sized bounds, and you are right aligning things, the co-ordinates can differ by +/- 1px when using the cached view. The easiest fix for now is to just not do that. Co-Authored-By: Antonio <as-cii@zed.dev> Release Notes: - Fixed the pane icons flickering ([#8050](https://github.com/zed-industries/zed/issues/8050)). Co-authored-by: Antonio <as-cii@zed.dev>
This commit is contained in:
parent
db9cc42245
commit
b3b94e64ba
7 changed files with 9 additions and 8 deletions
|
@ -204,7 +204,7 @@ impl ChatPanel {
|
|||
let panel = Self::new(workspace, cx);
|
||||
if let Some(serialized_panel) = serialized_panel {
|
||||
panel.update(cx, |panel, cx| {
|
||||
panel.width = serialized_panel.width;
|
||||
panel.width = serialized_panel.width.map(|r| r.round());
|
||||
cx.notify();
|
||||
});
|
||||
}
|
||||
|
|
|
@ -327,7 +327,7 @@ impl CollabPanel {
|
|||
let panel = CollabPanel::new(workspace, cx);
|
||||
if let Some(serialized_panel) = serialized_panel {
|
||||
panel.update(cx, |panel, cx| {
|
||||
panel.width = serialized_panel.width;
|
||||
panel.width = serialized_panel.width.map(|w| w.round());
|
||||
panel.collapsed_channels = serialized_panel
|
||||
.collapsed_channels
|
||||
.unwrap_or_else(|| Vec::new())
|
||||
|
|
|
@ -183,7 +183,7 @@ impl NotificationPanel {
|
|||
let panel = Self::new(workspace, cx);
|
||||
if let Some(serialized_panel) = serialized_panel {
|
||||
panel.update(cx, |panel, cx| {
|
||||
panel.width = serialized_panel.width;
|
||||
panel.width = serialized_panel.width.map(|w| w.round());
|
||||
cx.notify();
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue