Add ability to hide status bar (#38974)
This pull request adds the ability to configure the setting to hide or show the status bar, as described in discussion: https://github.com/zed-industries/zed/discussions/38591 --------- Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
This commit is contained in:
co-authored by
Conrad Irwin
parent
6f4381b39d
commit
126ed6fbdd
@@ -1,11 +1,11 @@
|
||||
use editor::{Editor, EditorSettings};
|
||||
use editor::Editor;
|
||||
use gpui::{
|
||||
Context, Entity, IntoElement, ParentElement, Render, Subscription, WeakEntity, Window, div,
|
||||
};
|
||||
use language::LanguageName;
|
||||
use settings::Settings as _;
|
||||
use ui::{Button, ButtonCommon, Clickable, FluentBuilder, LabelSize, Tooltip};
|
||||
use workspace::{StatusItemView, Workspace, item::ItemHandle};
|
||||
use workspace::{StatusBarSettings, StatusItemView, Workspace, item::ItemHandle};
|
||||
|
||||
use crate::{LanguageSelector, Toggle};
|
||||
|
||||
@@ -40,10 +40,7 @@ impl ActiveBufferLanguage {
|
||||
|
||||
impl Render for ActiveBufferLanguage {
|
||||
fn render(&mut self, _: &mut Window, cx: &mut Context<Self>) -> impl IntoElement {
|
||||
if !EditorSettings::get_global(cx)
|
||||
.status_bar
|
||||
.active_language_button
|
||||
{
|
||||
if !StatusBarSettings::get_global(cx).active_language_button {
|
||||
return div();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user