Mouse wheel behaviour in the IDE source editor lazarus / 9-Editor ---------------------------------------------------------------------- Valentin · 2011-05-01 00:15 Hi all, Does someone know how mouse wheel scrolling can be reduced in the IDE? The scrolling amount is percentage of the page height and for me the default value is quite big (~20 lines). Most programs scroll 3 to 5 rows. I've followed http://bugs.freepascal.org/view.php?id=7498 and changed the corresponding file in gtk2 directory, but after Lazarus compiling nothing has changed... ---------------------------------------------------------------------- typo · 2011-05-01 01:19 Here it scrolls 3 lines. Lazarus 0.9.30 r29749 FPC 2.4.2 i386-win32-win32/win64 ---------------------------------------------------------------------- Martin_fr · 2011-05-01 10:11 Under windows there is a system configuration to set the amount of lines per wheel click (usually  between 1 and 3) I do not know about GTK2, but I would expect that Gtk2 has a similar setting. So maybe the constant you changed is no longer? Anyway, maybe someone else knows more. But you should specify which distribution of Linux you are using (or if you have gtk on windows, or...). If you know also add the version of your gtk2 installation. Also Sine you do not specify otherwise: You do use 0.9.30? ---------------------------------------------------------------------- Blaazen · 2011-05-01 13:08 Look at this: Code: [Select]function TMouse.GetWheelScrollLines: Integer; begin   if FWheelScrollLines = 0 then   begin     if not WidgetSet.SystemParametersInfo(SPI_GETWHEELSCROLLLINES, 0, @FWheelScrollLines, 0) then       FWheelScrollLines := 3;   end;   Result := FWheelScrollLines; end;      I have Kubuntu + Qt 4.7.1 and I can change number of scroll-lines in my System Settings (Input Devices -> Mouse -> Advanced ) but it seems Lazarus cannot read this value and  "mouse.WheelScrollLines" is always 3 (even if i restart IDE). BTW I have mouse with very crappy scroll wheel so I avoid using it at all. ---------------------------------------------------------------------- zeljko · 2011-05-01 13:22 That's because KDE doesn't set it for qt, but for KDE env. There must be qt4config (or similar name) where you can set such values for pure qt apps. Remember that Lazarus is not KDE but qt app. ---------------------------------------------------------------------- Valentin · 2011-05-01 15:00 using Ubuntu 10.10 with Gnome 2.32 desktop, Lazarus 0.9.30 (gtk2 IDE). This scrolling disadvantage is only int IDE source editor. Any other Lazarus scroll controls (Object Inspector, Environment Options, Code explorer, etc) are ~3 lines. ---------------------------------------------------------------------- Martin_fr · 2011-05-01 16:21 You are right, i can reproduce this in fedora. Scrolling depends on window height and it shouldn't. Looks like a bug to me. indeed in function Gtk2ScrolledWindowScrollCB(AScrollWindow: PGtkScrolledWindow; AEvent: PGdkEventScroll; AWidgetInfo: PWidgetInfo): gboolean; cdecl; lcl/interfaces/gtk2/gtk2wscontrols.pp line 175   AValue :=  power(Range^.adjustment^.page_size, 2 / 3); ---------------------------------------------------------------------- Blaazen · 2011-05-03 14:47 Quote from: zeljko on May 01, 2011, 03:22:16 pmThat's because KDE doesn't set it for qt, but for KDE env. There must be qt4config (or similar name) where you can set such values for pure qt apps. Remember that Lazarus is not KDE but qt app. I am still not sure if it is implemented. I installed qtconfog-qt4 (from kubuntu repositories) and I also looked to config file: .config/Trolltech.conf (section: qt) Code: [Select][qt]   ...   wheelScrollLines=5   ...and WheelScrolllLines is always 3. (Even if I restart IDE). ---------------------------------------------------------------------- zeljko · 2011-05-03 15:30 http://doc.trolltech.com/4.7/qapplication.html#wheelScrollLines-prop just check with some writeln() QApplication_wheelScrollLines() when app is created in qtobjects.inc. It should respect it's conf file. We do not touch wheelScrollLines property in any case inside qtlcl. ---------------------------------------------------------------------- Blaazen · 2011-05-03 15:50 Code: [Select]writeln(QApplication_wheelScrollLines))also gives 3 . Maybe I look to bad configuration file? Qt4 is from Nokia now, Trolltech is past. ---------------------------------------------------------------------- zeljko · 2011-05-03 17:46 There should be Trolltech.conf somewhere ni /etc too ....I've found that I don't have qtconfig installed on Fedora 14 but $HOME/.config/Trolltech.conf exists, but also there's nothing about mouse wheel inside that conf file (so I assume it's 3 by default).