These are things I might need for #997
This commit is contained in:
parent
1ee3522cd8
commit
7fb7d64b91
|
@ -1014,6 +1014,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.
|
||||
|
|
|
@ -52,6 +52,7 @@ public:
|
|||
const bool lastFocused = false);
|
||||
|
||||
std::shared_ptr<Pane> GetActivePane();
|
||||
winrt::Windows::UI::Xaml::Controls::UserControl GetUserControl() const;
|
||||
winrt::Microsoft::Terminal::Control::TermControl GetTerminalControl() const;
|
||||
winrt::Microsoft::Terminal::Settings::Model::Profile GetFocusedProfile();
|
||||
|
||||
|
|
|
@ -430,7 +430,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();
|
||||
|
@ -1269,7 +1272,12 @@ namespace winrt::TerminalApp::implementation
|
|||
// - The tab's color, if any
|
||||
std::optional<winrt::Windows::UI::Color> TerminalTab::GetTabColor()
|
||||
{
|
||||
const auto currControlColor{ GetActiveTerminalControl().TabColor() };
|
||||
const auto& termControl{ GetActiveTerminalControl() };
|
||||
if (!termControl)
|
||||
{
|
||||
return std::nullopt;
|
||||
}
|
||||
const auto currControlColor{ termControl.TabColor() };
|
||||
std::optional<winrt::Windows::UI::Color> controlTabColor;
|
||||
if (currControlColor != nullptr)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue