dd5dbb2a40
- Implements the Delta E algorithm - Uses the Delta E algorithm to precalculate adjusted foreground values based on possible foreground/background color pairs in the color table - Adds a setting to use the adjusted foreground values when applicable ## PR Checklist * [x] Closes #2638 * [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. * [x] I work here ## Validation Steps Performed Before: <img width="759" alt="color before" src="https://user-images.githubusercontent.com/26824113/131576768-b3b9eebd-5933-45de-8da8-88a985070312.png"> After (note dark blue): <img width="760" alt="color after" src="https://user-images.githubusercontent.com/26824113/133158807-4e63198f-8a49-4d03-914e-55a5ad57d725.png">
58 lines
2.3 KiB
Plaintext
58 lines
2.3 KiB
Plaintext
// Copyright (c) Microsoft Corporation.
|
|
// Licensed under the MIT license.
|
|
|
|
import "Profile.idl";
|
|
#include "IInheritable.idl.h"
|
|
|
|
#define INHERITABLE_APPEARANCE_SETTING(Type, Name) \
|
|
_BASE_INHERITABLE_SETTING(Type, Name); \
|
|
Microsoft.Terminal.Settings.Model.IAppearanceConfig Name##OverrideSource { get; }
|
|
|
|
namespace Microsoft.Terminal.Settings.Model
|
|
{
|
|
[flags] enum ConvergedAlignment {
|
|
// low 4 bits are the horizontal
|
|
Horizontal_Center = 0x00,
|
|
Horizontal_Left = 0x01,
|
|
Horizontal_Right = 0x02,
|
|
|
|
// high 4 bits are the vertical
|
|
Vertical_Center = 0x00,
|
|
Vertical_Top = 0x10,
|
|
Vertical_Bottom = 0x20
|
|
};
|
|
|
|
[flags]
|
|
enum IntenseStyle
|
|
{
|
|
Bold = 0x1,
|
|
Bright = 0x2,
|
|
All = 0xffffffff
|
|
};
|
|
|
|
interface IAppearanceConfig
|
|
{
|
|
Microsoft.Terminal.Settings.Model.Profile SourceProfile { get; };
|
|
INHERITABLE_APPEARANCE_SETTING(String, ColorSchemeName);
|
|
INHERITABLE_APPEARANCE_SETTING(Windows.Foundation.IReference<Microsoft.Terminal.Core.Color>, Foreground);
|
|
INHERITABLE_APPEARANCE_SETTING(Windows.Foundation.IReference<Microsoft.Terminal.Core.Color>, Background);
|
|
INHERITABLE_APPEARANCE_SETTING(Windows.Foundation.IReference<Microsoft.Terminal.Core.Color>, SelectionBackground);
|
|
INHERITABLE_APPEARANCE_SETTING(Windows.Foundation.IReference<Microsoft.Terminal.Core.Color>, CursorColor);
|
|
INHERITABLE_APPEARANCE_SETTING(Microsoft.Terminal.Core.CursorStyle, CursorShape);
|
|
INHERITABLE_APPEARANCE_SETTING(UInt32, CursorHeight);
|
|
|
|
INHERITABLE_APPEARANCE_SETTING(String, BackgroundImagePath);
|
|
String ExpandedBackgroundImagePath { get; };
|
|
|
|
INHERITABLE_APPEARANCE_SETTING(Double, BackgroundImageOpacity);
|
|
INHERITABLE_APPEARANCE_SETTING(Windows.UI.Xaml.Media.Stretch, BackgroundImageStretchMode);
|
|
INHERITABLE_APPEARANCE_SETTING(ConvergedAlignment, BackgroundImageAlignment);
|
|
|
|
INHERITABLE_APPEARANCE_SETTING(Boolean, RetroTerminalEffect);
|
|
INHERITABLE_APPEARANCE_SETTING(String, PixelShaderPath);
|
|
INHERITABLE_APPEARANCE_SETTING(IntenseStyle, IntenseTextStyle);
|
|
INHERITABLE_APPEARANCE_SETTING(Boolean, AdjustIndistinguishableColors);
|
|
INHERITABLE_APPEARANCE_SETTING(Double, Opacity);
|
|
};
|
|
}
|