diff --git a/data/pref.xml b/data/pref.xml
index 98ea133ba..630d0c745 100644
--- a/data/pref.xml
+++ b/data/pref.xml
@@ -171,6 +171,7 @@
+
diff --git a/data/strings/en.ini b/data/strings/en.ini
index e9da6c5a9..8174aacd6 100644
--- a/data/strings/en.ini
+++ b/data/strings/en.ini
@@ -1126,6 +1126,7 @@ wheel_zoom = Zoom with scroll wheel
slide_zoom = Zoom sliding two fingers up or down
zoom_from_center_with_wheel = Zoom from center with scroll wheel
zoom_from_center_with_keys = Zoom from center with keys
+invert_brush_size_scroll = Invert the scrolling direction for increasing the brush size
show_scrollbars = Show scroll-bars in sprite editor
show_scrollbars_tooltip = Show scroll-bars in all sprite editors.
auto_scroll = Auto-scroll on editor edges
diff --git a/data/widgets/options.xml b/data/widgets/options.xml
index 894badfaf..e1bc31fff 100644
--- a/data/widgets/options.xml
+++ b/data/widgets/options.xml
@@ -224,6 +224,7 @@
pref="editor.zoom_with_slide" />
+ setSelected(true);
+ if (m_pref.editor.invertBrushSizeScroll())
+ invertBrushSizeScroll()->setSelected(true);
+
if (m_pref.selection.autoOpaque())
autoOpaque()->setSelected(true);
@@ -625,6 +628,7 @@ public:
m_pref.editor.zoomFromCenterWithWheel(zoomFromCenterWithWheel()->isSelected());
m_pref.editor.zoomFromCenterWithKeys(zoomFromCenterWithKeys()->isSelected());
+ m_pref.editor.invertBrushSizeScroll(invertBrushSizeScroll()->isSelected());
m_pref.editor.showScrollbars(showScrollbars()->isSelected());
m_pref.editor.autoScroll(autoScroll()->isSelected());
m_pref.editor.straightLinePreview(straightLinePreview()->isSelected());
diff --git a/src/app/ui/editor/state_with_wheel_behavior.cpp b/src/app/ui/editor/state_with_wheel_behavior.cpp
index ddc8f6961..73bc08763 100644
--- a/src/app/ui/editor/state_with_wheel_behavior.cpp
+++ b/src/app/ui/editor/state_with_wheel_behavior.cpp
@@ -190,9 +190,15 @@ bool StateWithWheelBehavior::onMouseWheel(Editor* editor, MouseMessage* msg)
ToolPreferences::Brush& brush =
Preferences::instance().tool(tool).brush;
+ int newBrushSize;
+ if (Preferences::instance().editor.invertBrushSizeScroll())
+ newBrushSize = int(brush.size()-dz);
+ else
+ newBrushSize = int(brush.size()+dz);
+
brush.size(
base::clamp(
- int(brush.size()+dz),
+ newBrushSize,
// If we use the "static const int" member directly here,
// we'll get a linker error (when compiling without
// optimizations) because we should need to define the