diff options
| author | neilh <neilh@scintilla.org> | 2013-11-07 16:50:55 +1100 |
|---|---|---|
| committer | neilh <neilh@scintilla.org> | 2013-11-07 16:50:55 +1100 |
| commit | 2846e66bca66bb6f5fa5afdb53b92643f2e70e66 (patch) | |
| tree | 749663a5b7f26ed49b0fdc97721bb53f89bb37c4 /gtk | |
| parent | 4d25f7905f164ca2dc12a2e7c8250acb7f0c01aa (diff) | |
| download | scintilla-mirror-2846e66bca66bb6f5fa5afdb53b92643f2e70e66.tar.gz | |
Bug [#1546]. Fix horizontal scroll bar range to not be double the needed width.
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; |
