forked from mirrors/gecko-dev
Bug 1812289 - Enable CSD titlebar more by default. r=stransky
It works well on KDE and others, so try to enable it unconditionally for consistency, specially given stuff like the native titlebar context menu etc works (bug 1771950). Now that the titlebar setting is a tri-state, the hidden pref doesn't make particular sense either, browser.tabs.inTitlebar=1 would have the same effect. Differential Revision: https://phabricator.services.mozilla.com/D167796
This commit is contained in:
parent
91357fa690
commit
c997602a07
1 changed files with 1 additions and 19 deletions
|
|
@ -2075,25 +2075,7 @@ char16_t nsLookAndFeel::GetPasswordCharacterImpl() {
|
||||||
|
|
||||||
bool nsLookAndFeel::GetEchoPasswordImpl() { return false; }
|
bool nsLookAndFeel::GetEchoPasswordImpl() { return false; }
|
||||||
|
|
||||||
bool nsLookAndFeel::GetDefaultDrawInTitlebar() {
|
bool nsLookAndFeel::GetDefaultDrawInTitlebar() { return sCSDAvailable; }
|
||||||
static bool drawInTitlebar = []() {
|
|
||||||
// When user defined widget.default-hidden-titlebar don't do any
|
|
||||||
// heuristics and just follow it.
|
|
||||||
if (Preferences::HasUserValue("widget.default-hidden-titlebar")) {
|
|
||||||
return Preferences::GetBool("widget.default-hidden-titlebar", false);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Don't hide titlebar when it's disabled on current desktop.
|
|
||||||
if (!sCSDAvailable) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// We hide system titlebar on Gnome/ElementaryOS without any restriction.
|
|
||||||
return IsGnomeDesktopEnvironment() ||
|
|
||||||
FindInReadable("pantheon"_ns, GetDesktopEnvironmentIdentifier());
|
|
||||||
}();
|
|
||||||
return drawInTitlebar;
|
|
||||||
}
|
|
||||||
|
|
||||||
void nsLookAndFeel::GetThemeInfo(nsACString& aInfo) {
|
void nsLookAndFeel::GetThemeInfo(nsACString& aInfo) {
|
||||||
aInfo.Append(mSystemTheme.mName);
|
aInfo.Append(mSystemTheme.mName);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue