624a553d23
This commit introduces a context menu for Tab and a new item, "Color...", which will display a color picker. A flyout menu, containing a custom flyout, is attached to each tab. The flyout displays a palette of 16 preset colors and includes a color picker. When the user selects or clears color, an event is fired, which is intercepted by the tab to which the flyout belongs. The changing of the color is achieved by putting the selected color in the resource dictionary of the tab, using well-defined dictionary keys (e.g. TabViewItemHeaderBackground). Afterwards the visual state of the tab is toggled, so that the color change is visible immediately. Custom-colored tabs will be desaturated (somewhat) by alpha blending them with the tab bar background. The flyout menu also contains a 'Close' flyout item. ## Validation Steps Performed I've validated the behavior manually: start the program via the start menu. Right click on the tab -> Choose a tab color. The color flyout is going to be shown. Click a color swatch or click 'Select a custom color' to use the color picker. Use the 'Clear the current color' to remove the custom color. Closes #2994. References #3327.
13 lines
364 B
Plaintext
13 lines
364 B
Plaintext
namespace TerminalApp
|
|
{
|
|
delegate void ColorSelectedArgs(Windows.UI.Color color);
|
|
delegate void ColorClearedArgs();
|
|
|
|
[default_interface] runtimeclass ColorPickupFlyout : Windows.UI.Xaml.Controls.Flyout
|
|
{
|
|
ColorPickupFlyout();
|
|
event ColorSelectedArgs ColorSelected;
|
|
event ColorClearedArgs ColorCleared;
|
|
}
|
|
}
|