[Lazarus] Font "default_mono"
I suggest to introduce LCL font "default_mono"(we have "default" font only): - on first access to getter/resolver, and find some monospaced font: a) if font list has "Courier" or "Courier new" or "Consolas", we take it (to support Win32 usual font) b) if no usual names found (case for *BSD+Solaris+Wine) we enumerate font list, find some, by testing Canvas.TextWidth('W')=Canvas.TextWidth('i'). The problem here is - we don't have some Canvas in getter - on next access to getter, we return calculated name. - I can find the avg time of this action (step b) on Linux/BSD/Solaris, if it's needed Alexey Torgashin -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Is there a TSpinButton component in Lazarus?
Maybe a) project don't "require" (project options) needed package for DateTimeCtrl. b) LFM file misses something, check it. What is causing this really strange error??? And what can I do about it? Doing a build instead of Quick Compile does not help, same errors... -- Regards, Alexey -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
[Lazarus] FileUtil.FindAllFiles - changes strings inside
procedure TFileSearcher.Search(ASearchPath: String; ASearchMask: String; ASearchSubDirs: Boolean; CaseSensitive: Boolean = False); while ASearchPath<>'' do begin p:=Pos(FPathSeparator,ASearchPath); if p<1 then p:=length(ASearchPath)+1; Dir:=ResolveDots(LeftStr(ASearchPath,p-1)); Delete(ASearchPath,1,p); you see that to iterate over all items in char-separated ASearchPath, code modifies str, ie deletes parts of it. It's slow! We should not modify str here. It's easy- save old-index, new-index, and get Copy(n1, n2-n1{+delta}). Didn't see why ASearchMask is not "const", maybe same bad. Alexey Torgashin -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
[Lazarus] FileUtil.FindAllFiles - case-sensitive on Unix
procedure FindAllFiles(AList: TStrings; const SearchPath: String; Searcher.Search(SearchPath, SearchMask, SearchSubDirs); Here we miss parameter "CaseSensitive=False". So on Linux it is False and function does case-insens search. It is slower! Why not to add param True for Unix. Not sure about macOS. -- Regards, Alexey -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
[Lazarus] GTK2 app starts faster
With last changes (may-june-july 2020) in Laz, CudaText gtk2 starts faster- before with small window: 220ms, with big window: 330ms (BoundsRect change was SLOW) now with small window: 220ms, with big window: 260ms -- Regards, Alexey -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
[Lazarus] Gtk2 runtime error on terminal
Ubuntu 19.10 x64, Lazarus trunk If I run "./cudatext dd.erb" with not installed lexer ERB, CudaText runs Python plugin to detect lexer for dd.erb, and shows menu-like dialog with such a lexer. It runs ok. and it prints to terminal such line (cudatext:12080) Gtk-CRITICAL **: x.x.x.x: gtk_window_realize_icon: assertion 'info->icon_pixmap == NULL' failed -- Regards, Alexey -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
[Lazarus] IDE trunk cannot build on fpc 3.0.2
macOS 10.8, FPC 3.0.2 2017/02/12 for i386 pkgmanager.pas(77,78) Error (5000) Id not found TObjectArray$2 PS-- I use fpc 3.0.2 because I had problems to compile CudaText with 3.0.4 on macOS in 2019 -- Regards, Alexey -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
[Lazarus] IDE PackageManager crash on placing ATSynEdit on a form
Details here. I see it on Linux gtk2 x64 too. https://forum.lazarus.freepascal.org/index.php/topic,48617.0.html What is wrong with atsynedit? Stacktrace #0 CLASSES$_$TWRITER_$__$$_WRITEPROPERTY$TPERSISTENT$POINTER at :0 001 CLASSES$_$TWRITER_$__$$_WRITEPROPERTIES$TPERSISTENT at :0 002 ?? at :0 003 ?? at :0 004 ?? at :0 005 ?? at :0 006 ?? at :0 007 ?? at :0 008 ?? at :0 009 ?? at :0 010 ?? at :0 011 ?? at :0 012 ?? at :0 013 ?? at :0 014 ?? at :0 015 ?? at :0 016 CLASSES$_$TWRITER_$__$$_WRITEPROPERTIES$TPERSISTENT at :0 017 ?? at :0 -- Regards, Alexey -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Patch for Screen.BeginWaitCursor
Patch is in SVN, sorry now I see the docs are OK. BTW I am not sure it is good to raise an exception in EndTempCursor/EndWaitCursor, better to ignore the er. >Where is the patch? Maybe you forgot to attach it? -- Regards, Alexey -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
[Lazarus] Patch for Screen.BeginWaitCursor
Docs have wrong name Override the Cursor property with a temporary value. Use EndTempCursor to release it. Release the temporary cursor set with BeginTempCursor. -- Regards, Alexey -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
[Lazarus] Win10, clicking taskbar button don't minimize the app
I will let you know about CudaText issue, seems LCL issue https://github.com/Alexey-T/CudaText/issues/2322#issuecomment-587597067 -- Regards, Alexey -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Unneeded Paint calls from LCL
Details: Linux gtk2: LCL calls Paint 5 times for ATSynEdit on FormCreate/FormShow: 1- DoOnResize - i filtered it out 2- DoOnResize - i filtered it out 3- Paint - it's ok 4- Paint again - i cannot filter it out 5- Paint again Win32: LCL calls Paint 3 times: 1- Paint - it's ok 2- DoOnResize - i cannot filter it out 3- DoOnResize again Can you optimize it to call Paint once, and DoOnResize BEFORE Paint? Alexey T. -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Unneeded Paint calls from LCL
Linux gtk2. reduce these calls? -- Regards, Alexey -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
[Lazarus] Unneeded Paint calls from LCL
ATSynEdit has such debug define //{$define debug_show_fps} I enabled it to see why editor shows 20-30ms (Form1.OnShow with editor). a) editor shows 5 (repaint counter) on show. i put breakpoint in TATSynEdit.DoPaintEx and saw that unneeded paints were from DoOnResize() before calling Paint(). ok, i added flag FPaintStarted and filtered them. b) editor still shows 3 (repaint counter) on show. breakpoint shows that Paint is called 3 times by LCL. I cannot filter these calls at all. Can you reduce these calls? -- Regards, Alexey -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
[Lazarus] Gtk2 compilation error on SPARC
When I compile CudaText for Solaris SPARC (32bit CPU as IDE GoTo shows me blocks with "ifdef cpu32") I get compile error, gtk2widgetset.inc // clipboard ClipboardTypeAtoms[ctPrimarySelection]:=GDK_SELECTION_PRIMARY; ClipboardTypeAtoms[ctSecondarySelection]:=GDK_SELECTION_SECONDARY; ClipboardTypeAtoms[ctClipboard]:=gdk_atom_intern('CLIPBOARD',GdkFalse); ///==> gtk2widgetset.inc(1473,36) Error: Incompatible types: got "PGdkAtom" expected "LongWord" IDE shows that both sides (array and gdk_atom_intern) are TGdkAtom - hmm. Lazarus trunk from today. user@PC:~/fpcupdeluxe/fpc/bin/x86_64-linux$ ./fpc Free Pascal Compiler version 3.3.1-r43462 [2019/11/14] for x86_64 -- Regards, Alexey -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
[Lazarus] gtk2 issue with clicking on ATTabs
User of ATTabs wrote, I don't know what to do here? Hi, Having a issue with ATTabs on Linux GTk2 (Laz 2.06) When I add a tab from a popup menu from a tvirtualstringtree the close button on the tab does nothing on the first click and on the second click it closes and in the terminal this error pops up: |GLib-GObject-WARNING **: 11:15:36.741: ../glib/gobject/gsignal.c:1206: no emission of signal "button-release-event" to stop for instance '0x208b5b0'| If I right click on the tab and use the popup menu I call to close the tab this error does not occur. Also if I spawn the tab from a button on a toolbar it closes on the first click but that error still shows in the terminal. I am using the latest version of Attabs as of a day ago. This does not happen in windows and I have not been able to test in QT5 I am using tactions to add the tab and if I call the action from the tvirtualstringtrees double click event it also closes on the first click, it's only if the addtab is called from the context of a popup menu. I also noticed if I click anywhere on the form that is hosted in the tab then click the close button it closes. -- Regards, Alexey -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
[Lazarus] Canvas.PolyBezier parameter
lcl/graphics.pp procedure PolyBezier(Points: PPoint; NumPts: Integer; Filled: boolean = False; Continuous: boolean = False); virtual; {$IFDEF HasFPCanvas1}reintroduce;{$ENDIF} procedure PolyBezier(const Points: array of TPoint; Filled: boolean = False; Continuous: boolean = False); {$IFDEF HasFPCanvas1}reintroduce;{$ENDIF} def of Cotinuous is False! Seems it's wrong? Because Delphi don't have Continuous param at all and by default it paints continuous curve, ie it needs 4 points for the 1st curve and 3 points per next curves. http://docwiki.embarcadero.com/Libraries/Rio/en/Vcl.Graphics.TCanvas.PolyBezier so LCL must change def of Continuous to True? -- Regards, Alexey -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
[Lazarus] Online help for "Help options"
https://wiki.lazarus.freepascal.org/IDE_Window:_Help_Options - Can somebody write there, what is field "FP Doc HTML Path"? what folder of FPC or Lazarus must be put there? - What is "FP Doc" - write too. - How user can fill "Databases" grid? what databases? where to get them? -- Regards, Alexey -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] FPC trunk cannot compile Lazarus Qt5 lib
I must say I do cross compile from Linux x64 toHaiku x32, it is FPC x32 limitation. Alex -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
[Lazarus] FPC trunk cannot compile Lazarus Qt5 lib
Lazarus trunk, fpc 3.3.1-r43462 Linux x64 qt56.pas(12495,37) Error: Enumeration symbols can only have values in the range of -2^31 to 2^31-1 QStyleCE_CustomBase = $f000 ); -- Regards, Alexey -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
[Lazarus] Wiki error on uploading new version of png picture
Database error A database query error has occurred. This may indicate a bug in the software. [ac44310904ca4f16e1729b3f] /Special:Upload Wikimedia\Rdbms\DBQueryError from line 1457 of /srv/www/lazaruswiki/includes/libs/rdbms/database/Database.php: A database query error has occurred. Did you forget to run your application's database schema updater after upgrading? Query: RELEASE SAVEPOINT `wikimedia_rdbms_atomic1` Function: LocalFile::recordUpload2 Error: 1305 SAVEPOINT wikimedia_rdbms_atomic1 does not exist (localhost) Backtrace: #0 /srv/www/lazaruswiki/includes/libs/rdbms/database/Database.php(1427): Wikimedia\Rdbms\Database->makeQueryException(string, integer, string, string) #1 /srv/www/lazaruswiki/includes/libs/rdbms/database/Database.php(1200): Wikimedia\Rdbms\Database->reportQueryError(string, integer, string, string, boolean) #2 /srv/www/lazaruswiki/includes/libs/rdbms/database/Database.php(3498): Wikimedia\Rdbms\Database->query(string, string) #3 /srv/www/lazaruswiki/includes/libs/rdbms/database/Database.php(3584): Wikimedia\Rdbms\Database->doReleaseSavepoint(string, string) #4 /srv/www/lazaruswiki/includes/libs/rdbms/database/Database.php(2953): Wikimedia\Rdbms\Database->endAtomic(string) #5 /srv/www/lazaruswiki/includes/libs/rdbms/database/Database.php(2880): Wikimedia\Rdbms\Database->nonNativeInsertSelect(string, array, array, array, string, array, array, array) #6 /srv/www/lazaruswiki/includes/filerepo/file/LocalFile.php(1606): Wikimedia\Rdbms\Database->insertSelect(string, array, array, array, string, array, array, array) #7 /srv/www/lazaruswiki/includes/filerepo/file/LocalFile.php(1364): LocalFile->recordUpload2(string, string, boolean, array, string, User, array) #8 /srv/www/lazaruswiki/includes/upload/UploadBase.php(868): LocalFile->upload(string, string, boolean, integer, array, boolean, User, array) #9 /srv/www/lazaruswiki/includes/specials/SpecialUpload.php(567): UploadBase->performUpload(string, boolean, boolean, User, array) #10 /srv/www/lazaruswiki/includes/specials/SpecialUpload.php(207): SpecialUpload->processUpload() #11 /srv/www/lazaruswiki/includes/specialpage/SpecialPage.php(565): SpecialUpload->execute(NULL) #12 /srv/www/lazaruswiki/includes/specialpage/SpecialPageFactory.php(568): SpecialPage->run(NULL) #13 /srv/www/lazaruswiki/includes/MediaWiki.php(288): SpecialPageFactory::executePath(Title, RequestContext) #14 /srv/www/lazaruswiki/includes/MediaWiki.php(861): MediaWiki->performRequest() #15 /srv/www/lazaruswiki/includes/MediaWiki.php(524): MediaWiki->main() #16 /srv/www/lazaruswiki/index.php(42): MediaWiki->run() #17 {main} -- Regards, Alexey -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
[Lazarus] Reworked ReadFileToString to support Linux virtual files
https://bugs.freepascal.org/view.php?id=36145 Last attached demo contains my reworked function (after the fix it works pretty fast, i tested it). Can you apply at least this function? The issue can be opened - issue is about IDE. The function is reworked to support Linux virtual files like /proc/version, /proc/meminfo. -- Regards, Alexey -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Qt5 OpenDialog/SaveDialog file filter ok?
Sorry, that Filter works ok. Another question. In qt5/qtwsdialogs.pp we have if (AFileDialog is TSaveDialog) and (trim(TmpFilter)='()') then Result := '' else Result := GetUtf8String(TmpFilter); so that empty dlg.Filter will give empty result Qt filter. Only for SaveDialog! Why only for SaveDailog? it is needed for OpenDialog too, because result "()" looks bad. AT -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
[Lazarus] Qt5 problem with Button accelerator and TEdit input
Fedora 31, KDE Plasma, Qt5 version of CudaText x64. In one dialog (Plugins / Find in Files 4), I have button with accelerator, "&.*" -it's accelerator for dot char. Now in the same form i have TCombobox. I type text in combobox, when i type dot, button presses! so I cannot enter full text. -- Regards, Alexey -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
[Lazarus] Qt5 OpenDialog/SaveDialog file filter ok?
Checked on Ubuntu x64 (with its GTK based Qt5) and Fedora (KDE Plasma) 29. In my app qt5 build, OpenDialog and SaveDialog file filters are empty (while they are set in app). Confirmed? -- Regards, Alexey -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
[Lazarus] Qt5 bindings misses QTextEdit_setPlaceholderText
This looks like missed export in qt5.pas https://raw.githubusercontent.com/graemeg/lazarus/upstream/lcl/interfaces/qt5/cbindings/qt5.pas file has the procedure QLineEdit_setPlaceholderText(handle: QLineEditH; AnonParam1: PWideString); cdecl; external Qt5PasLib name 'QLineEdit_setPlaceholderText'; but don't have QTextEdit_setPlaceholderText. On 26.10.2019 10:01, AlexeyT via lazarus wrote: ./cudatext: undefined symbol: QTextEdit_setPlaceholderText -- Regards, Alexey -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Qt5 build of program, modal dialogs go to background
I did install the libqt5pas (on Ubuntu x64), i just cannot detect qt5 version from terminal. The problem is with LCL application CudaText: a) its dialog Plugins / Options Editor cannot be dragged by mouse, it always jumps to back of main Cudatext window b) new problem found in application CudaText on FEDORA x64. It has KDE Plasma with qt5 and libqt5pas. (sudo yum install qt5pas). When I call dialog Plugins / Options Editor, Cudatext crashes: ./cudatext: undefined symbol: QTextEdit_setPlaceholderText On 26.10.2019 9:49, zeljko wrote: Sorry, but I don't understand what is exact problem. You cannot build libQt5Pas with qmake or you have problem with Qt5LCL application ? I'm using LinuxMint 19.2 on my laptop and there I have qmake (qt5) and qmake-qt4 installed. zeljko -- Regards, Alexey -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
[Lazarus] Qt5 build of program, modal dialogs go to background
I made Qt5 build of CudaText, pls test and see is my bug present? I test on Ubuntu w/o Qt5: user@PC:~$ qmake --version qmake: could not exec '/usr/lib/x86_64-linux-gnu/qt4/bin/qmake': No such file or directory user@PC:~$ qmake-qt5 --version Command 'qmake-qt5' not found, did you mean: command 'qmake-qt4' from deb qt4-qmake (4:4.8.7+dfsg-7ubuntu1) steps. - get beta of Qt5 build https://sourceforge.net/projects/cudatext/files/beta_version/ - configure Python engine in it: https://wiki.freepascal.org/CudaText#Python_on_Linux.2C_BSD.2C_Solaris - open Plugins / Options Editor dialog, and drag this dialog by it caption. Here dialog always jumps to BACK of main cudatext dialog during dragging (and it jumps by pixels too). About dialog don't jump. -- Regards, Alexey -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
[Lazarus] LCL Grids: not scalable line width
IMO I have found place where width of canvas line is not scaled to current DPI. procedure TCustomGrid.ChangeCursor(ACursor: TCursor; ... Canvas.Pen.Width:=3; ... Canvas.Pen.Width:=1; -- Regards, Alexey -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
[Lazarus] JsonTools issues in GH
https://github.com/sysrpl/JsonTools/issues -many issues are there, seems all not even reviewed. JsonTools author had posted the comparision of json libs here. -- Regards, Alexey -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Qt4 crash in CudaText
Qt4 version. user@PC:~$ dpkg-query -s qtchooser Package: qtchooser Status: install ok installed Priority: optional Section: libdevel Installed-Size: 127 Maintainer: Ubuntu Developers Architecture: amd64 Multi-Arch: foreign Version: 66-1 Replaces: libqt5core5a (<< 5.5.1+dfsg-17~), libqtcore4 (<< 4:4.8.7+dfsg-7~), qtchooser-bin (<< 64-ga1b6736-2~) Depends: libc6 (>= 2.14), libgcc1 (>= 1:3.0), libstdc++6 (>= 5.2) Breaks: libqt5core5a (<< 5.5.1+dfsg-17~), libqtcore4 (<< 4:4.8.7+dfsg-7~), qtbase5-dev-tools (<< 5.9.2+dfsg-3~), qtchooser-bin (<< 64-ga1b6736-2~), qttools5-dev-tools (<< 5.9.2-2~) -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Qt4 crash in CudaText
>> if (not EqualRect(LocalRect, sourceRect^) then Changed this; still crash. call stack is similar: #0 QTransform::type() const at :0 #1 ?? at :0 #2 QPainter::drawImage(QRectF const&, QImage const&, QRectF const&, QFlags) at :0 #3 QPainter_drawImage2 at :0 #4 DRAWIMAGE(0x7fffdd6aad80, 0x7fffb2f4, 0x184edd0, 0x7fffb304, 0x0, 0x7fffb2e4, 0) at qt/qtobjects.pas:3612 #5 STRETCHMASKBLT(0x7fffef808d30, 140736908144000, 0, 0, 438, 256, 140736908144384, 0, 0, 438, 256, 0, 0, 0, 13369376) at qt/qtwinapi.inc:6990 #6 STRETCHBLT(0x7fffef808d30, 140736908144000, 0, 0, 438, 256, 140736908144384, 0, 0, 438, 256, 13369376) at qt/qtwinapi.inc:6787 #7 STRETCHBLT(140736908144000, 0, 0, 438, 256, 140736908144384, 0, 0, 438, 256, 13369376) at include/winapi.inc:1025 #8 COPYRECT(0x7fffd6997ae0, {LEFT = 0, TOP = 0, RIGHT = 438, BOTTOM = 256, TOPLEFT = {X = 0, Y = 0}, BOTTOMRIGHT = {X = 438, Y = 256}, VECTOR = {0, 0, 438, 256}}, 0x7fffd6997f00, {LEFT = 0, TOP = 0, RIGHT = 438, BOTTOM = 256, TOPLEFT = {X = 0, Y = 0}, BOTTOMRIGHT = {X = 438, Y = 256}, VECTOR = {0, 0, 438, 256}}) at include/canvas.inc:122 #9 PAINT(0x7fffd6eae8f0) at atlistbox.pas:541 -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Qt4 crash in CudaText
Stack trace. #0 QTransform::type() const at :0 #1 ?? at :0 #2 QPainter::drawImage(QRectF const&, QImage const&, QRectF const&, QFlags) at :0 #3 QPainter_drawImage2 at :0 #4 DRAWIMAGE(0x7fffdd6aad80, 0x7fffb2e4, 0x18bd8a0, 0x7fffb2f4, 0x0, 0x7fffb2d4, 0) at qt/qtobjects.pas:3568 #5 STRETCHMASKBLT(0x7fffef808d30, 140736908144000, 0, 0, 438, 256, 140736908144384, 0, 0, 438, 256, 0, 0, 0, 13369376) at qt/qtwinapi.inc:6990 #6 STRETCHBLT(0x7fffef808d30, 140736908144000, 0, 0, 438, 256, 140736908144384, 0, 0, 438, 256, 13369376) at qt/qtwinapi.inc:6787 #7 STRETCHBLT(140736908144000, 0, 0, 438, 256, 140736908144384, 0, 0, 438, 256, 13369376) at include/winapi.inc:1025 #8 COPYRECT(0x7fffd6997ae0, {LEFT = 0, TOP = 0, RIGHT = 438, BOTTOM = 256, TOPLEFT = {X = 0, Y = 0}, BOTTOMRIGHT = {X = 438, Y = 256}, VECTOR = {0, 0, 438, 256}}, 0x7fffd6997f00, {LEFT = 0, TOP = 0, RIGHT = 438, BOTTOM = 256, TOPLEFT = {X = 0, Y = 0}, BOTTOMRIGHT = {X = 438, Y = 256}, VECTOR = {0, 0, 438, 256}}) at include/canvas.inc:122 #9 PAINT(0x7fffd6eae8f0) at atlistbox.pas:541 #10 PAINTWINDOW(0x7fffd6eae8f0, 140736908144000) at include/customcontrol.inc:118 #11 PAINTHANDLER(0x7fffd6eae8f0, {MSG = 15, UNUSEDMSG = 0, DC = 140736908144000, PAINTSTRUCT = 0x7fffd6cf69c0, RESULT = 0}) at include/wincontrol.inc:4856 #12 WMPAINT(0x7fffd6eae8f0, {MSG = 15, UNUSEDMSG = 0, DC = 140736908144000, PAINTSTRUCT = 0x7fffd6cf69c0, RESULT = 0}) at include/wincontrol.inc:6828 #13 WMPAINT(0x7fffd6eae8f0, {MSG = 15, UNUSEDMSG = 0, DC = 140736908144000, PAINTSTRUCT = 0x7fffd6cf69c0, RESULT = 0}) at include/customcontrol.inc:98 #14 SYSTEM$_$TOBJECT_$__$$_DISPATCH$formal at :0 #15 ?? at :0 #16 ?? at :0 #17 ?? at :0 #18 ?? at :0 #19 .Ld255 at :0 #20 ?? at :0 #21 ?? at :0 #22 ?? at :0 #23 ?? at :0 #24 ?? at :0 Alex -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
[Lazarus] Qt4 crash in CudaText
I just tested CudaText Linux x64 qt4 build: it now crashes on showing Command Palette dialog. Crash inside ATListbox.pas in Paint handler, in some Qt painting code. (I tried to change ATListbox.DoubleBuffered, no help.) -- Regards, Alexey -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
[Lazarus] LCL Controls.pp needs 'inline'
Hi; these are one liners. procedure AdjustBorderSpace(var RemainingClientRect, CurBorderSpace: TRect; const Space: TRect); begin AdjustBorderSpace(RemainingClientRect,CurBorderSpace,Space.Left,Space.Top, Space.Right,Space.Bottom); end; procedure ChangeBiDiModeAlignment(var Alignment: TAlignment); begin case Alignment of taLeftJustify: Alignment := taRightJustify; taRightJustify: Alignment := taLeftJustify; end; end; function GetModalResultStr(ModalResult: TModalResult): ShortString; begin Result := UITypes.ModalResultStr[ModalResult]; end; function SendAppMessage(Msg: Cardinal; WParam: WParam; LParam: LParam): Longint; begin Result:=LCLProc.SendApplicationMessage(Msg,WParam,LParam); end; procedure MoveWindowOrg(dc: hdc; X, Y: Integer); begin MoveWindowOrgEx(DC,X,Y); end; function FindDragTarget(const Position: TPoint; AllowDisabled: Boolean): TControl; begin Result := FindControlAtPosition(Position, AllowDisabled); end; function CursorToIdent(Cursor: Longint; var Ident: string): Boolean; begin Result := IntToIdent(Cursor, Ident, CursorIdents); end; function IdentToCursor(const Ident: string; var Cursor: Longint): Boolean; begin Result := IdentToInt(Ident, Cursor, CursorIdents); end; -- Regards, Alexey -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] gtk2: GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak
It is fixed; thanks. New build of Lazarus (trunk) gives errors with CudaText gtk2 build. How to fix that? -- Regards, Alexey -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
[Lazarus] Win8/Win10 taskbar button is not focused on CudaText start
I'm not sure it is Laz issue, seem it is- please see the report and GIF animation: https://github.com/Alexey-T/CudaText/issues/2183 -- Regards, Alexey -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
[Lazarus] gtk2: GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak
New build of Lazarus (trunk) gives errors with CudaText gtk2 build. How to fix that? user@PC:~/cuda/cuda/app$ ./cudatext Gtk-Message: 14:01:37.977: Failed to load module "overlay-scrollbar" Gtk-Message: 14:01:37.987: Failed to load module "canberra-gtk-module" GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak. GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak.
[Lazarus] Maybe it's TreeView hi-dpi bug on Linux?
Hi https://github.com/Alexey-T/CudaText/files/3438082/cudatext_hidpi.zip This is video with bug of CudaText on Linux on hi-dpi. Details: https://github.com/Alexey-T/CudaText/issues/2099 On video you see some gray "panel entity" on the bottom of TreeView (ie Snippet Panel plugin of CudaText). I cannot test hi-dpi on Linux. I cannot repro this on Win10. Any ideas? Maybe Treeview has some internal panel which is scaled badly? -- Regards, Alexey -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
[Lazarus] Cocoa: restoring windows order after reactivating the application
https://github.com/graemeg/lazarus/commit/4a95f3638a6ec38e6c975164b52c9f6d54c7ad10 orderArray. Better make its type "array of TWinOrderLevel" and set its size as SetLength(orderArray, N), and SetLength(orderArray, 0) to free. This is better practice, more pascalish way to allocate array. -- Regards, Alexey -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
[Lazarus] Wiki shows error on uploading new version of PNG image
Database error A database query error has occurred. This may indicate a bug in the software. [abf9cf9f7950256477509e2b] /Special:Upload Wikimedia\Rdbms\DBQueryError from line 1457 of /srv/www/lazaruswiki/includes/libs/rdbms/database/Database.php: A database query error has occurred. Did you forget to run your application's database schema updater after upgrading? Query: RELEASE SAVEPOINT `wikimedia_rdbms_atomic1` Function: LocalFile::recordUpload2 Error: 1305 SAVEPOINT wikimedia_rdbms_atomic1 does not exist (localhost) Backtrace: #0 /srv/www/lazaruswiki/includes/libs/rdbms/database/Database.php(1427): Wikimedia\Rdbms\Database->makeQueryException(string, integer, string, string) #1 /srv/www/lazaruswiki/includes/libs/rdbms/database/Database.php(1200): Wikimedia\Rdbms\Database->reportQueryError(string, integer, string, string, boolean) #2 /srv/www/lazaruswiki/includes/libs/rdbms/database/Database.php(3498): Wikimedia\Rdbms\Database->query(string, string) #3 /srv/www/lazaruswiki/includes/libs/rdbms/database/Database.php(3584): Wikimedia\Rdbms\Database->doReleaseSavepoint(string, string) #4 /srv/www/lazaruswiki/includes/libs/rdbms/database/Database.php(2953): Wikimedia\Rdbms\Database->endAtomic(string) #5 /srv/www/lazaruswiki/includes/libs/rdbms/database/Database.php(2880): Wikimedia\Rdbms\Database->nonNativeInsertSelect(string, array, array, array, string, array, array, array) #6 /srv/www/lazaruswiki/includes/filerepo/file/LocalFile.php(1606): Wikimedia\Rdbms\Database->insertSelect(string, array, array, array, string, array, array, array) #7 /srv/www/lazaruswiki/includes/filerepo/file/LocalFile.php(1364): LocalFile->recordUpload2(string, string, boolean, array, string, User, array) #8 /srv/www/lazaruswiki/includes/upload/UploadBase.php(868): LocalFile->upload(string, string, boolean, integer, array, boolean, User, array) #9 /srv/www/lazaruswiki/includes/specials/SpecialUpload.php(567): UploadBase->performUpload(string, boolean, boolean, User, array) #10 /srv/www/lazaruswiki/includes/specials/SpecialUpload.php(207): SpecialUpload->processUpload() #11 /srv/www/lazaruswiki/includes/specialpage/SpecialPage.php(565): SpecialUpload->execute(NULL) #12 /srv/www/lazaruswiki/includes/specialpage/SpecialPageFactory.php(568): SpecialPage->run(NULL) #13 /srv/www/lazaruswiki/includes/MediaWiki.php(288): SpecialPageFactory::executePath(Title, RequestContext) #14 /srv/www/lazaruswiki/includes/MediaWiki.php(861): MediaWiki->performRequest() #15 /srv/www/lazaruswiki/includes/MediaWiki.php(524): MediaWiki->main() #16 /srv/www/lazaruswiki/index.php(42): MediaWiki->run() #17 {main} -- Regards, Alexey -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Win32 TPenStyle psDot is ugly
Thanks for this info, made a patch for Grids. > 1 pixel dots followed by 1 pixel spaces then this works for dotted Geometric (Cosmetic = false) pen -- Regards, Alexey -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
[Lazarus] Win32 TPenStyle psDot is ugly
According to MS docs, psDot style must give nice looking 1 pixel dots. https://docs.microsoft.com/en-us/windows/desktop/gdi/pen-style Lazarus creates pen via Widgetset's ExtCreatePen which calls Win32 ExtCreatePen. reality: If I set psDot to StringGrid.GridLineStyle, I get ugly dots: each of about 3 pixels fragments. psDash is ugly too: dashes are very long. Why? -- Regards, Alexey -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
[Lazarus] Patch for TreeFontTyle AVLTree
https://github.com/graemeg/lazarus/commit/34d02cea12df535b67cb07f45d02e2b06134dc66 better this (Result can be any int!) begin Result:= TFreeTypeGlyph(Item1).Index - TFreeTypeGlyph(Item2).Index; end; -- Regards, Alexey -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
[Lazarus] Grids micro issue
procedure TCustomGrid.AutoAdjustColumns; For i:=0 to ColCount do AutoAdjustColumn(i); //must be ColCount-1 -- Regards, Alexey -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
[Lazarus] IDE target names
In the IDE "Target" sheet page we have OS names 1- "Beos"- consider to change to better casing "BeOS" (Wikipedia) 2- "go32v2" - the same--> "Go32v2" 3- "iphonesim" - the same 4- "nds"- I dunno what it is, maybe fix too 5- "Netware"- the same--> "NetWare" (Wikipedia) 6- "qnx"- the same--> "QNX" -- Regards, Alexey -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
[Lazarus] Qt4: circle painted with artifact
I noticed that Qt4 build of CudaText paints tabs' X on mouse-over wrong. Picture attached (1K). It is ATTabs code - see here https://github.com/Alexey-T/ATTabs/blob/master/attabs/attabs.pas#L1486 attabs.pas, procedure TATTabs.DoPaintXTo -- Regards, Alexey -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
[Lazarus] IDE: ColorBox not ok height
In /Environment - Messages Window/ pane of options dialog, we have 2 colorbox'es. They have same height on Linux gtk2. On Win10 with High-dpi 150%, they have different height (by 4..6 pixels). Maybe some AutoSize is not set? (see also other colorbox'es in another panes - the same) -- Regards, Alexey -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
[Lazarus] Detailed message about "incompatible ppu=..."
wsgrids.pp(13,30) Fatal: Cannot find WSGrids used by Grids, incompatible ppu=/home/user/lazarus/lcl/units/x86_64-linux/wsgrids.ppu, package LCLBase I didn't show that msg before, now I see it and show it. Can Laz show more detailed error here? with ppu version and platform? -- Regards, Alexey -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
[Lazarus] Add 'const' to func params
lcl/clipbrd.pp procedure SetAsHtml(Html: String); procedure SetAsHtml(Html: String; const PlainText: String); -- Regards, Alexey -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
[Lazarus] Mantis: cannot edit my comments
Cannot edit them anymore. No button at all. -- Regards, Alexey -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Mantis application error
Will be good if Developers will be added to white list in Mantis. Seems they are not spammers. AT -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Website/Mantis back online
My last Mantis issue (about macOS dark theme) has lost the PNG attachment. AT -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
[Lazarus] IDE trunk cannot build
FPC 3.2 fixes. IDE last trunk. function TFppkgHelper.GetConfigurationFileName: string; begin Result := ''; {$IF FPC_FULLVERSION>30100} if Assigned(FFPpkg) then Result:=FFPpkg.ConfigurationFilename; /fppkghelper.pas(524,20) Error: identifier idents no member "ConfigurationFilename" {$ENDIF} end; -- Regards, Alexey -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
[Lazarus] IDE Ctrl+W key
I suggest to remap Ctrl+W to "close current tab". Now it is weird-- some completion listbox shows... -- Regards, Alexey -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Universal FontDialog for LCL
Okay, will do so. About lcl patch, we ll talk later. On 08.03.2019 14:54, Juha Manninen via lazarus wrote: Everybody wants to include their custom components in LCL. Why? The Online Package Manager is designed exactly for easy access to external components. Let's use it please! -- Regards, Alexey -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Universal FontDialog for LCL
Default must be native OS dialog. I suggest to use my dialog when boolean option in LCL (will be added) true. Here's my GH repo with dialog which almost 100% mimics GTK2 FontDialog. https://github.com/alexey-t/atfontdialog It even increases preview height for big sizes >20. On 07.03.2019 16:09, zeljko via lazarus wrote: Not as default TFontDialog. Maybe as TLazFontDialog or similar. -- Regards, Alexey -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
[Lazarus] Universal FontDialog for LCL
I have an idea to make LCL based TFontDialog- which will be LCL form, which can be called by TFontDialog.Execute (if Boolean variable in LCL is set). Why make it? - we can make all best features of FontDlgs from all WSes - we can make additional events- e,g, OnSelectFont (called when used selects name in listbox) - we can make it resizable (and save/load size) - same look on all WS If it's good- ok to merge to Laz? -- Regards, Alexey -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
[Lazarus] Fppkg error on IDE start with FPC 3.2 fixes
function TFppkgHelper.IsProperlyConfigured: Boolean; {$IF FPC_FULLVERSION>30100} var CompilerFilename: string; {$ENDIF FPC_FULLVERSION>30100} begin {$IF FPC_FULLVERSION>30100} if Assigned(FFPpkg) and (FIsProperlyConfigured=fpcUnknown) then begin FIsProperlyConfigured := fpcYes; if not HasPackage('rtl') then FIsProperlyConfigured := fpcNo here I see req for package "rtl", while FPC fixes3.2 don't have "rtl" folder in /home/user/fpcupdeluxe/fpcsrc/packages. It has folders rtl-console, rtl-extra, rtl-generics, rtl-objpas, rtl-unicode. -- Regards, Alexey -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
[Lazarus] How to configure Fppkg in IDE startup dialog with FPC 3.2 ?
-I deleted FPC 3.0.4 from Linux x64 OS path (/usr/.) -Instead installed FPC fixes3.2 via FpcUpDeluxe into ~/fpcupdeluxe/fpc IDE after recompiling via FPC 3.2 now asks FPPKG path!! in startup dialog. I cannot solve it. I tried all paths from ~/fpcupdeluxe dir and tried to press [Create new fppkg cfg] (sometimes this btn is enabled but gives no result- "fppkg config is corrupt"). Dialog asks me every time. -- Regards, Alexey -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
[Lazarus] IDE Run Parameters dlg layout
I find it cumbersome that two buttons on top [+ -] don't have titles (not TButton), while "Environment" tab (same dialog) has two buttons [+ -] with titles. -- Regards, Alexey -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
[Lazarus] IsEditableTextKey bug?
function IsEditableTextKey(Key: Word): Boolean; begin Result := (((Key >= VK_A) and (Key <= VK_Z)) or ((Key >= VK_NUMPAD0) and (Key <= VK_DIVIDE)) or ((Key >= VK_0) and (Key <= VK_9)) or ((Key >= 186) and (Key <= 188)) or ((Key >= 190) and (Key <= 192)) or ((Key >= 219) and (Key <= 222))); end; See that 188 here, 189 missed, 190 here. 189 is VK_OEM_MINUS. VK_OEM_PLUS = $BB; // For any country/region, the '+' key VK_OEM_COMMA = $BC; // For any country/region, the ',' key VK_OEM_MINUS = $BD; // For any country/region, the '-' key VK_OEM_PERIOD = $BE; // For any country/region, the '.' key why it's missed? -- Regards, Alexey -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
[Lazarus] TIFF in LazIntfimage.pas
Why not split TIFF classes from %subj% into new unit? This allows to skip using of this unit by define DisableLCLTIFF. -- Regards, Alexey -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Lazarus 2 RC3 Bug or my fault?
May be caused by EOL at end of items. on Linux. On 06.02.2019 23:37, Bo Berglund via lazarus wrote: There is space with approximately a half line hight between them. -- Regards, Alexey -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
[Lazarus] IDE fppkg error message
After changing FPC from 3.0.4 to 3.3.1 i see this error on IDE start. a) ugly caption b) how to avoid it? -- Regards, Alexey -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
[Lazarus] LazProfiler package cannot install
From OPM. I see prompt about missing dependences, confirmed all, it 'Cannot intall' after compiling dep's. r60156, fpc 3.0.4, Linux x64 gtk2. -- Regards, Alexey -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] IDE dlg Go To don't react to Esc key
Ok: You mean GotLine dialog (default shoertcut: Ctrl+G)? yes. If so, does it work in r60107? I don't know, but i retested in later revision. Alex -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] IDE dlg Go To don't react to Esc key
r60137. fpc 3.0.4. Ubuntu 18.04 gtk2 x64. rebuilt with clean-all. ESC still don't work. (checked on 2 PCs) On 22.01.2019 0:20, Bart via lazarus wrote: @AlexeyT: a reaction please? -- Regards, Alexey -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
[Lazarus] IDE dlg Go To don't react to Esc key
Dialog must cancel on Esc press, now it doesn't. Latest SVN, Linux gtk2 x64. -- Regards, Alexey -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
[Lazarus] LCL patch which fixes StringGrid Copy
https://github.com/graemeg/lazarus/commit/961abc27b89c2f33b36d091225f0d351e3429073 function PrepareToHTML(s: string): string; var i1: Integer; s1: string; 1) better i instead of i1, 2) make function param "s" - const param. AT -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
[Lazarus] Mouse.DragThreshold dont work for my component
All is described here https://forum.lazarus.freepascal.org/index.php/topic,43664.0.html and demo project attached. Do you consider it as LCL bug? (I need that Mouse.IsDragging works only after mouse moved by DragThreshold value. Btw, TControl.Dragging is flawed the same way.) -- Regards, Alexey -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
[Lazarus] LCL comment typos
procedure TDragPerformer.DragStarted(APosition: TPoint); //Imput device has moved beyond tresholt limits (or immediate docking) -- Regards, Alexey -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] BeginFormUpdate/EndFormUpdate should be public?
I dont think so. It is ATGroups component (in ATTabs repo). This call is needed for me to hide flickering of controls. When ATGroups changes Mode prop. W/o this call, i see how child panels rearrange for 0.N seconds. Your code is somehow flawed. TCustomForm.BeginFormUpdate should not be needed in application code. Juha -- Regards, Alexey -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
[Lazarus] BeginFormUpdate/EndFormUpdate should be public?
%subj - they are not public so I must use now dirty code: 1. procedure DoControlLock(Ctl: TWinControl); 2. begin 3. {$ifdef fpc} 4. if Application.MainForm<>nil then 5. TFormHack(Application.MainForm).BeginFormUpdate; 6. {$else} 7. Ctl.Perform(WM_SetRedraw, 0, 0); 8. {$endif} 9. end; -- Regards, Alexey -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
[Lazarus] typo in LCL comment
customform.inc {-- procedure TCustomForm.BeginFormUpdate; Called after all children handles are created. --} procedure TCustomForm.ChildHandlesCreated; begin -- Regards, Alexey -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Wiki animated logo
>Why? Several users of my program complain that its hard to read Wiki - running cat logo is distracting for them. Alex -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
[Lazarus] Wiki animated logo
Hi. Can someone replace animated http://wiki.freepascal.org/skins/pic/logo.gif - running cat - to static pic? It can be from http://wiki.freepascal.org/Logos_and_Banners -- Regards, Alexey -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
[Lazarus] Qt patch needs /const/ word
https://github.com/graemeg/lazarus/commit/16dea52f979acc4a2998942f07d2e17ea5233aa5 I see N functions with somename(s: string). they need word /const/ for parameter. -- Regards, Alexey -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Donate function ShortenStringEx to LCL
Except for more flexible positioning of the '...', this is already available as MinimizeName in FileCtrl MinimizeName is different as I see. it uses ExtractFile* heavily for ex. And no option DotsString. -- Regards, Alexey -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Donate function ShortenStringEx to LCL
Why is there : S:= UTF8Decode(Text); ... Result:= UTF8Encode(S); Seems it can be just "S:= Text", "Result:= S". but I had problems without UTF8Encode/decode in my apps before. On Windows. It was FPC 2.6.4. Please also look at function ShortDisplayFilename() in unit IDEProcs. It is more simple.. -- Regards, Alexey -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
[Lazarus] Donate function ShortenStringEx to LCL
I want to donate this func. it can truncate text on canvas with 3 modes: dots at begin/ at middle of text/ at end of text. Tested in ATTabs demo. Code-- https://github.com/Alexey-T/ATTabs/blob/master/attabs/attabs.pas#L894 char $2026 is ellipsis. Can also use '...' or '..' -- Regards, Alexey Torgashin -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Proud to announce..
I see that you converted FPC project to JS and inserted it into the webpage. Is it correct? It is achievement, yes... -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
[Lazarus] IDE ImageList editor layout needs fix
Colorbox "fuchsia" on the right bottom: it's too narrow, text don't fit. -- Regards, Alexey -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
[Lazarus] With new Win32 manifest LongPathAware I cannot make long filename
This app cannot make 2nd folder (it can make 1st) and make file. Error on file saving. why? new manifest option is used. Win10. { TForm1 } const s1='w123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012'; base='c:\work\'; procedure TForm1.Button1Click(Sender: TObject); var f: TStringList; begin ForceDirectories(base+s1+'\'+s1); f:= tstringlist.create; f.add('zzz'); f.SaveToFile(base+s1+'\'+s1+'\test.txt'); f.free; end; -- Regards, Alexey -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
[Lazarus] IDE Project Options - icon needed
Button "Load default" in Icon group - needs new icon, which is used for "set default" buttons in IDE. it is brown curved arrow. -- Regards, Alexey -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Long paths manifest
https://bugs.freepascal.org/view.php?id=34573 my attempt. I'm not sure about correct place of XML option. I did it like this page shows: https://gist.github.com/riverar/196d5aa6bb53bbdfb50beb323d0709df . So pls check it in work. AT -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Long paths manifest
On 20.11.2018 1:17, Denis Kozlov via lazarus wrote: Any thoughts on integrating I'm making the patch. I dont know on which XML level to insert new XML part - inside or out of it in the root? xmlns:ws2="http://schemas.microsoft.com/SMI/2016/WindowsSettings";> true -- Regards, Alexey -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Long paths manifest
--File I/O functions in the Windows API convert "/" to "\" as part of converting the name to an NT-style name, except when using the "\\?\" prefix as detailed in the following sections. So apps may have new bugs from this prefix. when app uses / shashes (fn := dir + '/' + name) by mistake. Alex -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
[Lazarus] IDE About: layout fix
patch adds BorderSpacing.Around=6 for Memo of IDE About dialog. -- Regards, Alexey Index: ide/aboutfrm.lfm === --- ide/aboutfrm.lfm (revision 59418) +++ ide/aboutfrm.lfm (working copy) @@ -191,6 +191,7 @@ AnchorSideRight.Control = AboutPage AnchorSideRight.Side = asrBottom AnchorSideBottom.Control = OfficialLabel +BorderSpacing.Around = 6 Left = 0 Height = 253 Top = 0 -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
[Lazarus] App UI scaling idea
I saw in some apps an option: scale UI - 100%..300%. Eg in Telegram. Can it be idea for LCL? Can u add global variable, GlobalScalingPercents, which is affected by OS PixelPerInch, but also can be affected by app? App can give option like in Telegram. -- Regards, Alexey -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
[Lazarus] More inline's for LazUtils
patch adds inline to NN tiny functions. -- Regards, Alexey Index: components/lazutils/lazutf8.pas === --- components/lazutils/lazutf8.pas (revision 59373) +++ components/lazutils/lazutf8.pas (working copy) @@ -67,10 +67,10 @@ procedure GetLocaleFormatSettingsUTF8(LCID: Integer; var aFormatSettings: TFormatSettings); {$endif} -Function GetEnvironmentVariableCountUTF8: Integer; -function GetEnvironmentStringUTF8(Index: Integer): string; -function GetEnvironmentVariableUTF8(const EnvVar: string): String; -function SysErrorMessageUTF8(ErrorCode: Integer): String; +Function GetEnvironmentVariableCountUTF8: Integer; inline; +function GetEnvironmentStringUTF8(Index: Integer): string; inline; +function GetEnvironmentVariableUTF8(const EnvVar: string): String; inline; +function SysErrorMessageUTF8(ErrorCode: Integer): String; inline; // Returns the size of one codepoint in bytes. function UTF8CodepointSize(p: PChar): integer; inline; @@ -86,10 +86,10 @@ // Functions dealing with unicode number U+xxx. function UTF8CodepointToUnicode(p: PChar; out CodepointLen: integer): Cardinal; -function UTF8CharacterToUnicode(p: PChar; out CharLen: integer): Cardinal; deprecated 'Use UTF8CodepointToUnicode instead.'; +function UTF8CharacterToUnicode(p: PChar; out CharLen: integer): Cardinal; inline; deprecated 'Use UTF8CodepointToUnicode instead.'; function UnicodeToUTF8(CodePoint: cardinal): string; // UTF32 to UTF8 function UnicodeToUTF8(CodePoint: cardinal; Buf: PChar): integer; // UTF32 to UTF8 -function UnicodeToUTF8SkipErrors(CodePoint: cardinal; Buf: PChar): integer; // UTF32 to UTF8 +function UnicodeToUTF8SkipErrors(CodePoint: cardinal; Buf: PChar): integer; inline; // UTF32 to UTF8 function UnicodeToUTF8Inline(CodePoint: cardinal; Buf: PChar): integer; inline; // UTF32 to UTF8 function UTF8ToDoubleByteString(const s: string): string; function UTF8ToDoubleByte(UTF8Str: PChar; Len: PtrInt; DBStr: PByte): PtrInt; @@ -99,14 +99,14 @@ function Utf8TryFindCodepointStart(const AString: String; var Index: Integer; out CharLen: Integer): Boolean; // find the n-th UTF8 codepoint, ignoring BIDI function UTF8CodepointStart(UTF8Str: PChar; Len, CodepointIndex: PtrInt): PChar; -function UTF8CharStart(UTF8Str: PChar; Len, CharIndex: PtrInt): PChar; deprecated 'Use UTF8CodepointStart instead.'; +function UTF8CharStart(UTF8Str: PChar; Len, CharIndex: PtrInt): PChar; inline; deprecated 'Use UTF8CodepointStart instead.'; // find the byte index of the n-th UTF8 codepoint, ignoring BIDI (byte len of substr) -function UTF8CodepointToByteIndex(UTF8Str: PChar; Len, CodepointIndex: PtrInt): PtrInt; -function UTF8CharToByteIndex(UTF8Str: PChar; Len, CharIndex: PtrInt): PtrInt; deprecated 'Use UTF8CodepointToByteIndex instead.'; +function UTF8CodepointToByteIndex(UTF8Str: PChar; Len, CodepointIndex: PtrInt): PtrInt; inline; +function UTF8CharToByteIndex(UTF8Str: PChar; Len, CharIndex: PtrInt): PtrInt; inline; deprecated 'Use UTF8CodepointToByteIndex instead.'; procedure UTF8FixBroken(P: PChar); overload; procedure UTF8FixBroken(var S: string); overload; function UTF8CodepointStrictSize(P: PChar): integer; -function UTF8CharacterStrictLength(P: PChar): integer; deprecated 'Use UTF8CodepointStrictSize instead.'; +function UTF8CharacterStrictLength(P: PChar): integer; inline; deprecated 'Use UTF8CodepointStrictSize instead.'; function UTF8CStringToUTF8String(SourceStart: PChar; SourceLen: PtrInt) : string; function UTF8Pos(const SearchForText, SearchInText: string; StartPos: SizeInt = 1): PtrInt; @@ -125,21 +125,21 @@ Flags: TReplaceFlags; ALanguage: string=''): String; function UTF8LowerCase(const AInStr: string; ALanguage: string=''): string; -function UTF8LowerString(const s: string): string; +function UTF8LowerString(const s: string): string; inline; function UTF8UpperCase(const AInStr: string; ALanguage: string=''): string; -function UTF8UpperString(const s: string): string; +function UTF8UpperString(const s: string): string; inline; function UTF8SwapCase(const AInStr: string; ALanguage: string=''): string; // Capitalize the first letters of every word function UTF8ProperCase(const AInStr: string; const WordDelims: TSysCharSet): string; function FindInvalidUTF8Codepoint(p: PChar; Count: PtrInt; StopOnNonUTF8: Boolean = true): PtrInt; -function FindInvalidUTF8Character(p: PChar; Count: PtrInt; StopOnNonUTF8: Boolean = true): PtrInt; deprecated 'Use FindInvalidUTF8Codepoint instead.'; +function FindInvalidUTF8Character(p: PChar; Count: PtrInt; StopOnNonUTF8: Boolean = true): PtrInt; inline; deprecated 'Use FindInvalidUTF8Codepoint instead.'; function UTF8StringOfChar(AUtf8Char: String; N: Integer): String; function UTF8AddChar(AUtf8Char: String; const S: String; N: Integer): String; function UTF8AddCharR(AUtf8Char: String; const S: String; N: Integer): String; -function UTF8PadLeft(const S: String; const N: Integer; const AUtf8Char: String
[Lazarus] Patch for MK_ALT
revised patch (ignore prev message about "Forms.pp function error"). Needs some testing on Carbon/Cocoa, because MK_ALT const is defined in Mac WS'es. -- Regards, Alexey Index: lcl/interfaces/carbon/carbonproc.pp === --- lcl/interfaces/carbon/carbonproc.pp (revision 59355) +++ lcl/interfaces/carbon/carbonproc.pp (working copy) @@ -329,7 +329,7 @@ VK_SCROLL: Result := MK_SCRLOCK; VK_SHIFT : Result := MK_SHIFTKEY; VK_CONTROL : Result := MK_COMMAND; - VK_MENU : Result := MK_ALT; + VK_MENU : Result := CarbonProc.MK_ALT; // see LCLType.MK_ALT VK_OEM_3 : Result := MK_TILDE; //VK_OEM_MINUS : Result := MK_MINUS; VK_OEM_PLUS : Result := MK_EQUAL; @@ -482,7 +482,7 @@ if (ButtonState and 4) > 0 then Inc(Result, MK_MButton); if (shiftKeyand Modifiers) > 0 then Inc(Result, MK_Shift); if (controlKey and Modifiers) > 0 then Inc(Result, MK_Control); - if (optionKey and Modifiers) > 0 then Inc(Result, $2000); + if (optionKey and Modifiers) > 0 then Inc(Result, LCLType.MK_ALT); // see CarbonProc.MK_ALT //DebugLn('GetCarbonMsgKeyState Result=',dbgs(KeysToShiftState(Result)),' Modifiers=',hexstr(Modifiers,8),' ButtonState=',hexstr(ButtonState,8)); end; Index: lcl/interfaces/cocoa/cocoautils.pas === --- lcl/interfaces/cocoa/cocoautils.pas (revision 59355) +++ lcl/interfaces/cocoa/cocoautils.pas (working copy) @@ -815,7 +815,7 @@ VK_SCROLL: Result := MK_SCRLOCK; VK_SHIFT : Result := MK_SHIFTKEY; VK_CONTROL : Result := MK_COMMAND; - VK_MENU : Result := MK_ALT; + VK_MENU : Result := CocoaUtils.MK_ALT; // LCLType.MK_ALT exists VK_OEM_3 : Result := MK_TILDE; VK_OEM_MINUS : Result := MK_MINUS; VK_OEM_PLUS : Result := MK_EQUAL; Index: lcl/interfaces/cocoa/cocoawscommon.pas === --- lcl/interfaces/cocoa/cocoawscommon.pas (revision 59355) +++ lcl/interfaces/cocoa/cocoawscommon.pas (working copy) @@ -253,7 +253,7 @@ if AModifiers and NSControlKeyMask <> 0 then Result := Result or MK_CONTROL; if AModifiers and NSAlternateKeyMask <> 0 then -Result := Result or $2000; +Result := Result or LCLType.MK_ALT; // see CocoaUtils.MK_ALT end; class function TLCLCommonCallback.CocoaPressedMouseButtonsToKeyState(AMouseButtons: NSUInteger): PtrInt; @@ -474,7 +474,8 @@ IsSysKey := (Event.modifierFlags and NSCommandKeyMask) <> 0; KeyData := (Ord(Event.isARepeat) + 1) or Event.keyCode shl 16; if (Event.modifierFlags and NSAlternateKeyMask) <> 0 then - KeyData := KeyData or $2000; // So that MsgKeyDataToShiftState recognizes Alt key, see bug 30129 + KeyData := KeyData or LCLType.MK_ALT; // So that MsgKeyDataToShiftState recognizes Alt key, see bug 30129 + // see CocoaUtils.MK_ALT KeyCode := Event.keyCode; //non-printable keys (see mackeycodes.inc) @@ -844,7 +845,8 @@ IsSysKey := (Event.modifierFlags and NSCommandKeyMask) <> 0; KeyData := (Ord(Event.isARepeat) + 1) or Event.keyCode shl 16; if (Event.modifierFlags and NSAlternateKeyMask) <> 0 then -KeyData := KeyData or $2000; // So that MsgKeyDataToShiftState recognizes Alt key, see bug 30129 +KeyData := KeyData or LCLType.MK_ALT; // So that MsgKeyDataToShiftState recognizes Alt key, see bug 30129 +// see CocoaUtils.MK_ALT KeyCode := Event.keyCode; VKKeyCode := MacCodeToVK(KeyCode); Index: lcl/interfaces/gtk3/gtk3widgets.pas === --- lcl/interfaces/gtk3/gtk3widgets.pas (revision 59355) +++ lcl/interfaces/gtk3/gtk3widgets.pas (working copy) @@ -1494,7 +1494,7 @@ if AIsKeyEvent then Result := Result or KF_ALTDOWN else - Result := Result or $2000; + Result := Result or MK_ALT; end; end; @@ -1581,7 +1581,7 @@ ShiftState := ShiftState + [ssShift]; if AState and MK_CONTROL <> 0 then ShiftState := ShiftState + [ssCtrl]; - if AState and $2000 <> 0 then + if AState and MK_ALT <> 0 then ShiftState := ShiftState + [ssAlt]; // MappedXY := TranslateGdkPointToClientArea(AEvent^.scroll.window, EventXY, //{%H-}TGtk3Widget(AWinControl.Handle).GetContainerWidget); Index: lcl/interfaces/mui/muibaseunit.pas === --- lcl/interfaces/mui/muibaseunit.pas (revision 59355) +++ lcl/interfaces/mui/muibaseunit.pas (working copy) @@ -1574,9 +1574,9 @@ begin Result := 0; if State and IEQUALIFIER_LALT <> 0 then -Result := Result or $2000; +Result := Result or MK_ALT; //if State and IEQUALIFIER_RALT <> 0 then - // Result := Result or $2000; + // Result := Result or MK_ALT;
[Lazarus] Forms.pp function error?
As pointed by Dmitry B, and checked by myself in LCL, MK_ALT must be defined in LCLType.pp as $2000. For ex, this is sample from qtwidgets.pas: if (ModifierState and MK_SHIFT) <> 0 then Msg.State := [ssShift]; if (ModifierState and MK_CONTROL) <> 0 then Msg.State := [ssCtrl] + Msg.State; if (ModifierState and $2000) <> 0 then Msg.State := [ssAlt] + Msg.State; patch added. -- Regards, Alexey Index: lcl/lcltype.pp === --- lcl/lcltype.pp (revision 59355) +++ lcl/lcltype.pp (working copy) @@ -2836,6 +2836,7 @@ MK_DOUBLECLICK = $80; MK_TRIPLECLICK = $100; MK_QUADCLICK = $200; + MK_ALT = $2000; // used (as number) by several widgetsets //== // Constants from commctrl -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
[Lazarus] Micro optimization for LazUtils
added 2 inline's + fixed for loop. -- Regards, Alexey Index: components/lazutils/fpcadds.pas === --- components/lazutils/fpcadds.pas (revision 59355) +++ components/lazutils/fpcadds.pas (working copy) @@ -25,24 +25,21 @@ function StrToWord(const s: string): word; -function AlignToPtr(const p: Pointer): Pointer; -function AlignToInt(const p: Pointer): Pointer; +function AlignToPtr(const p: Pointer): Pointer; inline; +function AlignToInt(const p: Pointer): Pointer; inline; implementation function StrToWord(const s: string): word; var - p: Integer; + i: Integer; begin Result:=0; - p:=1; - while (p<=length(s)) do begin -Result:=Result*10+ord(s[p])-ord('0'); -inc(p); - end; + for i:=1 to Length(s) do +Result:=Result*10+ord(s[i])-ord('0'); end; -function AlignToPtr(const p: Pointer): Pointer; +function AlignToPtr(const p: Pointer): Pointer; inline; begin {$IFDEF FPC_REQUIRES_PROPER_ALIGNMENT} Result := Align(p, SizeOf(Pointer)); @@ -51,7 +48,7 @@ {$ENDIF} end; -function AlignToInt(const p: Pointer): Pointer; +function AlignToInt(const p: Pointer): Pointer; inline; begin {$IFDEF FPC_REQUIRES_PROPER_ALIGNMENT} Result := Align(p, SizeOf(integer)); -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
[Lazarus] IDE Restriction Browser layout patch
Patch adds BorderSpacing (6) for 3 main controls on the form. -- Regards, Alexey Index: ide/restrictionbrowser.lfm === --- ide/restrictionbrowser.lfm (revision 59319) +++ ide/restrictionbrowser.lfm (working copy) @@ -7,25 +7,29 @@ ClientHeight = 405 ClientWidth = 674 OnCreate = FormCreate - LCLVersion = '1.5' + LCLVersion = '2.1.0.0' object IssueMemo: TMemo -Left = 311 -Height = 405 -Top = 0 -Width = 363 +Left = 323 +Height = 393 +Top = 6 +Width = 345 Align = alClient +BorderSpacing.Top = 6 +BorderSpacing.Right = 6 +BorderSpacing.Bottom = 6 ReadOnly = True ScrollBars = ssAutoVertical TabOrder = 2 end object Panel1: TPanel -Left = 0 -Height = 405 -Top = 0 +Left = 6 +Height = 393 +Top = 6 Width = 306 Align = alLeft +BorderSpacing.Around = 6 BevelOuter = bvNone -ClientHeight = 405 +ClientHeight = 393 ClientWidth = 306 TabOrder = 0 object IssueFilterGroupBox: TGroupBox @@ -34,15 +38,16 @@ Top = 0 Width = 306 Align = alTop + BorderSpacing.Bottom = 6 Caption = 'IssueFilterGroupBox' - ClientHeight = 76 + ClientHeight = 77 ClientWidth = 302 TabOrder = 0 object NameLabel: TLabel Left = 10 -Height = 15 +Height = 17 Top = 44 -Width = 60 +Width = 77 Caption = 'NameLabel' ParentColor = False end @@ -49,14 +54,13 @@ object FilterEdit: TTreeFilterEdit AnchorSideLeft.Control = NameLabel AnchorSideLeft.Side = asrBottom -Left = 76 -Height = 23 +Left = 93 +Height = 27 Top = 41 Width = 156 -UseFormActivate = True ButtonWidth = 23 +BorderSpacing.Left = 6 NumGlyphs = 1 -BorderSpacing.Left = 6 MaxLength = 0 TabOrder = 0 FilteredTreeview = IssueTreeView @@ -64,12 +68,11 @@ end object IssueTreeView: TTreeView Left = 0 - Height = 309 - Top = 96 + Height = 291 + Top = 102 Width = 306 Align = alClient Anchors = [akTop, akLeft, akBottom] - DefaultItemHeight = 18 HideSelection = False Indent = 2 ReadOnly = True @@ -84,7 +87,7 @@ end end object Splitter1: TSplitter -Left = 306 +Left = 318 Height = 405 Top = 0 Width = 5 -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Forms.pp function error?
Value $400 makes sense. And also this must be changed then: function KeysToShiftState(Keys: PtrUInt): TShiftState; it uses same constants. Alex -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Forms.pp function error?
On 16.10.2018 09:56, Michael Van Canneyt via Lazarus wrote: There does not need to be if there is no corresponding MK_nnn value ? What would be the MK_nnn value for ssAlt ? We can add in, LCLType.pp: const // Mouse message key states MK_LBUTTON = 1; MK_RBUTTON = 2; MK_SHIFT = 4; MK_CONTROL = 8; MK_MBUTTON = $10; MK_XBUTTON1 = $20; MK_XBUTTON2 = $40; // following are "virtual" key states MK_DOUBLECLICK = $80; MK_TRIPLECLICK = $100; MK_QUADCLICK = $200; -- Regards, Alexey -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
[Lazarus] Forms.pp function error?
function ShiftStateToKeys(ShiftState: TShiftState): PtrUInt; begin Result := 0; if ssShift in ShiftState then Result := Result or MK_SHIFT; if ssCtrl in ShiftState then Result := Result or MK_CONTROL; if ssLeft in ShiftState then Result := Result or MK_LBUTTON; if ssRight in ShiftState then Result := Result or MK_RBUTTON; if ssMiddle in ShiftState then Result := Result or MK_MBUTTON; if ssExtra1 in ShiftState then Result := Result or MK_XBUTTON1; if ssExtra2 in ShiftState then Result := Result or MK_XBUTTON2; if ssDouble in ShiftState then Result := Result or MK_DOUBLECLICK; if ssTriple in ShiftState then Result := Result or MK_TRIPLECLICK; if ssQuad in ShiftState then Result := Result or MK_QUADCLICK; end; I don't see here "if ssAlt in " line -- Regards, Alexey -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
[Lazarus] IDE Scout issue
https://bugs.freepascal.org/view.php?id=34383 just a reminder. -- Regards, Alexey -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Package IDE Spotter renamed to IDE Scout
I see truncated label "Default width" in Scout opts: screenshot. -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus