diff options
author | Unknown <neilh@scintilla.org> | 2013-11-07 16:50:55 +1100 |
---|---|---|
committer | Unknown <neilh@scintilla.org> | 2013-11-07 16:50:55 +1100 |
commit | 67481cbf1751c33e04a7377eb3bd124d8af8d586 (patch) | |
tree | 1962762aaefaa6d02137324c13102da4b2b1a965 | |
parent | bc62f2f0c2fec64593a30a5b42f23aeeac398ca9 (diff) | |
download | scintilla-mirror-67481cbf1751c33e04a7377eb3bd124d8af8d586.tar.gz |
Bug [#1546]. Fix horizontal scroll bar range to not be double the needed width.
-rw-r--r-- | doc/ScintillaHistory.html | 4 | ||||
-rw-r--r-- | gtk/ScintillaGTK.cxx | 10 |
2 files changed, 9 insertions, 5 deletions
diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html index ca282397b..fb750e384 100644 --- a/doc/ScintillaHistory.html +++ b/doc/ScintillaHistory.html @@ -498,6 +498,10 @@ <a href="http://sourceforge.net/p/scintilla/bugs/1541/">Bug #1541</a>. </li> <li> + On GTK+, fix horizontal scroll bar range to not be double the needed width. + <a href="http://sourceforge.net/p/scintilla/bugs/1546/">Bug #1546</a>. + </li> + <li> On OS X GTK+, report control key as SCI_META for mouse down events. </li> <li> diff --git a/gtk/ScintillaGTK.cxx b/gtk/ScintillaGTK.cxx index fdbc96cbc..fa108bac3 100644 --- a/gtk/ScintillaGTK.cxx +++ b/gtk/ScintillaGTK.cxx @@ -1126,7 +1126,7 @@ void ScintillaGTK::SetVerticalScrollPos() { void ScintillaGTK::SetHorizontalScrollPos() { DwellEnd(true); - gtk_adjustment_set_value(GTK_ADJUSTMENT(adjustmenth), xOffset / 2); + gtk_adjustment_set_value(GTK_ADJUSTMENT(adjustmenth), xOffset); } bool ScintillaGTK::ModifyScrollBars(int nMax, int nPage) { @@ -1814,13 +1814,13 @@ gint ScintillaGTK::PressThis(GdkEventButton *event) { } else if (event->button == 4) { // Wheel scrolling up (only GTK 1.x does it this way) if (ctrl) - SetAdjustmentValue(adjustmenth, (xOffset / 2) - 6); + SetAdjustmentValue(adjustmenth, xOffset - 6); else SetAdjustmentValue(adjustmentv, topLine - 3); } else if (event->button == 5) { // Wheel scrolling down (only GTK 1.x does it this way) if (ctrl) - SetAdjustmentValue(adjustmenth, (xOffset / 2) + 6); + SetAdjustmentValue(adjustmenth, xOffset + 6); else SetAdjustmentValue(adjustmentv, topLine + 3); } @@ -2517,9 +2517,9 @@ void ScintillaGTK::ScrollSignal(GtkAdjustment *adj, ScintillaGTK *sciThis) { void ScintillaGTK::ScrollHSignal(GtkAdjustment *adj, ScintillaGTK *sciThis) { try { #if GTK_CHECK_VERSION(3,0,0) - sciThis->HorizontalScrollTo(static_cast<int>(gtk_adjustment_get_value(adj) * 2)); + sciThis->HorizontalScrollTo(static_cast<int>(gtk_adjustment_get_value(adj))); #else - sciThis->HorizontalScrollTo(static_cast<int>(adj->value * 2)); + sciThis->HorizontalScrollTo(static_cast<int>(adj->value)); #endif } catch (...) { sciThis->errorStatus = SC_STATUS_FAILURE; |