зеркало из https://github.com/mozilla/pjs.git
Bug 159346 part.2 Repeat scroll even if mouse cursor is outside of the pressed scrollbar button on gtk2 and qt r=enndeakin+roc
This commit is contained in:
Родитель
a4acd0cc70
Коммит
274b7ff43c
|
@ -216,7 +216,9 @@ void nsScrollbarButtonFrame::Notify()
|
|||
{
|
||||
// Since this is only going to get called if we're scrolling a page length
|
||||
// or a line increment, we will always use smooth scrolling.
|
||||
if (mCursorOnThis) {
|
||||
if (mCursorOnThis ||
|
||||
LookAndFeel::GetInt(
|
||||
LookAndFeel::eIntID_ScrollbarButtonAutoRepeatBehavior, 0)) {
|
||||
DoButtonAction(true);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -370,7 +370,12 @@ public:
|
|||
/**
|
||||
* Return the appropriate WindowsThemeIdentifier for the current theme.
|
||||
*/
|
||||
eIntID_WindowsThemeIdentifier
|
||||
eIntID_WindowsThemeIdentifier,
|
||||
/**
|
||||
* 0: scrollbar button repeats to scroll only when cursor is on the button.
|
||||
* 1: scrollbar button repeats to scroll even if cursor is outside of it.
|
||||
*/
|
||||
eIntID_ScrollbarButtonAutoRepeatBehavior
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
@ -430,6 +430,10 @@ nsLookAndFeel::GetIntImpl(IntID aID, PRInt32 &aResult)
|
|||
aResult = NS_STYLE_TEXT_DECORATION_STYLE_WAVY;
|
||||
break;
|
||||
|
||||
case eIntID_ScrollbarButtonAutoRepeatBehavior:
|
||||
aResult = 0;
|
||||
break;
|
||||
|
||||
default:
|
||||
aResult = 0;
|
||||
rv = NS_ERROR_FAILURE;
|
||||
|
|
|
@ -431,6 +431,9 @@ nsLookAndFeel::GetIntImpl(IntID aID, PRInt32 &aResult)
|
|||
case eIntID_SpellCheckerUnderlineStyle:
|
||||
aResult = NS_STYLE_TEXT_DECORATION_STYLE_DOTTED;
|
||||
break;
|
||||
case eIntID_ScrollbarButtonAutoRepeatBehavior:
|
||||
aResult = 0;
|
||||
break;
|
||||
default:
|
||||
aResult = 0;
|
||||
res = NS_ERROR_FAILURE;
|
||||
|
|
|
@ -575,6 +575,9 @@ nsLookAndFeel::GetIntImpl(IntID aID, PRInt32 &aResult)
|
|||
case eIntID_MenuBarDrag:
|
||||
aResult = sMenuSupportsDrag;
|
||||
break;
|
||||
case eIntID_ScrollbarButtonAutoRepeatBehavior:
|
||||
aResult = 1;
|
||||
break;
|
||||
default:
|
||||
aResult = 0;
|
||||
res = NS_ERROR_FAILURE;
|
||||
|
|
|
@ -349,6 +349,9 @@ nsLookAndFeel::GetIntImpl(IntID aID, PRInt32 &aResult)
|
|||
case eIntID_SpellCheckerUnderlineStyle:
|
||||
aResult = NS_STYLE_TEXT_DECORATION_STYLE_WAVY;
|
||||
break;
|
||||
case eIntID_ScrollbarButtonAutoRepeatBehavior:
|
||||
aResult = 0;
|
||||
break;
|
||||
|
||||
default:
|
||||
aResult = 0;
|
||||
|
|
|
@ -408,6 +408,10 @@ nsLookAndFeel::GetIntImpl(IntID aID, PRInt32 &aResult)
|
|||
aResult = NS_STYLE_TEXT_DECORATION_STYLE_WAVY;
|
||||
break;
|
||||
|
||||
case eIntID_ScrollbarButtonAutoRepeatBehavior:
|
||||
aResult = 1;
|
||||
break;
|
||||
|
||||
default:
|
||||
aResult = 0;
|
||||
res = NS_ERROR_FAILURE;
|
||||
|
|
|
@ -479,6 +479,9 @@ nsLookAndFeel::GetIntImpl(IntID aID, PRInt32 &aResult)
|
|||
case eIntID_SpellCheckerUnderlineStyle:
|
||||
aResult = NS_STYLE_TEXT_DECORATION_STYLE_WAVY;
|
||||
break;
|
||||
case eIntID_ScrollbarButtonAutoRepeatBehavior:
|
||||
aResult = 0;
|
||||
break;
|
||||
default:
|
||||
aResult = 0;
|
||||
res = NS_ERROR_FAILURE;
|
||||
|
|
|
@ -125,6 +125,9 @@ nsLookAndFeelIntPref nsXPLookAndFeel::sIntPrefs[] =
|
|||
{ "ui.SpellCheckerUnderlineStyle",
|
||||
eIntID_SpellCheckerUnderlineStyle,
|
||||
false, 0 },
|
||||
{ "ui.scrollbarButtonAutoRepeatBehavior",
|
||||
eIntID_ScrollbarButtonAutoRepeatBehavior,
|
||||
false, 0 },
|
||||
};
|
||||
|
||||
nsLookAndFeelFloatPref nsXPLookAndFeel::sFloatPrefs[] =
|
||||
|
|
Загрузка…
Ссылка в новой задаче