mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-06 07:48:38 +09:00
parent
470a6e4401
commit
13fcc4a046
949 changed files with 95662 additions and 444 deletions
|
|
@ -99,13 +99,25 @@ nsNativeTheme::GetContentState(nsIFrame* aFrame, uint8_t aWidgetType)
|
|||
flags |= NS_EVENT_STATE_FOCUS;
|
||||
}
|
||||
|
||||
// On Windows, only draw focus rings if they should be shown. This
|
||||
// On Windows and Mac, only draw focus rings if they should be shown. This
|
||||
// means that focus rings are only shown once the keyboard has been used to
|
||||
// focus something in the window.
|
||||
#if defined(XP_MACOSX)
|
||||
// Mac always draws focus rings for textboxes and lists.
|
||||
if (aWidgetType == NS_THEME_NUMBER_INPUT ||
|
||||
aWidgetType == NS_THEME_TEXTFIELD ||
|
||||
aWidgetType == NS_THEME_TEXTFIELD_MULTILINE ||
|
||||
aWidgetType == NS_THEME_SEARCHFIELD ||
|
||||
aWidgetType == NS_THEME_LISTBOX) {
|
||||
return flags;
|
||||
}
|
||||
#endif
|
||||
#if defined(XP_WIN)
|
||||
// On Windows, focused buttons are always drawn as such by the native theme.
|
||||
if (aWidgetType == NS_THEME_BUTTON)
|
||||
return flags;
|
||||
#endif
|
||||
#if defined(XP_MACOSX) || defined(XP_WIN)
|
||||
nsIDocument* doc = aFrame->GetContent()->OwnerDoc();
|
||||
nsPIDOMWindowOuter* window = doc->GetWindow();
|
||||
if (window && !window->ShouldShowFocusRing())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue