Set diagnostic width based on ems (#28936)
Closes #ISSUE Release Notes: - N/A *or* Added/Fixed/Improved ...
This commit is contained in:
parent
ad25cd09b6
commit
ded1c7012c
1 changed files with 3 additions and 2 deletions
|
@ -15,7 +15,7 @@ use text::{AnchorRangeExt, Point};
|
|||
use theme::ThemeSettings;
|
||||
use ui::{
|
||||
ActiveTheme, AnyElement, App, Context, IntoElement, ParentElement, SharedString, Styled,
|
||||
Window, div, px,
|
||||
Window, div,
|
||||
};
|
||||
use util::maybe;
|
||||
|
||||
|
@ -166,7 +166,8 @@ impl DiagnosticBlock {
|
|||
pub fn render_block(&self, editor: WeakEntity<Editor>, bcx: &BlockContext) -> AnyElement {
|
||||
let cx = &bcx.app;
|
||||
let status_colors = bcx.app.theme().status();
|
||||
let max_width = px(600.);
|
||||
|
||||
let max_width = bcx.em_width * 100.;
|
||||
|
||||
let (background_color, border_color) = match self.severity {
|
||||
DiagnosticSeverity::ERROR => (status_colors.error_background, status_colors.error),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue