Added requestedTheme option into terminal settings (#710)

* added requestedTheme option into terminal settings

* fix tabs to 4 spaces

* removed newline

* fix option requestedTheme not shown in profiles.json

* fix indentation

* fix indentation part 2

Co-Authored-By: Dustin L. Howett (MSFT) <duhowett@microsoft.com>
This commit is contained in:
Gabriele 2019-05-20 22:54:19 +02:00 committed by msftbot[bot]
parent 37ea2dce48
commit 0060614173
2 changed files with 8 additions and 5 deletions

View file

@ -96,6 +96,10 @@ ElementTheme GlobalAppSettings::GetRequestedTheme() const noexcept
return _requestedTheme;
}
void GlobalAppSettings::SetRequestedTheme(const ElementTheme requestedTheme) noexcept
{
_requestedTheme = requestedTheme;
}
#pragma region ExperimentalSettings
bool GlobalAppSettings::GetShowTabsInTitlebar() const noexcept
@ -147,11 +151,8 @@ JsonObject GlobalAppSettings::ToJson() const
jsonObject.Insert(SHOW_TABS_IN_TITLEBAR_KEY,
JsonValue::CreateBooleanValue(_showTabsInTitlebar));
if (_requestedTheme != ElementTheme::Default)
{
jsonObject.Insert(REQUESTED_THEME_KEY,
JsonValue::CreateStringValue(_SerializeTheme(_requestedTheme)));
}
jsonObject.Insert(REQUESTED_THEME_KEY,
JsonValue::CreateStringValue(_SerializeTheme(_requestedTheme)));
return jsonObject;
}

View file

@ -42,6 +42,8 @@ public:
bool GetShowTitleInTitlebar() const noexcept;
void SetShowTitleInTitlebar(const bool showTitleInTitlebar) noexcept;
void SetRequestedTheme(const winrt::Windows::UI::Xaml::ElementTheme requestedTheme) noexcept;
bool GetShowTabsInTitlebar() const noexcept;
void SetShowTabsInTitlebar(const bool showTabsInTitlebar) noexcept;