diff options
Diffstat (limited to 'gtk')
-rw-r--r-- | gtk/ScintillaGTK.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
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; |