mirror of
https://github.com/alacritty/alacritty.git
synced 2024-11-18 13:55:23 -05:00
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:
c24d7dfd0d (diff-f92f0b1ad70a7b75b7266f3c9e569025e023d186814aa88c2b690800850ccb78L72-R73)
Fixes #5437.
This commit is contained in:
parent
62a1fad524
commit
ed76efe9c0
1 changed files with 3 additions and 3 deletions
|
@ -70,7 +70,7 @@ pub struct UiConfig {
|
||||||
|
|
||||||
/// Background opacity from 0.0 to 1.0.
|
/// Background opacity from 0.0 to 1.0.
|
||||||
#[config(deprecated = "use window.opacity instead")]
|
#[config(deprecated = "use window.opacity instead")]
|
||||||
window_opacity: Option<Percentage>,
|
background_opacity: Option<Percentage>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Default for UiConfig {
|
impl Default for UiConfig {
|
||||||
|
@ -85,7 +85,7 @@ impl Default for UiConfig {
|
||||||
config_paths: Default::default(),
|
config_paths: Default::default(),
|
||||||
key_bindings: Default::default(),
|
key_bindings: Default::default(),
|
||||||
mouse_bindings: Default::default(),
|
mouse_bindings: Default::default(),
|
||||||
window_opacity: Default::default(),
|
background_opacity: Default::default(),
|
||||||
bell: Default::default(),
|
bell: Default::default(),
|
||||||
colors: Default::default(),
|
colors: Default::default(),
|
||||||
draw_bold_text_with_bright_colors: Default::default(),
|
draw_bold_text_with_bright_colors: Default::default(),
|
||||||
|
@ -117,7 +117,7 @@ impl UiConfig {
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn window_opacity(&self) -> f32 {
|
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]
|
#[inline]
|
||||||
|
|
Loading…
Reference in a new issue