From 7921b723fcbae20eb4e0d9f9340c4bf2e271d2c2 Mon Sep 17 00:00:00 2001 From: Laurent Montel Date: Fri, 3 Oct 2025 15:18:15 +0200 Subject: [PATCH] If lineedit is disabled don't allow to show password or switching state. --- internal/compiler/widgets/cosmic/lineedit.slint | 2 +- internal/compiler/widgets/cupertino/lineedit.slint | 2 +- internal/compiler/widgets/fluent/lineedit.slint | 2 +- internal/compiler/widgets/material/lineedit.slint | 2 +- internal/compiler/widgets/qt/lineedit.slint | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/internal/compiler/widgets/cosmic/lineedit.slint b/internal/compiler/widgets/cosmic/lineedit.slint index 7b94b285931..fd3a147d2aa 100644 --- a/internal/compiler/widgets/cosmic/lineedit.slint +++ b/internal/compiler/widgets/cosmic/lineedit.slint @@ -94,7 +94,7 @@ export component LineEdit { } } - if root.input-type == InputType.password: LineEditPasswordIcon { + if root.input-type == InputType.password && root.enabled: LineEditPasswordIcon { width: self.source.width * 1px; show-password-image: @image-url("_view_reveal.svg"); hide-password-image: @image-url("_view_conceal.svg"); diff --git a/internal/compiler/widgets/cupertino/lineedit.slint b/internal/compiler/widgets/cupertino/lineedit.slint index 2dd39856695..ef271d8b6ba 100644 --- a/internal/compiler/widgets/cupertino/lineedit.slint +++ b/internal/compiler/widgets/cupertino/lineedit.slint @@ -99,7 +99,7 @@ export component LineEdit { horizontal-stretch: 1; } - if root.input-type == InputType.password: LineEditPasswordIcon { + if root.input-type == InputType.password && root.enabled: LineEditPasswordIcon { width: self.source.width * 1px; show-password-image: @image-url("_visibility.svg"); hide-password-image: @image-url("_visibility_off.svg"); diff --git a/internal/compiler/widgets/fluent/lineedit.slint b/internal/compiler/widgets/fluent/lineedit.slint index c1a45af60cb..7c20cc1a6bc 100644 --- a/internal/compiler/widgets/fluent/lineedit.slint +++ b/internal/compiler/widgets/fluent/lineedit.slint @@ -104,7 +104,7 @@ export component LineEdit { } } - if root.input-type == InputType.password && !root.text.is-empty && root.has-focus: LineEditPasswordIcon { + if root.input-type == InputType.password && !root.text.is-empty && root.has-focus && root.enabled: LineEditPasswordIcon { width: self.source.width * 1px; show-password-image: @image-url("_eye_show.svg"); hide-password-image: @image-url("_eye_hide.svg"); diff --git a/internal/compiler/widgets/material/lineedit.slint b/internal/compiler/widgets/material/lineedit.slint index cd689994148..22ebfc3b39a 100644 --- a/internal/compiler/widgets/material/lineedit.slint +++ b/internal/compiler/widgets/material/lineedit.slint @@ -96,7 +96,7 @@ export component LineEdit { } } - if root.input-type == InputType.password: LineEditPasswordIcon { + if root.input-type == InputType.password && root.enabled: LineEditPasswordIcon { width: self.source.width * 1px; show-password-image: @image-url("_visibility.svg"); hide-password-image: @image-url("_visibility_off.svg"); diff --git a/internal/compiler/widgets/qt/lineedit.slint b/internal/compiler/widgets/qt/lineedit.slint index fda44a74033..5c0bdf531bc 100644 --- a/internal/compiler/widgets/qt/lineedit.slint +++ b/internal/compiler/widgets/qt/lineedit.slint @@ -91,7 +91,7 @@ export component LineEdit { } } - if root.input-type == InputType.password && !root.text.is-empty && root.has-focus: LineEditPasswordIcon { + if root.input-type == InputType.password && !root.text.is-empty && root.has-focus && root.enabled: LineEditPasswordIcon { width: self.source.width * 1px; show-password-image: @image-url("_visibility.svg"); hide-password-image: @image-url("_visibility_off.svg");