From 703e349fd3609b4382f1d9a1d80ffc44355e9350 Mon Sep 17 00:00:00 2001 From: Ian O'Neill Date: Mon, 4 Oct 2021 13:42:46 +0100 Subject: [PATCH] Ensure "Reset to inherited value" button works for opacity (#11391) ## Summary of the Pull Request Fixes the "Reset to inherited value" button for the opacity slider and removes the unwanted padding between the header and the control. ## PR Checklist * [x] Closes #11352 * [x] CLA signed. If not, go over [here](https://cla.opensource.microsoft.com/microsoft/Terminal) and sign the CLA * [ ] Tests added/passed * [ ] Documentation updated. If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/terminal) and link it here: #xxx * [ ] Schema updated. * [ ] I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #xxx ## Validation Steps Performed Manually tested --- src/cascadia/TerminalSettingsEditor/Profiles.h | 4 ++-- src/cascadia/TerminalSettingsEditor/Profiles.xaml | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/cascadia/TerminalSettingsEditor/Profiles.h b/src/cascadia/TerminalSettingsEditor/Profiles.h index 54d7d4108..74c31e49a 100644 --- a/src/cascadia/TerminalSettingsEditor/Profiles.h +++ b/src/cascadia/TerminalSettingsEditor/Profiles.h @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft Corporation. +// Copyright (c) Microsoft Corporation. // Licensed under the MIT license. #pragma once @@ -22,7 +22,7 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation void SetAcrylicOpacityPercentageValue(double value) { - _profile.DefaultAppearance().Opacity(winrt::Microsoft::Terminal::Settings::Editor::Converters::PercentageValueToPercentage(value)); + Opacity(winrt::Microsoft::Terminal::Settings::Editor::Converters::PercentageValueToPercentage(value)); }; void SetPadding(double value) diff --git a/src/cascadia/TerminalSettingsEditor/Profiles.xaml b/src/cascadia/TerminalSettingsEditor/Profiles.xaml index 0208a8065..945001efe 100644 --- a/src/cascadia/TerminalSettingsEditor/Profiles.xaml +++ b/src/cascadia/TerminalSettingsEditor/Profiles.xaml @@ -249,6 +249,7 @@