Add scrollbars to markdown preview and syntax tree view (#38183)
Closes https://github.com/zed-industries/zed/issues/38141 This PR adds default scrollbars to the markdown preview and syntax tree view. Release Notes: - Added scrollbars to the markdown preview and syntax tree view.
This commit is contained in:
@@ -13,7 +13,7 @@ use gpui::{
|
||||
use language::LanguageRegistry;
|
||||
use settings::Settings;
|
||||
use theme::ThemeSettings;
|
||||
use ui::prelude::*;
|
||||
use ui::{WithScrollbar, prelude::*};
|
||||
use workspace::item::{Item, ItemHandle};
|
||||
use workspace::{Pane, Workspace};
|
||||
|
||||
@@ -481,7 +481,7 @@ impl Item for MarkdownPreviewView {
|
||||
}
|
||||
|
||||
impl Render for MarkdownPreviewView {
|
||||
fn render(&mut self, _window: &mut Window, cx: &mut Context<Self>) -> impl IntoElement {
|
||||
fn render(&mut self, window: &mut Window, cx: &mut Context<Self>) -> impl IntoElement {
|
||||
let buffer_size = ThemeSettings::get_global(cx).buffer_font_size(cx);
|
||||
let buffer_line_height = ThemeSettings::get_global(cx).buffer_line_height;
|
||||
|
||||
@@ -598,5 +598,6 @@ impl Render for MarkdownPreviewView {
|
||||
.size_full(),
|
||||
)
|
||||
}))
|
||||
.vertical_scrollbar_for(self.list_state.clone(), window, cx)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user