Browse Source

Added SCROLL_DEFAULT_STEP_SIZE property

gogoprog 13 years ago
parent
commit
2664c892e0
3 changed files with 3 additions and 1 deletions
  1. 1 1
      Source/Core/Element.cpp
  2. 1 0
      Source/Core/StringCache.cpp
  3. 1 0
      Source/Core/StringCache.h

+ 1 - 1
Source/Core/Element.cpp

@@ -1577,7 +1577,7 @@ void Element::ProcessEvent(Event& event)
 			if (overflow_property == OVERFLOW_AUTO ||
 				overflow_property == OVERFLOW_SCROLL)
 			{
-				SetScrollTop(GetScrollTop() + wheel_delta * ElementUtilities::GetLineHeight(this));
+				SetScrollTop(GetScrollTop() + wheel_delta * (GetFontFaceHandle() ? ElementUtilities::GetLineHeight(this) : GetProperty< int >(SCROLL_DEFAULT_STEP_SIZE)));
 				event.StopPropagation();
 			}
 		}

+ 1 - 0
Source/Core/StringCache.cpp

@@ -92,6 +92,7 @@ const String CURSOR = "cursor";
 const String DRAG = "drag";
 const String TAB_INDEX = "tab-index";
 const String SCROLLBAR_MARGIN = "scrollbar-margin";
+const String SCROLL_DEFAULT_STEP_SIZE = "scroll-default-step-size";
 
 const String MOUSEDOWN = "mousedown";
 const String MOUSESCROLL = "mousescroll";

+ 1 - 0
Source/Core/StringCache.h

@@ -95,6 +95,7 @@ extern const String CURSOR;
 extern const String DRAG;
 extern const String TAB_INDEX;
 extern const String SCROLLBAR_MARGIN;
+extern const String SCROLL_DEFAULT_STEP_SIZE;
 
 extern const String MOUSEDOWN;
 extern const String MOUSESCROLL;