mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
style: Clean up GTK titlebar colors
Apparently ActiveCaption/CaptionText/InactiveCaption/InactiveCaptionText are supposed to be used for titlebars, so implement them properly and remove the GTK-specific colors. Differential Revision: https://phabricator.services.mozilla.com/D128028
This commit is contained in:
parent
f00818b8ec
commit
750c9ee814
1 changed files with 12 additions and 9 deletions
|
@ -218,7 +218,14 @@ pub enum Color {
|
||||||
InheritFromBodyQuirk,
|
InheritFromBodyQuirk,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// System colors.
|
/// System colors. A bunch of these are ad-hoc, others come from Windows:
|
||||||
|
///
|
||||||
|
/// https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getsyscolor
|
||||||
|
///
|
||||||
|
/// Others are HTML/CSS specific. Spec is:
|
||||||
|
///
|
||||||
|
/// https://drafts.csswg.org/css-color/#css-system-colors
|
||||||
|
/// https://drafts.csswg.org/css-color/#deprecated-system-colors
|
||||||
#[allow(missing_docs)]
|
#[allow(missing_docs)]
|
||||||
#[cfg(feature = "gecko")]
|
#[cfg(feature = "gecko")]
|
||||||
#[derive(Clone, Copy, Debug, MallocSizeOf, Parse, PartialEq, ToCss, ToShmem)]
|
#[derive(Clone, Copy, Debug, MallocSizeOf, Parse, PartialEq, ToCss, ToShmem)]
|
||||||
|
@ -291,6 +298,7 @@ pub enum SystemColor {
|
||||||
#[css(skip)]
|
#[css(skip)]
|
||||||
ThemedScrollbarThumbInactive,
|
ThemedScrollbarThumbInactive,
|
||||||
Activeborder,
|
Activeborder,
|
||||||
|
/// Background in the (active) titlebar.
|
||||||
Activecaption,
|
Activecaption,
|
||||||
Appworkspace,
|
Appworkspace,
|
||||||
Background,
|
Background,
|
||||||
|
@ -298,6 +306,7 @@ pub enum SystemColor {
|
||||||
Buttonhighlight,
|
Buttonhighlight,
|
||||||
Buttonshadow,
|
Buttonshadow,
|
||||||
Buttontext,
|
Buttontext,
|
||||||
|
/// Text color in the (active) titlebar.
|
||||||
Captiontext,
|
Captiontext,
|
||||||
#[parse(aliases = "-moz-field")]
|
#[parse(aliases = "-moz-field")]
|
||||||
Field,
|
Field,
|
||||||
|
@ -311,7 +320,9 @@ pub enum SystemColor {
|
||||||
Highlight,
|
Highlight,
|
||||||
Highlighttext,
|
Highlighttext,
|
||||||
Inactiveborder,
|
Inactiveborder,
|
||||||
|
/// Background in the (inactive) titlebar.
|
||||||
Inactivecaption,
|
Inactivecaption,
|
||||||
|
/// Text color in the (inactive) titlebar.
|
||||||
Inactivecaptiontext,
|
Inactivecaptiontext,
|
||||||
Infobackground,
|
Infobackground,
|
||||||
Infotext,
|
Infotext,
|
||||||
|
@ -450,14 +461,6 @@ pub enum SystemColor {
|
||||||
#[parse(condition = "ParserContext::in_ua_or_chrome_sheet")]
|
#[parse(condition = "ParserContext::in_ua_or_chrome_sheet")]
|
||||||
MozColheaderhovertext,
|
MozColheaderhovertext,
|
||||||
|
|
||||||
/// Color of text in the (active) titlebar.
|
|
||||||
#[parse(condition = "ParserContext::in_ua_or_chrome_sheet")]
|
|
||||||
MozGtkTitlebarText,
|
|
||||||
|
|
||||||
/// Color of text in the (inactive) titlebar.
|
|
||||||
#[parse(condition = "ParserContext::in_ua_or_chrome_sheet")]
|
|
||||||
MozGtkTitlebarInactiveText,
|
|
||||||
|
|
||||||
#[css(skip)]
|
#[css(skip)]
|
||||||
End, // Just for array-indexing purposes.
|
End, // Just for array-indexing purposes.
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue