add a setting to control show/hide terminal button for status bar (#10593)

Release Notes:

- Added a setting to show/hide the terminal button in the status bar:
`{"terminal": {"button": false}}` to hide it. (#10513)

---------

Co-authored-by: Thorsten Ball <mrnugget@gmail.com>
This commit is contained in:
Hans 2024-04-16 15:40:32 +08:00 committed by GitHub
parent f3192b6fa6
commit 2cfb1ffa77
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 22 additions and 2 deletions

View file

@ -726,8 +726,10 @@ impl Panel for TerminalPanel {
"TerminalPanel"
}
fn icon(&self, _cx: &WindowContext) -> Option<IconName> {
Some(IconName::Terminal)
fn icon(&self, cx: &WindowContext) -> Option<IconName> {
TerminalSettings::get_global(cx)
.button
.then(|| IconName::Terminal)
}
fn icon_tooltip(&self, _cx: &WindowContext) -> Option<&'static str> {