summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Duerr <contact@christianduerr.com>2021-08-23 15:47:34 +0000
committerGitHub <noreply@github.com>2021-08-23 18:47:34 +0300
commited76efe9c0b0f87ac90ac88fb8ce58e5f76e2f68 (patch)
tree9d6c6901818270afa42edc1fffa1335934825132
parent62a1fad524ebdf0592bb37aed76c2caac29a7f47 (diff)
downloadalacritty-ed76efe9c0b0f87ac90ac88fb8ce58e5f76e2f68.tar.gz
alacritty-ed76efe9c0b0f87ac90ac88fb8ce58e5f76e2f68.zip
Fix 'background_opacity' deprecation
During the deprecation of the 'background_opacity' field, it was incorrectly renamed to 'window_opacity'. This changes that back to ensure the old field still works and a warning is emitted accordingly. See the original regression here: https://github.com/alacritty/alacritty/commit/c24d7dfd0d2d8849f0398d7cb1a65d6562ee7a0d#diff-f92f0b1ad70a7b75b7266f3c9e569025e023d186814aa88c2b690800850ccb78L72-R73 Fixes #5437.
-rw-r--r--alacritty/src/config/ui_config.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/alacritty/src/config/ui_config.rs b/alacritty/src/config/ui_config.rs
index f0917cf5..3ce02161 100644
--- a/alacritty/src/config/ui_config.rs
+++ b/alacritty/src/config/ui_config.rs
@@ -70,7 +70,7 @@ pub struct UiConfig {
/// Background opacity from 0.0 to 1.0.
#[config(deprecated = "use window.opacity instead")]
- window_opacity: Option<Percentage>,
+ background_opacity: Option<Percentage>,
}
impl Default for UiConfig {
@@ -85,7 +85,7 @@ impl Default for UiConfig {
config_paths: Default::default(),
key_bindings: Default::default(),
mouse_bindings: Default::default(),
- window_opacity: Default::default(),
+ background_opacity: Default::default(),
bell: Default::default(),
colors: Default::default(),
draw_bold_text_with_bright_colors: Default::default(),
@@ -117,7 +117,7 @@ impl UiConfig {
#[inline]
pub fn window_opacity(&self) -> f32 {
- self.window_opacity.unwrap_or(self.window.opacity).as_f32()
+ self.background_opacity.unwrap_or(self.window.opacity).as_f32()
}
#[inline]