Add ability to hide status bar (#39430)
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 The original [PR #38974](https://github.com/zed-industries/zed/pull/38974#issuecomment-3362020879) was merged but reverted due to hidden conflicts. As per @ConradIrwin 's [request](https://github.com/zed-industries/zed/pull/38974#issuecomment-3362020879), I am recreating the PR on top of updated main branch. Release Notes: - Added an experimental setting `"status_bar": { "experimental.show": false}` to hide the status bars. --------- Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
This commit is contained in:
co-authored by
Conrad Irwin
parent
55e68553a4
commit
d9c7f44b0b
@@ -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