From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [45.144.208.40]) by lore.proxmox.com (Postfix) with ESMTPS id DAB501FF0AF for ; Fri, 06 Nov 2026 14:14:13 +0100 (CET) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id B4E99216D0; Fri, 06 Nov 2026 14:13:50 +0100 (CET) From: Christoph Heiss To: pve-devel@lists.proxmox.com Subject: [PATCH installer v5 17/23] tui: network: match form label style when enabling/disabling elements Date: Fri, 6 Nov 2026 14:10:46 +0100 Message-ID: <20261106131058.804870-18-c.heiss@proxmox.com> X-Mailer: git-send-email 2.56.0 In-Reply-To: <20261106131058.804870-1-c.heiss@proxmox.com> References: <20261106131058.804870-1-c.heiss@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1793970761727 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.151 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: 6ULQYNMWXGAW7R2LHSBR52D3LDKCZAYI X-Message-ID-Hash: 6ULQYNMWXGAW7R2LHSBR52D3LDKCZAYI X-MailFrom: c.heiss@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: This follows the GUI more closely by also changing the style of the labels to make them the same coloring as disabled interactive form elements. Suggested-by: Lukas Sichert Signed-off-by: Christoph Heiss --- Changes v4 -> v5: * new patch proxmox-tui-installer/src/views/mod.rs | 27 ++++++++++++++++++++++ proxmox-tui-installer/src/views/network.rs | 1 + 2 files changed, 28 insertions(+) diff --git a/proxmox-tui-installer/src/views/mod.rs b/proxmox-tui-installer/src/views/mod.rs index a73dde3..3a6a00d 100644 --- a/proxmox-tui-installer/src/views/mod.rs +++ b/proxmox-tui-installer/src/views/mod.rs @@ -520,6 +520,33 @@ impl FormView { } } + pub fn set_labels_enabled(&mut self, enabled: bool) { + let style = if enabled { + StyleType::primary() + } else { + StyleType::secondary() + }; + + let len = self.len(); + let view = self + .view + .get_child_mut(0) + .and_then(|v| v.downcast_mut::>()) + .map(|v| v.get_inner_mut()); + + if let Some(view) = view { + for i in 0..len { + let label = view + .get_child_mut(i) + .and_then(|v| v.downcast_mut::()); + + if let Some(label) = label { + label.set_style(style); + } + } + } + } + pub fn len(&self) -> usize { self.view .get_child(1) diff --git a/proxmox-tui-installer/src/views/network.rs b/proxmox-tui-installer/src/views/network.rs index f040881..b8f938c 100644 --- a/proxmox-tui-installer/src/views/network.rs +++ b/proxmox-tui-installer/src/views/network.rs @@ -365,6 +365,7 @@ impl InterfacePinningOptionsView { fn toggle_all(siv: &mut Cursive, enabled: bool) { siv.call_on_name(Self::FORM_NAME, |v: &mut FormView| { + v.set_labels_enabled(enabled); v.call_on_childs(&|v: &mut LinearLayout| { if let Some(v) = v .get_child_mut(1) -- 2.56.0