Adds a way to toggle font size without settings adjustments (#24857)
Closes https://github.com/zed-industries/zed/issues/23505 Now `zed::IncreaseBufferFontSize` (and all the same UI- and Buffer-related settings) action is parameterized with `{ "persist": true }` (default). Using `"persist": false` brings back resizing behavior prior to https://github.com/zed-industries/zed/pull/23265 Release Notes: - Added a way to toggle font size without settings adjustments
This commit is contained in:
parent
2f734cbd5e
commit
3b91de8003
17 changed files with 251 additions and 80 deletions
|
@ -38,6 +38,48 @@ actions!(
|
|||
Extensions,
|
||||
OpenLicenses,
|
||||
OpenTelemetryLog,
|
||||
]
|
||||
);
|
||||
|
||||
#[derive(PartialEq, Clone, Default, Debug, Deserialize, JsonSchema)]
|
||||
pub struct DecreaseBufferFontSize {
|
||||
#[serde(default)]
|
||||
pub persist: bool,
|
||||
}
|
||||
|
||||
#[derive(PartialEq, Clone, Default, Debug, Deserialize, JsonSchema)]
|
||||
pub struct IncreaseBufferFontSize {
|
||||
#[serde(default)]
|
||||
pub persist: bool,
|
||||
}
|
||||
|
||||
#[derive(PartialEq, Clone, Default, Debug, Deserialize, JsonSchema)]
|
||||
pub struct ResetBufferFontSize {
|
||||
#[serde(default)]
|
||||
pub persist: bool,
|
||||
}
|
||||
|
||||
#[derive(PartialEq, Clone, Default, Debug, Deserialize, JsonSchema)]
|
||||
pub struct DecreaseUiFontSize {
|
||||
#[serde(default)]
|
||||
pub persist: bool,
|
||||
}
|
||||
|
||||
#[derive(PartialEq, Clone, Default, Debug, Deserialize, JsonSchema)]
|
||||
pub struct IncreaseUiFontSize {
|
||||
#[serde(default)]
|
||||
pub persist: bool,
|
||||
}
|
||||
|
||||
#[derive(PartialEq, Clone, Default, Debug, Deserialize, JsonSchema)]
|
||||
pub struct ResetUiFontSize {
|
||||
#[serde(default)]
|
||||
pub persist: bool,
|
||||
}
|
||||
|
||||
impl_actions!(
|
||||
zed,
|
||||
[
|
||||
DecreaseBufferFontSize,
|
||||
IncreaseBufferFontSize,
|
||||
ResetBufferFontSize,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue