These are things I might need for #997
This commit is contained in:
parent
0acb4d93bf
commit
b4fd3f3638
|
@ -1304,6 +1304,11 @@ TermControl Pane::GetTerminalControl() const
|
|||
return _IsLeaf() ? _control.try_as<TermControl>() : nullptr;
|
||||
}
|
||||
|
||||
Controls::UserControl Pane::GetUserControl() const
|
||||
{
|
||||
return _IsLeaf() ? _control : nullptr;
|
||||
}
|
||||
|
||||
// Method Description:
|
||||
// - Recursively remove the "Active" state from this Pane and all it's children.
|
||||
// - Updates our visuals to match our new state, including highlighting our borders.
|
||||
|
|
|
@ -66,9 +66,10 @@ public:
|
|||
const bool lastFocused = false);
|
||||
|
||||
std::shared_ptr<Pane> GetActivePane();
|
||||
winrt::Microsoft::Terminal::Control::TermControl GetLastFocusedTerminalControl();
|
||||
winrt::Windows::UI::Xaml::Controls::UserControl GetUserControl() const;
|
||||
winrt::Microsoft::Terminal::Control::TermControl GetTerminalControl() const;
|
||||
winrt::Microsoft::Terminal::Settings::Model::Profile GetFocusedProfile();
|
||||
winrt::Microsoft::Terminal::Control::TermControl GetLastFocusedTerminalControl();
|
||||
|
||||
// Method Description:
|
||||
// - If this is a leaf pane, return its profile.
|
||||
|
|
|
@ -437,7 +437,10 @@ namespace winrt::TerminalApp::implementation
|
|||
winrt::fire_and_forget TerminalTab::Scroll(const int delta)
|
||||
{
|
||||
auto control = GetActiveTerminalControl();
|
||||
|
||||
if (!control)
|
||||
{
|
||||
co_return;
|
||||
}
|
||||
co_await winrt::resume_foreground(control.Dispatcher());
|
||||
|
||||
const auto currentOffset = control.ScrollOffset();
|
||||
|
@ -1341,6 +1344,13 @@ namespace winrt::TerminalApp::implementation
|
|||
// - The tab's color, if any
|
||||
std::optional<winrt::Windows::UI::Color> TerminalTab::GetTabColor()
|
||||
{
|
||||
const auto& termControl{ GetActiveTerminalControl() };
|
||||
if (!termControl)
|
||||
{
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
const auto currControlColor{ termControl.TabColor() };
|
||||
std::optional<winrt::Windows::UI::Color> controlTabColor;
|
||||
if (const auto& control = GetActiveTerminalControl())
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue