From 82f5afa278e91c9a41f5df090e1df0f8c96d0aa3 Mon Sep 17 00:00:00 2001 From: IceStormNG Date: Mon, 25 Sep 2023 14:31:23 +0200 Subject: [PATCH] Only show battery percentage when the mouse has a battery. --- app/Settings.cs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/app/Settings.cs b/app/Settings.cs index f8b46904..5b86241a 100644 --- a/app/Settings.cs +++ b/app/Settings.cs @@ -1136,8 +1136,16 @@ namespace GHelper if (m.IsDeviceReady) { - b.Text = m.GetDisplayName() + "\n" + m.Battery + "%" - + (m.Charging ? "(" + Properties.Strings.Charging + ")" : ""); + if (m.HasBattery()) + { + b.Text = m.GetDisplayName() + "\n" + m.Battery + "%" + + (m.Charging ? "(" + Properties.Strings.Charging + ")" : ""); + } + else + { + b.Text = m.GetDisplayName(); + } + } else {