mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 23:31:56 +00:00
Bug 732095 - Proportional thumb button in Gonk scrollbars r=mwu
This commit is contained in:
parent
29c2d84da6
commit
9d8bda12fa
@ -37,6 +37,7 @@
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "nsLookAndFeel.h"
|
||||
#include "nsStyleConsts.h"
|
||||
#include "gfxFont.h"
|
||||
|
||||
nsLookAndFeel::nsLookAndFeel()
|
||||
@ -317,6 +318,79 @@ nsLookAndFeel::NativeGetColor(ColorID aID, nscolor &aColor)
|
||||
return rv;
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsLookAndFeel::GetIntImpl(IntID aID, PRInt32 &aResult)
|
||||
{
|
||||
nsresult rv = nsXPLookAndFeel::GetIntImpl(aID, aResult);
|
||||
if (NS_SUCCEEDED(rv))
|
||||
return rv;
|
||||
|
||||
rv = NS_OK;
|
||||
|
||||
switch (aID) {
|
||||
case eIntID_CaretBlinkTime:
|
||||
aResult = 500;
|
||||
break;
|
||||
|
||||
case eIntID_CaretWidth:
|
||||
aResult = 1;
|
||||
break;
|
||||
|
||||
case eIntID_ShowCaretDuringSelection:
|
||||
aResult = 0;
|
||||
break;
|
||||
|
||||
case eIntID_SelectTextfieldsOnKeyFocus:
|
||||
// Select textfield content when focused by kbd
|
||||
// used by nsEventStateManager::sTextfieldSelectModel
|
||||
aResult = 1;
|
||||
break;
|
||||
|
||||
case eIntID_SubmenuDelay:
|
||||
aResult = 200;
|
||||
break;
|
||||
|
||||
case eIntID_TooltipDelay:
|
||||
aResult = 500;
|
||||
break;
|
||||
|
||||
case eIntID_MenusCanOverlapOSBar:
|
||||
// we want XUL popups to be able to overlap the task bar.
|
||||
aResult = 1;
|
||||
break;
|
||||
|
||||
case eIntID_ScrollArrowStyle:
|
||||
aResult = eScrollArrowStyle_Single;
|
||||
break;
|
||||
|
||||
case eIntID_ScrollSliderStyle:
|
||||
aResult = eScrollThumbStyle_Proportional;
|
||||
break;
|
||||
|
||||
case eIntID_WindowsDefaultTheme:
|
||||
case eIntID_TouchEnabled:
|
||||
case eIntID_MaemoClassic:
|
||||
case eIntID_WindowsThemeIdentifier:
|
||||
aResult = 0;
|
||||
rv = NS_ERROR_NOT_IMPLEMENTED;
|
||||
break;
|
||||
|
||||
case eIntID_SpellCheckerUnderlineStyle:
|
||||
aResult = NS_STYLE_TEXT_DECORATION_STYLE_WAVY;
|
||||
break;
|
||||
|
||||
case eIntID_ScrollbarButtonAutoRepeatBehavior:
|
||||
aResult = 0;
|
||||
break;
|
||||
|
||||
default:
|
||||
aResult = 0;
|
||||
rv = NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
/*virtual*/
|
||||
bool
|
||||
nsLookAndFeel::GetFontImpl(FontID aID, nsString& aFontName,
|
||||
|
@ -48,6 +48,7 @@ public:
|
||||
virtual ~nsLookAndFeel();
|
||||
|
||||
virtual bool GetFontImpl(FontID aID, nsString& aName, gfxFontStyle& aStyle);
|
||||
virtual nsresult GetIntImpl(IntID aID, PRInt32 &aResult);
|
||||
|
||||
protected:
|
||||
virtual nsresult NativeGetColor(ColorID aID, nscolor &aColor);
|
||||
|
Loading…
Reference in New Issue
Block a user