Skip to content

Commit

Permalink
Tweak reader mode values
Browse files Browse the repository at this point in the history
  • Loading branch information
Xanfre committed May 18, 2019
1 parent e0e82b6 commit de73e09
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions AngelLoader/CustomControls/RichTextBoxCustom.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public RichTextBoxCustom()
_scrollInfo.fMask = (uint)ScrollInfoMask.SIF_ALL;
ReaderModeEnabled = true;
tmrAutoScroll = new Timer();
tmrAutoScroll.Interval = AUTO_SCROLL_TICK_INTERVAL;
tmrAutoScroll.Interval = 10;
tmrAutoScroll.Tick += new EventHandler(tmrAutoScroll_Tick);
pbGlyph = new PictureBox();
pbGlyph.Size = new Size(26, 26);
Expand Down Expand Up @@ -401,9 +401,6 @@ private void InterceptMousewheel(ref Message m)

#region Better reader mode

const int AUTO_SCROLL_TICK_INTERVAL = 25;
const int AUTO_SCROLL_DISTANCE_MULTIPLIER = 2;

private class NativeMethods
{
[DllImport("comctl32.dll", SetLastError = true, EntryPoint = "#383")]
Expand Down Expand Up @@ -500,7 +497,7 @@ private bool TranslateDispatchCallback(ref Message msg)

private bool ReaderScrollCallback(ref InteropTypes.READERMODEINFO prmi, int dx, int dy)
{
scrollIncrementY = dy * AUTO_SCROLL_DISTANCE_MULTIPLIER;
scrollIncrementY = dy;

if (dy != 0) endOnMouseUp = true;

Expand Down

0 comments on commit de73e09

Please sign in to comment.