srdusr
aboutsummaryrefslogtreecommitdiffstats
path: root/crates/core/src/lock_config.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/core/src/lock_config.rs')
-rw-r--r--crates/core/src/lock_config.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/crates/core/src/lock_config.rs b/crates/core/src/lock_config.rs
index 92ba0d0..15e4637 100644
--- a/crates/core/src/lock_config.rs
+++ b/crates/core/src/lock_config.rs
@@ -18,6 +18,21 @@
#[derive(Debug, Clone, PartialEq)]
pub struct LockConfig {
pub box_bg: (u8, u8, u8),
+ /// How opaque the password box's own panel is, `0.0`-`1.0`.
+ ///
+ /// `0.0` by default: no panel, no border, no rounded rectangle - just
+ /// the password dots and status text over whatever the lock background
+ /// already is (the blurred wallpaper, or whatever the user set).
+ /// Reported live as "there is still a weird box where password is
+ /// typed. should just be the blurred background or whatever user set.
+ /// not that horrendus box".
+ ///
+ /// Raising it brings the panel back at that opacity, using `box_bg`
+ /// and `box_border` as before, for anyone who wants a solid field to
+ /// type into. It is a float rather than a bool so a faint scrim - the
+ /// usual compromise when a wallpaper is too busy to read text against
+ /// - is reachable without a second setting.
+ pub box_opacity: f32,
pub box_border: (u8, u8, u8),
pub text_color: (u8, u8, u8),
pub error_color: (u8, u8, u8),
@@ -59,6 +74,7 @@ impl Default for LockConfig {
fn default() -> Self {
Self {
box_bg: (0x2e, 0x34, 0x40), // Nord dark, matches ThemeConfig::titlebar_bg
+ box_opacity: 0.0, // no panel at all - see the field's own doc comment
box_border: (0x88, 0xc0, 0xd0), // Nord blue, matches ThemeConfig::default_border_color
text_color: (0xec, 0xef, 0xf4), // Nord light
error_color: (0xbf, 0x61, 0x6a), // Nord red, matches the theme's own `error` colour