diff --git a/app/Extra.cs b/app/Extra.cs index 4d7438c4..00493ca2 100644 --- a/app/Extra.cs +++ b/app/Extra.cs @@ -177,7 +177,7 @@ public Extra() numericBacklightPluggedTime.AccessibleName = Properties.Strings.BacklightTimeoutPlugged; numericBacklightTime.AccessibleName = Properties.Strings.BacklightTimeoutBattery; - comboKeyboardSpeed.AccessibleName = Properties.Strings.LaptopBacklight + " " +Properties.Strings.AnimationSpeed; + comboKeyboardSpeed.AccessibleName = Properties.Strings.LaptopBacklight + " " + Properties.Strings.AnimationSpeed; comboAPU.AccessibleName = Properties.Strings.LaptopBacklight + " " + Properties.Strings.AnimationSpeed; checkBoot.AccessibleName = Properties.Strings.Boot + " " + Properties.Strings.LaptopBacklight; @@ -371,6 +371,9 @@ public Extra() checkBootBar.Visible = false; checkSleepBar.Visible = false; checkShutdownBar.Visible = false; + + labelBacklightKeyboard.Visible = false; + checkBattery.Visible = false; } labelBacklightLid.Visible = false; @@ -388,10 +391,21 @@ public Extra() checkShutdownLogo.Visible = false; } - if (!AppConfig.IsBacklightZones()) + if (AppConfig.IsZ13()) { - labelBacklightKeyboard.Visible = false; - checkBattery.Visible = false; + labelBacklightBar.Visible = false; + checkAwakeBar.Visible = false; + checkBatteryBar.Visible = false; + checkBootBar.Visible = false; + checkSleepBar.Visible = false; + checkShutdownBar.Visible = false; + + labelBacklightLid.Visible = false; + checkAwakeLid.Visible = false; + checkBatteryLid.Visible = false; + checkBootLid.Visible = false; + checkSleepLid.Visible = false; + checkShutdownLid.Visible = false; } //checkAutoToggleClamshellMode.Visible = clamshellControl.IsExternalDisplayConnected(); @@ -504,12 +518,14 @@ private void InitACPITesting() private void ButtonACPISend_Click(object? sender, EventArgs e) { - try { + try + { int deviceID = Convert.ToInt32(textACPICommand.Text, 16); int status = Convert.ToInt32(textACPIParam.Text, textACPIParam.Text.Contains("x") ? 16 : 10); int result = Program.acpi.DeviceSet((uint)deviceID, status, "TestACPI " + deviceID.ToString("X8") + " " + status.ToString("X4")); labelACPITitle.Text = "ACPI DEVS Test : " + result.ToString(); - } catch (Exception ex) + } + catch (Exception ex) { Logger.WriteLine(ex.Message); } @@ -813,7 +829,7 @@ private void CheckPower_CheckedChanged(object? sender, EventArgs e) AppConfig.Set("keyboard_awake_bar_bat", (checkBatteryBar.Checked ? 1 : 0)); AppConfig.Set("keyboard_awake_lid_bat", (checkBatteryLid.Checked ? 1 : 0)); AppConfig.Set("keyboard_awake_logo_bat", (checkBatteryLogo.Checked ? 1 : 0)); - } + } Aura.ApplyPower(); @@ -836,7 +852,8 @@ private void Keyboard_Shown(object? sender, EventArgs e) { MaximumSize = new Size(Width, Program.settingsForm.Height); Top = Program.settingsForm.Top; - } else + } + else { Top = top; } diff --git a/app/USB/Aura.cs b/app/USB/Aura.cs index 95cc428b..0ca0d881 100644 --- a/app/USB/Aura.cs +++ b/app/USB/Aura.cs @@ -403,6 +403,15 @@ public static void ApplyPower() flags.SleepRear = AppConfig.IsNotFalse("keyboard_sleep_lid"); flags.ShutdownRear = AppConfig.IsNotFalse("keyboard_shutdown_lid"); + // On Z13 back panel light is controlled by mix of different flags, so merging them together + if (AppConfig.IsZ13()) + { + flags.AwakeBar = flags.AwakeLid = flags.AwakeLogo; + flags.BootBar = flags.BootLid = flags.BootLogo; + flags.SleepBar = flags.SleepLid = flags.SleepLogo; + flags.ShutdownBar = flags.ShutdownLid = flags.ShutdownLogo; + } + if (AppConfig.IsAlly()) { ApplyAllyPower(flags);