зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1857743 - Move system-accent-color-in-tabs pref to the front-end. r=desktop-theme-reviewers,win-reviewers,dao,rkraesig
Differential Revision: https://phabricator.services.mozilla.com/D190952
This commit is contained in:
Родитель
1783790bfe
Коммит
4f9476fe27
|
@ -163,6 +163,7 @@
|
|||
|
||||
#navigator-toolbox {
|
||||
appearance: none;
|
||||
|
||||
/* Toolbar / content area border */
|
||||
border-bottom: 1px solid var(--chrome-content-separator-color);
|
||||
|
||||
|
|
|
@ -30,21 +30,29 @@
|
|||
}
|
||||
}
|
||||
|
||||
@media not (prefers-contrast) {
|
||||
/* Use a different color in inactive windows. */
|
||||
#toolbar-menubar:not(:-moz-lwtheme):-moz-window-inactive {
|
||||
color: ThreeDShadow;
|
||||
@media (-moz-windows-accent-color-in-titlebar) {
|
||||
:root[tabsintitlebar] {
|
||||
@media (-moz-windows-accent-color-in-tabs) {
|
||||
--toolbox-non-lwt-bgcolor: ActiveCaption;
|
||||
--toolbox-non-lwt-textcolor: CaptionText;
|
||||
--toolbox-non-lwt-bgcolor-inactive: InactiveCaption;
|
||||
--toolbox-non-lwt-textcolor-inactive: InactiveCaptionText;
|
||||
}
|
||||
|
||||
@media (-moz-windows-accent-color-in-titlebar) {
|
||||
:root[sizemode=normal][tabsintitlebar] #navigator-toolbox {
|
||||
&[sizemode="normal"] #navigator-toolbox {
|
||||
border-top: .5px solid ActiveBorder;
|
||||
|
||||
&:-moz-window-inactive {
|
||||
border-top-color: InactiveBorder;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media not (prefers-contrast) {
|
||||
/* Use a different color in inactive windows. */
|
||||
#toolbar-menubar:not(:-moz-lwtheme):-moz-window-inactive {
|
||||
color: ThreeDShadow;
|
||||
}
|
||||
|
||||
:root[tabsintitlebar] .tab-label-container:-moz-window-inactive {
|
||||
/* Calculated to match the opacity change of Windows Explorer
|
||||
|
|
|
@ -1497,6 +1497,14 @@
|
|||
mirror: always
|
||||
rust: true
|
||||
|
||||
# Whether the firefox titlebar respects the
|
||||
# -moz-windows-accent-color-in-titlebar setting on the tab strip.
|
||||
- name: browser.theme.windows.accent-color-in-tabs.enabled
|
||||
type: RelaxedAtomicBool
|
||||
value: false
|
||||
mirror: always
|
||||
rust: true
|
||||
|
||||
# Blocked plugin content
|
||||
- name: browser.safebrowsing.blockedURIs.enabled
|
||||
type: bool
|
||||
|
@ -15495,13 +15503,6 @@
|
|||
value: false
|
||||
mirror: always
|
||||
|
||||
# Whether to use the accent color for the titlebar, if the relevant Windows
|
||||
# setting says so. See bug 1851155.
|
||||
- name: widget.windows.titlebar-accent.enabled
|
||||
type: bool
|
||||
value: false
|
||||
mirror: always
|
||||
|
||||
- name: widget.windows.window_occlusion_tracking_display_state.enabled
|
||||
type: bool
|
||||
value: false
|
||||
|
|
|
@ -684,7 +684,7 @@ macro_rules! bool_pref_feature {
|
|||
/// to support new types in these entries and (2) ensuring that either
|
||||
/// nsPresContext::MediaFeatureValuesChanged is called when the value that
|
||||
/// would be returned by the evaluator function could change.
|
||||
pub static MEDIA_FEATURES: [QueryFeatureDescription; 62] = [
|
||||
pub static MEDIA_FEATURES: [QueryFeatureDescription; 63] = [
|
||||
feature!(
|
||||
atom!("width"),
|
||||
AllowsRanges::Yes,
|
||||
|
@ -1005,4 +1005,8 @@ pub static MEDIA_FEATURES: [QueryFeatureDescription; 62] = [
|
|||
atom!("-moz-always-underline-links"),
|
||||
"layout.css.always_underline_links"
|
||||
),
|
||||
bool_pref_feature!(
|
||||
atom!("-moz-windows-accent-color-in-tabs"),
|
||||
"browser.theme.windows.accent-color-in-tabs.enabled"
|
||||
),
|
||||
];
|
||||
|
|
|
@ -490,8 +490,6 @@ static constexpr struct {
|
|||
widget::ThemeChangeKind::Style},
|
||||
{"widget.windows.uwp-system-colors.highlight-accent"_ns,
|
||||
widget::ThemeChangeKind::Style},
|
||||
{"widget.windows.titlebar-accent.enabled"_ns,
|
||||
widget::ThemeChangeKind::Style},
|
||||
// Affects env().
|
||||
{"layout.css.prefers-color-scheme.content-override"_ns,
|
||||
widget::ThemeChangeKind::Style},
|
||||
|
@ -508,6 +506,7 @@ static constexpr struct {
|
|||
{"dom.element.popover.enabled"_ns},
|
||||
{"mathml.legacy_mathvariant_attribute.disabled"_ns},
|
||||
{"layout.css.always_underline_links"_ns},
|
||||
{"browser.theme.windows.accent-color-in-tabs.enabled"_ns},
|
||||
};
|
||||
|
||||
// Read values from the user's preferences.
|
||||
|
|
|
@ -875,10 +875,6 @@ auto nsLookAndFeel::ComputeTitlebarColors() -> TitlebarColors {
|
|||
result.mActiveDark.mBorder = result.mActiveLight.mBorder = *result.mAccent;
|
||||
result.mInactiveDark.mBorder = result.mInactiveLight.mBorder =
|
||||
result.mAccentInactive.valueOr(NS_RGB(57, 57, 57));
|
||||
if (!StaticPrefs::widget_windows_titlebar_accent_enabled()) {
|
||||
return result;
|
||||
}
|
||||
|
||||
result.mActiveLight.mBg = result.mActiveDark.mBg = *result.mAccent;
|
||||
result.mActiveLight.mFg = result.mActiveDark.mFg = *result.mAccentText;
|
||||
if (result.mAccentInactive) {
|
||||
|
|
|
@ -2241,6 +2241,7 @@ STATIC_ATOMS = [
|
|||
Atom("_moz_scrollbar_end_forward", "-moz-scrollbar-end-forward"),
|
||||
Atom("_moz_overlay_scrollbars", "-moz-overlay-scrollbars"),
|
||||
Atom("_moz_windows_accent_color_in_titlebar", "-moz-windows-accent-color-in-titlebar"),
|
||||
Atom("_moz_windows_accent_color_in_tabs", "-moz-windows-accent-color-in-tabs"),
|
||||
Atom("_moz_mac_big_sur_theme", "-moz-mac-big-sur-theme"),
|
||||
Atom("_moz_mac_rtl", "-moz-mac-rtl"),
|
||||
Atom("_moz_platform", "-moz-platform"),
|
||||
|
|
Загрузка…
Ссылка в новой задаче