mirror of
https://github.com/microsoft/terminal.git
synced 2026-04-08 23:31:03 +00:00
feature flags too
This commit is contained in:
@@ -1320,15 +1320,18 @@ namespace winrt::TerminalApp::implementation
|
||||
void TerminalPage::_HandleOpenScratchpad(const IInspectable& /*sender*/,
|
||||
const ActionEventArgs& args)
|
||||
{
|
||||
auto scratchPane{ winrt::make_self<ScratchpadContent>() };
|
||||
if (Feature_ScratchpadPane::IsEnabled())
|
||||
{
|
||||
auto scratchPane{ winrt::make_self<ScratchpadContent>() };
|
||||
|
||||
// This is maybe a little wacky - add our key event handler to the pane
|
||||
// we made. So that we can get actions for keys that the content didn't
|
||||
// handle.
|
||||
scratchPane->GetRoot().KeyDown({ this, &TerminalPage::_KeyDownHandler });
|
||||
// This is maybe a little wacky - add our key event handler to the pane
|
||||
// we made. So that we can get actions for keys that the content didn't
|
||||
// handle.
|
||||
scratchPane->GetRoot().KeyDown({ this, &TerminalPage::_KeyDownHandler });
|
||||
|
||||
auto resultPane = std::make_shared<Pane>(*scratchPane);
|
||||
_SplitPane(SplitDirection::Automatic, 0.5f, resultPane);
|
||||
args.Handled(true);
|
||||
auto resultPane = std::make_shared<Pane>(*scratchPane);
|
||||
_SplitPane(SplitDirection::Automatic, 0.5f, resultPane);
|
||||
args.Handled(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,7 +20,6 @@ namespace winrt::TerminalApp::implementation
|
||||
|
||||
auto res = Windows::UI::Xaml::Application::Current().Resources();
|
||||
auto bg = res.Lookup(winrt::box_value(L"UnfocusedBorderBrush"));
|
||||
// _root.Background(Media::SolidColorBrush{ winrt::Windows::UI::Colors::Red() });
|
||||
_root.Background(bg.try_as<Media::Brush>());
|
||||
|
||||
_box = winrt::Windows::UI::Xaml::Controls::TextBox{};
|
||||
|
||||
@@ -173,4 +173,14 @@
|
||||
</alwaysEnabledBrandingTokens>
|
||||
</feature>
|
||||
|
||||
<feature>
|
||||
<name>Feature_ScratchpadPane</name>
|
||||
<description>Allow the user to create scratchpad panes. Mostly just exists to validate non-terminal panes.</description>
|
||||
<id>997</id>
|
||||
<stage>AlwaysDisabled</stage>
|
||||
<alwaysEnabledBrandingTokens>
|
||||
<brandingToken>Dev</brandingToken>
|
||||
</alwaysEnabledBrandingTokens>
|
||||
</feature>
|
||||
|
||||
</featureStaging>
|
||||
|
||||
Reference in New Issue
Block a user