[Lazarus] IDE Component-dialog: small button

2017-02-05 Thread Alexey via Lazarus
In this dialog, button Use is too narrow. Can i make diff, to make it wide, e.g. 80pix? -- Regards, Alexey -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus

Re: [Lazarus] LCL High-DPI

2017-02-21 Thread Alexey via Lazarus
On 21.02.2017 12:21, Maciej Izak via Lazarus wrote: Thanks to your work Lazarus is now much, much better than Delphi in this field ^^. Yes, thanks to Ondrej, very good work -- Regards, Alexey -- ___ Lazarus mailing list

Re: [Lazarus] Check for 'default' font

2017-02-20 Thread Alexey via Lazarus
On 20.02.2017 04:23, Mattias Gaertner via Lazarus wrote: Why is SameText best? Mattias Because it's working in all cases (for ansistring it's ok, for Unicode font names it will work too, yes?) and it's short -- Regards, Alexey -- ___ Lazarus

[Lazarus] Check for 'default' font

2017-02-17 Thread Alexey via Lazarus
I find all places of 'default' in Laz- Here you see all variants... :( Pls, make one variant. SameText(..., 'default') is best. if AnsiCompare(.., 'default')=0 then if SameText(.., 'default') then if CompareText(... 'default')=0 then if CompareText(... 'default')<>0 then if ='default'

Re: [Lazarus] Always on top: Object Inspector and Message Window

2017-02-17 Thread Alexey via Lazarus
Uploaded my tiny fix , there too On 18.02.2017 05:17, Kapibara Pas via Lazarus wrote: I uploaded a patch for each affected file and added a note. -- Regards, Alexey -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org

Re: [Lazarus] IDE message-window - noise

2017-02-17 Thread Alexey via Lazarus
On 17.02.2017 19:50, Ondrej Pokorny via Lazarus wrote: IDE Options -> Messages Window -> Focus messages at compilation I know- it DONT work: i have it unchecked on 2 PCs. already. and still foreground Msg wnd. -- Regards, Alexey -- ___ Lazarus

[Lazarus] IDE message-window - noise

2017-02-17 Thread Alexey via Lazarus
I often make little change in code, press F9/CtrlF9, then, if error, Messages window (with errors info) pops up AND goes to foreground. It's vary bad- that it makes foregnd, coz I cannot change code by keyboard. I must close Msg window then. Only then i can correct the code error:( Ubuntu

[Lazarus] TaskDialog asking

2017-02-14 Thread Alexey via Lazarus
I dont see how to - use Timer in taskdialog: I dont see event OnTimer or smth (flag for timer exists!) - show dialog with non-expanded style, ie how to use ExpandButtonCaption - set icon with some Std id. ie Stop, Warn, Shield- main icon, footer too -- Regards, Alexey --

Re: [Lazarus] TaskDialog asking

2017-02-15 Thread Alexey via Lazarus
On 15.02.2017 11:41, Ondrej Pokorny via Lazarus wrote: use Timer in taskdialog: I dont see event OnTimer or smth (flag for timer exists!) To autoclose form, if e.g. app wants to show 8 seconds, and then do YES. e.g "Reboot OS now? Waiting 30 sec" -- Regards, Alex --

[Lazarus] Wish, remove this GTK2 debug line

2016-10-10 Thread Alexey via Lazarus
On 11.10.2016 04:29, Alexey via Lazarus wrote: remove that Debug line which prints error. I misread the subject: I mean that debug line- user@user-Notebook:~$ cudatext WARNING: TGtk2WidgetSet.InvalidateRect refused invalidating during paint message: TATSynEdit WARNING

[Lazarus] Non UTF8 func in LCL

2016-11-01 Thread Alexey via Lazarus
hi I found (CudaText finder, 16 matches) of non UTF8 func GetEnvironmentVariable (no suffix UTF8) in lcl. Consider to replace with GetEnvironmentVariableUTF8. Img of found lines https://postimg.org/image/julazv1h7/ Alex -- ___ Lazarus mailing list

Re: [Lazarus] Wish, remove this GTK2 debug line

2016-10-11 Thread Alexey via Lazarus
On 11.10.2016 16:59, Mattias Gaertner via Lazarus wrote: Please create bug report with an example to reproduce this. Hm, this is work to make an example; why not to comment this msg in GTK2 widget? -- Regards, Alex -- ___ Lazarus mailing list

[Lazarus] Dupl. code: ScaleCoord

2016-12-06 Thread Alexey via Lazarus
Ondrej function TControl.ScaleCoord(const ASize: Integer): Integer; function TControl.ScaleCoord96(const ASize: Integer): Integer; function TControl.ScaleCoord96Back(const ASize: Integer): Integer; function TControl.ScaleCoordBack(const ASize: Integer): Integer; we have 4 almost the same

[Lazarus] Patch for ShortcutToText, array

2016-12-08 Thread Alexey via Lazarus
Juha, what do you think about this big patch. http://mantis.freepascal.org/view.php?id=30992 It is changing only that some IDE dialog shows now other key names (shorter), e.g. "Left", was before "arrow left" (and for "PgDown", "Ins", ..). IMO this dialog is rare used, and new keys names are ok.

Re: [Lazarus] New high DPI features in 1.7

2016-12-09 Thread Alexey via Lazarus
On 09.12.2016 14:15, Kostas Michalopoulos via Lazarus wrote: Although this is a step forward I think working with pixels is something from the past It is normal even today, coz we have raster GUI, only in rare cases frameworks do give us the vector graphic. It is GUIs in games. -- Regards,

Re: [Lazarus] Patch for ShortcutToText, array

2016-12-10 Thread Alexey via Lazarus
On 10.12.2016 13:45, Juha Manninen via Lazarus wrote: Pick the one that bothers you most and fix it. I will apply your patch if it works. I see what you mean, making substancial. Why I dont do it 80% of time, is because I dont see these bugs. In my app CudaText. If i see these bugs, i try to

[Lazarus] Qt is broken, ATSynedit

2016-12-16 Thread Alexey via Lazarus
The trunk updates broke ATSynedit on Qt. How to repeat: - install package ATSynedit - open demo: app/demo_editor - run it - on form with editor, drag vert-scrollbar; or: do mousewheel down ->> crash inside Qt -- Regards, Alex -- ___ Lazarus mailing

Re: [Lazarus] About TDateEdit

2017-01-12 Thread Alexey via Lazarus
Also posted the pch to the same Mantis. > and the other one? No full date on exit ? -- Regards, Alexey -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus

Re: [Lazarus] About TDateEdit

2017-01-12 Thread Alexey via Lazarus
I posted the pch to Mantis, which addresses this issue. to check against "" on exit and set date to "NullDate" value. Is current behavior expected ? -- Regards, Alexey -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org

Re: [Lazarus] CCR, how to send files?

2016-12-01 Thread Alexey via Lazarus
>Vincent answered in the meantime? Yes, thks, I've sent my files to him. -- Regards, Alex -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus

Re: [Lazarus] AutoAdjustLayout fixes

2016-12-01 Thread Alexey via Lazarus
On 30.11.2016 22:29, Ondrej Pokorny via Lazarus wrote: Just curious: what widget set do you use for macOS? Carbon, and soon I want Cocoa but have problem with TFontDialog on cocoa. (so I wait). -- Regards, Alex -- ___ Lazarus mailing list

Re: [Lazarus] TextHint rewrite

2016-12-02 Thread Alexey via Lazarus
On 14.11.2016 17:32, Ondrej Pokorny via Lazarus wrote: For now I rewrote the TextHint emulation Can we have Italic style of textHint , like before? In e.g. IDE filter boxes. -- Regards, Alex -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org

Re: [Lazarus] Temp dir for unnamed proj

2016-12-20 Thread Alexey via Lazarus
On 20.12.2016 20:44, wkitty42--- via Lazarus wrote: you can change the name of the temp folder where unnamed projects are compiled... I see that this is not true. I entered in options dlg "temp"== not found any options with it. So i cannot do it. -- Regards, Alex --

Re: [Lazarus] Temp dir for unnamed proj

2016-12-20 Thread Alexey via Lazarus
On 20.12.2016 22:47, wkitty42--- via Lazarus wrote: in lazarus... TOOLS->Options->environment Ok. found. My wish is: - default value += /laz - IDE creates this folder -- Regards, Alex -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org

[Lazarus] Temp dir for unnamed proj

2016-12-20 Thread Alexey via Lazarus
Wish: make a subfolder for temp unnamed proj files. Inside tmp/, make subdir. Now I see such crap files in my ~/tmp, not good for viewing temp, and finding LOGs here: user@user-Notebook:~/tmp$ ls backup project1 project1.lpr unit1.lfm lib project1.ico project1.res unit1.pas --

[Lazarus] Xneur issue, Linux

2017-03-24 Thread Alexey via Lazarus
"xneur" package exists in Ubuntu. Site for app exists too. Install, run. Now in GEdit/ Sublime type: //PRosto SOme aa xneur fixes it: //Prosto Some aa In Lazarus IDE xneur makes error: //PRostoProst SOmeSome aa (its a test, real usage not needed in IDE. needed in apps.) Not Synedit bug, same

[Lazarus] macOS trackpad horz scroll

2017-03-24 Thread Alexey via Lazarus
Carbon has LM_MOUSEWHEEL: begin y := PLMMouseEvent(@AMessage)^.Y; x := PLMMouseEvent(@AMessage)^.X; end; but need one more: LM_MOUSEWHEEL_HORZ, maybe. Mac trackpad can scroll view with 2 fingers: vert scroll already does lm_mousewheel, and horz scroll?

Re: [Lazarus] macOS trackpad horz scroll

2017-03-25 Thread Alexey via Lazarus
I wanted this change: - Carbon WS can read horz mouse wheel. it sends e.g. LM_WHEELSCROLL_HORZ - LCL generates as usual OnMouseWheel (Up/Down), but if it is horiz wheel move, then it adds flag ssScrollHorz to Shift parameter. - app can detect horiz wheel move, by ssScrollHorz No need to

[Lazarus] TLMMouseEvent axis

2017-03-27 Thread Alexey via Lazarus
Hi It is needed (for Carbon with mac trackpad) to use Axis field (1 bit is okay: vertical=0; horiz=1) in this record. Pls add it? Maybe add at end. PLMMouseEvent = ^TLMMouseEvent; TLMMouseEvent = record Msg: Cardinal; {$ifdef cpu64} UnusedMsg: Cardinal; {$endif} {$IFDEF

[Lazarus] MacOS horz scroll via trackpad -patch

2017-03-29 Thread Alexey via Lazarus
I posted 1st step, which supports MacOS horizontal scroll (via 2 fingers on trackpad) to http://bugs.freepascal.org/view.php?id=29972 Pls apply. CudaText uses it. Now it scrolls horz, it is 1st app on Mac which can scroll horz via trackpad (not by scrollbars). This step added setting of

Re: [Lazarus] Online Package Manager

2017-03-31 Thread Alexey via Lazarus
GetMem, it would be very good, if all Json files, for components, will be hosted on one Github repo. Now they are distributed (on NNN servers, etc). You can make repo for them. Alexey -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org

Re: [Lazarus] Online Package Manager

2017-03-31 Thread Alexey via Lazarus
It must not be the problem. Many apps use GH, and they need patches on GH, and users make them on GH. however some of the developers prefer GitHub, others BitBucket or SourceForge. It's very hard to convince somebody to move just for the sake of OPM. -- Regards, Alexey --

Re: [Lazarus] Online Package Manager

2017-03-31 Thread Alexey via Lazarus
On 31.03.2017 21:43, Balázs Székely via Lazarus wrote: - OPM becomes faster - it's more easier to maintain etc.. IMO benefit will be. it is "easier to maintain". Each developer which wants to send json, makes GH acc, then clones OPM repo, then sends pull req. No emails. Zip can be send in

Re: [Lazarus] Widgetset TPenMode- where?

2017-03-16 Thread Alexey via Lazarus
I found it- it is R2_ int values, for each of TPenMode values. Alexey -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus

[Lazarus] Toolbar config- small issue

2017-03-18 Thread Alexey via Lazarus
At picture i see now "lblSelect" name on right -- Regards, Alexey -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus

[Lazarus] Was bug on moving to 2nd monitor

2017-03-20 Thread Alexey via Lazarus
Bug report about manifest on Win10: opt "dpi aware = true/PM". it works bad, if: - I maximized Cudatext window on 1st monitor - I drag window caption to 2nd monitor On moved to 2nd mon, Cudatext window takes 0x0 size, limited to minimal window size(?). It is about 100x30pixels now, all content

[Lazarus] IDE FindInFiles tool button

2017-03-15 Thread Alexey via Lazarus
I placed toolbar btn for FindInFiles action. I use to often- even if no editor tabs opened. But if no editor tabs opened, IDE don't do action on click on this button. (like button disabled, but it's enabled.) Maybe Ondrej, or some, can see this? (Mantis issue already posted) -- Regards,

[Lazarus] Widgetset TPenMode- where?

2017-03-16 Thread Alexey via Lazarus
I cannot find where Carbon makes code for TPenMode (I need to see why one mode works bad, pmNotXor) I search TPenMode and find only gtk3 items?? +Search for "TPenMode" in "/home/user/lazarus/lcl/interfaces" (4 matches in 1 files) : #4 : #4 : #4 <(98)>:

[Lazarus] Win32 setting menu shortcut

2017-04-06 Thread Alexey via Lazarus
The 1st function can call 2nd and be simple. function CompleteMenuItemCaption(const AMenuItem: TMenuItem; Spacing: String): string; begin Result := AMenuItem.Caption; if AMenuItem.ShortCut <> scNone then Result := Result + Spacing + MenuItemShortCut(AMenuItem); end; (* Idem with

Re: [Lazarus] Startup environment: to Gui, or not to GUI?

2017-04-11 Thread Alexey via Lazarus
Hi I use text out in CudaText GUI editor. Just call Writeln(.); and then Halt. Inside Form's OnCreate method. On 11.04.2017 12:15, Mark Morgan Lloyd via Lazarus wrote: Is there an orthodox way that a Lazarus program can very early on look at how it's been started and decide whether it

[Lazarus] Compiling Cudatext on RPi 3

2017-04-14 Thread Alexey via Lazarus
Hi, I'm new to RPi 3. only byed it (sum is bigger than in Europe). Maybe someone helps to compile CudaText on RPi, ie ARM. I can distribute compiled app. as ARM version. On Raspbian i don't know how to install Lazarus, FPC, svn .. ps. I can put to site url to your homepage (with compiled

Re: [Lazarus] Linux 64 to Linux ARC crosscompile was:Lazarus and Windows 10 IoT

2017-04-22 Thread Alexey via Lazarus
hi With this help inf, I could make CudaText for Linux-ARM. Raspberry Pi 3. It works. Thanks for the info. Alexey -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus

Re: [Lazarus] Mac users: High-DPI

2017-03-10 Thread Alexey via Lazarus
Ondrej, 2 pictures. Cudatext on Linux, text font size =9. Cudatext on OSX 10.8, font size (other font but siimilar) =9. Font size looks same. on both OSes. No difference 30-50%. (Mac Font dialog shows size=12 for LCL font size=9. you know.) No problem so? Alex --

Re: [Lazarus] Mac users: High-DPI

2017-03-09 Thread Alexey via Lazarus
On 09.03.2017 16:01, Ondrej Pokorny via Lazarus wrote: will have the ScaleFactor equivalent (I'll keep PixelsPerInch). Probably more changes will be needed. On Windows: DesignTimePPI=96 -> DesignTimeScaleFactor=100 <- On Mac: DesignTimePPI=72. The same goes for PixelsPerInch/ScaleFactor. IMO

Re: [Lazarus] Mac users: High-DPI

2017-03-09 Thread Alexey via Lazarus
On 09.03.2017 21:58, Ondrej Pokorny via Lazarus wrote: can you tell why the Mac font becomes bigger? Because Font: Height := -MulDiv(Size, *PixelsPerInch*, 72); If you change 72 here too to 96, it will be okay? -- Regards, Alexey -- ___ Lazarus

Re: [Lazarus] Mac Hi-DPI 2

2017-03-09 Thread Alexey via Lazarus
This picture is OS opts: here you see, max NNxNN dont change, but only hi-dpi "added to video mode". Alex -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus

Re: [Lazarus] Mac Hi-DPI 2

2017-03-11 Thread Alexey via Lazarus
On 11.03.2017 23:37, Ondrej Pokorny via Lazarus wrote: We have 2 possible solutions: The solition 3) don't scale the app down, from 96 LCL to 72, to any lower value than 96. -- Regards, Alexey -- ___ Lazarus mailing list

Re: [Lazarus] Mac Hi-DPI 2

2017-03-10 Thread Alexey via Lazarus
>To me it looks like Carbon applications are scaled automatically by the OS. Something similar to what also Windows yes, it is what I see too. Scaled automatically by OS >That means the regardless of your screen (retina, non-retina) the DPI is always 96. So there shouldn't be any

[Lazarus] LCL don't paint to canvas if a key is holded

2017-07-28 Thread Alexey via Lazarus
Problem: CudaText editor opens 400K file at the end, syntax parser is slow, I hold "d" char. expected: "d" or "d"*n chars appears from time to time. Eg each 1-2 seconds. Seen: "d" chars appears each 5-6 seconds.

Re: [Lazarus] Optimize SwapEndian for widestring?

2017-08-02 Thread Alexey via Lazarus
Thanks, it didn't compile, this this did: function SSwapEndian(const S: UnicodeString): UnicodeString; var i: integer; p: PWord; begin Result:= S; if S='' then exit; UniqueString(Result); P:= PWord(@Result[1]); for i:= 1 to Length(Result) do begin P^:= SwapEndian(P^);

Re: [Lazarus] dynamic string proposal

2017-08-16 Thread Alexey via Lazarus
On 16.08.2017 12:51, Mattias Gaertner via Lazarus wrote: When you propose a new string type "dynamicstring" you have to define these operators. BTW, it will be good to have "Cstring" (or another name, not "dynamicstring") : - [] operator is 0-based like Python/C - s[i] is DWORD per char

Re: [Lazarus] dynamic string proposal

2017-08-16 Thread Alexey via Lazarus
On 16.08.2017 15:30, Martin Frb via Lazarus wrote: A char can be composed of several combining code points (each of them afaik, in the 32 bit range). So a char can have 96 or more bits. (And not all of them have a combined form). See my prev post: i see that each S[i] good to be like QWord

[Lazarus] TShape cross shape

2017-07-14 Thread Alexey via Lazarus
IDE uses x mark for ComponentPalettePopup. it paints it custom way. I want to add TShape kind "cross". It may be used here in PalettePopup. For cross, so needed to add property "width of cross". I want to add prop ShapeSizeSmall: it may be width of cross + radius for rounded-rect. (now radius

Re: [Lazarus] IDE-SynEdit Caret Color

2017-07-18 Thread Alexey via Lazarus
Caret should paint via pmNotXor (or pmXor) pen mode. MacOS WS bug - it paints it always black. Win32 should paint Ok. Alexey -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus

Re: [Lazarus] IDE-SynEdit Caret Color

2017-07-18 Thread Alexey via Lazarus
>The code of the internal caret painter sets pmNotXor mode when drawing lines. The value seems to be ignored by WS Yes, it is ignored in Mac WSes. -- Regards, Alexey -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org

[Lazarus] pmXor pen mode on Mac

2017-07-20 Thread Alexey via Lazarus
Dmitry, i searched for pmXor and i see it's not implemented on Mac too? And it's used in Grids, 3 matches. +Search for "pmXor" in "/home/user/lazarus/lcl" (7 matches in 4 files) : #7 : #2 <(162)>: pmXor = FPCanvas.pmXor; <(162)>: pmXor = FPCanvas.pmXor;

[Lazarus] MenuItem's new methods

2017-07-20 Thread Alexey via Lazarus
Ondrej, thanks for adding this. Pls tell: is it possible to make MenuItems themes (application wide in all menus, or MainMenu)? this needs global OnDrawItem which will be used by LCL. Can you add it? -- Regards, AlexeyT -- ___ Lazarus mailing list

Re: [Lazarus] MenuItem's new methods

2017-07-20 Thread Alexey via Lazarus
For this you have the methods in TPopupMenu/TMainMenu. You should be able to link your global events there. Change of each PopupMenu +MainMenu is not nice: theming of all menus at once in nicer, global option. If app does theme for main menu, why not to change other popupmenus. -- Regards,

[Lazarus] Gtk2 missed try-finally

2017-07-25 Thread Alexey via Lazarus
gtk2proc.inc, procedure DrawImageListIconOnWidget: it allocates Bitmap + DC. Pls add try-finally for Bitmap; and (not sure) try-finally for DC: finally ReleaseDC(HDC({%H-}PtrUInt(DestWidget)),DestDC); end; finally Bitmap.Free; end; -- Regards, Alexey --

Re: [Lazarus] Gtk2 missed try-finally

2017-07-25 Thread Alexey via Lazarus
How did you manage to create a mem leak there? If not using try-finally, and exception, Bitmap will not be freed. -- Regards, Alexey -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus

Re: [Lazarus] ComparePoints func

2017-07-26 Thread Alexey via Lazarus
First start by defining what ComparePoints is supposed to measure or compare. yes, of course: compare source editor x/y positions. Ie, it is CompareCoords. -- Regards, Alexey -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org

Re: [Lazarus] ComparePoints func

2017-07-26 Thread Alexey via Lazarus
On 26.07.2017 18:11, Graeme Geldenhuys via Lazarus wrote: ComparePoints() returning a Integer is not a very friendly return type either, Hm, in my app Int makes sense: i need to compare Points in binary search, and see: >, <, =. -- Regards, Alexey --

[Lazarus] MessageBox mb_defbutton1

2017-07-19 Thread Alexey via Lazarus
This must show def-button Retry, as button#1, but shows def-button Cancel. Is it a bug? Linux gtk2 x64 if MsgBox{simple wrapper}(msgCannotSaveFile+#10+FFileName, MB_RETRYCANCEL or MB_ICONERROR or MB_DEFBUTTON1) = .. -- Regards, Alexey -- ___

Re: [Lazarus] New tool sspell for pascal programmers

2017-07-24 Thread Alexey via Lazarus
On 24.07.2017 04:07, Darius Blaszyk via Lazarus wrote: This tool extracts text from comments and string literals in source code files and checks them for spelling. Very useful It is already doable in CudaText editor: - install plugin SpellChecker [not ready for Win64] - open Pas file, call

[Lazarus] TreeView.MouseLeave issue

2017-06-30 Thread Alexey via Lazarus
procedure TCustomTreeView.MouseLeave; begin FStates:=FStates-[tvsDblClicked,tvsTripleClicked,tvsQuadClicked, tvsEditOnMouseUp,tvsSingleSelectOnMouseUp]; if Assigned(FHintWnd) and FHintWnd.Visible and not PtInRect(ClientRect, ScreenToClient(Mouse.CursorPos)) then

[Lazarus] Commment-2 about TAChart diff

2017-07-04 Thread Alexey via Lazarus
+ else if (pos('#', AText) = 1) and (Length(AText) = 7) then begin + Delete(AText, 1, 1); + Result.Red := StrToInt('$' + copy(AText, 1, 2)) shl 8; + Result.Green := StrToInt('$' + copy(AText, 3, 2)) shl 8; + Result.Blue := StrToInt('$' + copy(AText, 5, 2)) shl 8; + end else + you convert

[Lazarus] Commment-2 about TAChart diff

2017-07-04 Thread Alexey via Lazarus
+ else if (pos('#', AText) = 1) and (Length(AText) = 7) then begin + Delete(AText, 1, 1); + Result.Red := StrToInt('$' + copy(AText, 1, 2)) shl 8; + Result.Green := StrToInt('$' + copy(AText, 3, 2)) shl 8; + Result.Blue := StrToInt('$' + copy(AText, 5, 2)) shl 8; + end else + you convert

[Lazarus] Comment-3 about TAChart diff

2017-07-04 Thread Alexey via Lazarus
+ if len = 3 then begin + Result.Red := StrToInt('$' + AText[1]); + Result.Green := StrToInt('$' + AText[2]); + Result.Blue := StrToInt('$' + AText[3]); + end; not OK: #abe means color components $aa $bb $ee, not $a $b $e. -- Regards, Alexey --

[Lazarus] Comment about new LCL diff

2017-07-03 Thread Alexey via Lazarus
+function TDragManagerDefault.IsCanBeStartDragging(Site: TWinControl; AThreshold: Integer; X,Y:Integer): boolean; +var + Threshold:integer; + aRect:TRect; +begin + if AThreshold<=0 then +Threshold:=DragThreshold + else +Threshold:=AThreshold; + aRect := Site.ClientRect; +

[Lazarus] LCL Grids: AscImageIndex/DescImageIndex

2017-04-27 Thread Alexey via Lazarus
I like when props almost sorted by name. AscII / DescII will be not sorted, other props will mess it. So suggestion: names - SortAscImageIndex, SortDescImageIndex or - ImageIndexSortAsc, ImageIndexSortDesc -- Regards, Alexey -- ___ Lazarus

[Lazarus] Optimize SwapEndian for widestring?

2017-08-01 Thread Alexey via Lazarus
Pls tell can I optimize this func? E.g. calc each char's PWord and read/write word. function SSwapEndian(const S: UnicodeString): UnicodeString; var i: integer; begin Result:= S; for i:= 1 to Length(Result) do Result[i]:= WideChar(SwapEndian(Ord(Result[i]))); end; -- Regards, Alexey

Re: [Lazarus] TEdit appears empty when text is too long

2017-05-12 Thread Alexey via Lazarus
I only say that ATBinHex component cannot draw too long lines (by DrawTextW? TextOutW?) when API takes more than 4K chars (fixed to using only small cnt of chars). On 12.05.2017 02:10, Denis Kozlov via Lazarus wrote: width of entire text content, as opposed to just the small visible part.

Re: [Lazarus] Insufficient keyboard modifiers support in IDE

2017-05-11 Thread Alexey via Lazarus
On 11.05.2017 17:50, Graeme Geldenhuys via Lazarus wrote: that generates Ctrl+Alt+Shift+Hyper+Up it doesn't recognise any of the new shiftstates It must not see em. Laz dont know what is Hyper key, and Super. Shiftstate flags are none, AFAIK LCL dont support Hyper/Super keys -- Regards,

Re: [Lazarus] Insufficient keyboard modifiers support in IDE

2017-05-11 Thread Alexey via Lazarus
>Both in Lazarus v1.7 and v1.9 using the IDE compiled with LCL-GTK2. Check "Meta" shows on Mac only; you need it for Lin/Win? It is simple fix, one liner. function TCustomShortCutGrabBox.GetDefaultShiftButtons: TShiftState; begin {$IFDEF Darwin} Result:=[ssCtrl,ssShift,ssAlt,ssMeta];

Re: [Lazarus] Insufficient keyboard modifiers support in IDE

2017-05-11 Thread Alexey via Lazarus
Hm, on OSX, IDE shows key grab dialog [in keymapping opts] with additional checkbox, "Meta". It is what yo need? Ctrl+Meta checkboxes - for keys Ctrl/Command. And dialog works for Meta. Alexey -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org

Re: [Lazarus] visual appearance of ReadOnly state widgets

2017-05-10 Thread Alexey via Lazarus
On 10.05.2017 16:40, Graeme Geldenhuys via Lazarus wrote: And to make matters worse, a ReadOnly TComboBox allows me to change the focusitem via a mouse, adding to the confusion. It is made like in Delphi's r/o combobox. In Lazarus better use Enabled:=false and it has indication for some

[Lazarus] Hi-dpi: skip logout on Win10

2017-05-18 Thread Alexey via Lazarus
In Win10 when you change scale, you must logout, but can skip logout. Interesting, how Laz apps behave if you skip logouts, and change scale 2-3 times: 100% to 150%, then to 200%, then to 150%. -- Regards, Alexey -- ___ Lazarus mailing list

Re: [Lazarus] Insufficient keyboard modifiers support in IDE

2017-05-11 Thread Alexey via Lazarus
So it is a LCL bug then? Seems LCL ok: - Windows key works, it is ssMeta [on GTK2 too] - Super key [not Windows key] not known to LCL - Hyper key too not known - AltGr works here, in GTK2 it gives Alt. -- Regards, Alexey -- ___ Lazarus mailing

Re: [Lazarus] Res leaks on exiting gtk2 app

2017-06-26 Thread Alexey via Lazarus
On 27.06.2017 00:22, Mattias Gaertner via Lazarus wrote: it must be something you are doing with the imagelist. You must give some clues what you are doing otherwise no one can help. I'm doing loading of png files [Imagelist size 16x] to it-- function

[Lazarus] IDE hilite all same words don't check word-only

2017-06-22 Thread Alexey via Lazarus
This is hilite of word dlg_hotkey_replace: other ids hilited too, but i dont want other words. How not to hilite other words? -- Regards, Alexey -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus

[Lazarus] Icon in Find dialog: same as debug icon

2017-05-19 Thread Alexey via Lazarus
Not sure this is for purpose: icons are the same. Picture. -- Regards, Alexey -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus

Re: [Lazarus] A simple way to stop the never ending story of long executable?

2017-05-20 Thread Alexey via Lazarus
External debug symbols file? +1 for ON default On 20.05.2017 13:24, Giuliano Colla via Lazarus wrote: Wouldn't it be nice to set it active by default? -- Regards, Alexey -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org

Re: [Lazarus] Use rare Win32 API in LCLIntf.SetForegroundWindow

2017-05-23 Thread Alexey via Lazarus
On 23.05.2017 20:43, Ondrej Pokorny via Lazarus wrote: What are the equivalents for Qt, Qt5, Gtk2, Carbon, Cocoa? I meaned - to use in _inside_ LCLIntf.SetForegrondWindow, not making new LCL func. -- Regards, Alexey -- ___ Lazarus mailing list

[Lazarus] Use rare Win32 API in LCLIntf.SetForegroundWindow

2017-05-23 Thread Alexey via Lazarus
What do you think about using this rare API [beginning from WinXP] in LCLIntf fnction? It will make LCL function work more stable: window will always go to foreground. I used it in CudaText. It works. https://github.com/Alexey-T/CudaText/blob/master/app/fix_focus_window.pas -- Regards, Alexey

Re: [Lazarus] intercepting keyboard events

2017-05-22 Thread Alexey via Lazarus
On 22.05.2017 16:57, Graeme Geldenhuys via Lazarus wrote: What else can I try? Adding public SetFocus; override;-- procedure TATSynEdit.SetFocus; begin LCLIntf.SetFocus(Handle); end; -- Regards, Alexey -- ___ Lazarus mailing list

Re: [Lazarus] Cannot install FPC 3.0.2/3.0.3 from Lazarus

2017-05-18 Thread Alexey via Lazarus
After this not ok install (ignore error) I cannot build IDE: Clean Lazarus Source: Success .. main.pp(240,40) Parameter "Sender" not used main.pp(423,35) Parameter "Sender" not used Compiling resource /home/user/lazarus/units/x86_64-linux/gtk2/lazarus.or Linking ../lazarus /usr/bin/ld: warning:

[Lazarus] Cannot install FPC 3.0.2/3.0.3 from Lazarus

2017-05-18 Thread Alexey via Lazarus
On Ubuntu 14.4 I get this error, and after /ignore/ package cannot install fully: IDE cannot rebuild then. Linker error with "missing section on dd.o file". Picture of DEB install error -- Regards, Alexey -- ___ Lazarus mailing list

[Lazarus] TFont.Assign not complete

2017-05-30 Thread Alexey via Lazarus
Not sure it is ok, why not to a) copy Size, b) copy PixelsPerInch. why such strange logic. if TFont(Source).PixelsPerInch <> FPixelsPerInch then // use size to convert source height pixels to current resolution Size := TFont(Source).Size else

Re: [Lazarus] linking error

2017-06-03 Thread Alexey via Lazarus
Click Messages window, right-click, and call "Filter hints w/o source pos", then you can see details about linking-error in messages, post it. Alexey -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org

[Lazarus] IsFontNameDefault talk

2017-06-04 Thread Alexey via Lazarus
Juha, you tell that "if LowerCase(s)='default'" works faster than "if CompareText(s,'default')", but most of the fonts, dont start with letter "d" or "de"=> so CompareText takes one char only, LowerCase takes n chars=> LowerCase slower. -- Regards, Alexey --

Re: [Lazarus] Horz scroll on Mac trackpad

2017-06-06 Thread Alexey via Lazarus
Here https://bugs.freepascal.org/view.php?id=31897 https://bugs.freepascal.org/view.php?id=31898 Where did you add the patches? -- Regards, Alexey -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org

[Lazarus] Res leaks on exiting gtk2 app

2017-06-14 Thread Alexey via Lazarus
CudaText app, gtk2 WS. I run it from terminal, it loads dir to Treeview [only top level of /usr], i exit. user@user-Notebook:~$ cudatext /usr CudaText: opening dir: /usr [TGtk2WidgetSet.Destroy] WARNING: There are 4 unreleased DCs, a detailed dump follows: [TGtk2WidgetSet.Destroy] DCs:

Re: [Lazarus] Res leaks on exiting gtk2 app

2017-06-14 Thread Alexey via Lazarus
[TGtk2WidgetSet.Destroy] WARNING: There are 19 unreleased GDIObjects, a detailed dump follows: I see I have 19 icons in app, in 3..4 ImageLists. so all icons from Imagelists leaked? ImageLists placed in design time. They must free by LCL. -- Regards, Alexey --

Re: [Lazarus] Res leaks on exiting gtk2 app

2017-06-14 Thread Alexey via Lazarus
On 14.06.2017 12:14, Mattias Gaertner via Lazarus wrote: Why do you think this is a bug in the LCL, and not in cudatext? I wrote that I have 4 imagelists with 19 icons [imagelists created in design time, icons load some in runtume, some in design time], and 19 objects leak. -- Regards,

Re: [Lazarus] Res leaks on exiting gtk2 app

2017-06-14 Thread Alexey via Lazarus
On 14.06.2017 12:38, Mattias Gaertner via Lazarus wrote: reproduce this in a small project. Cannot repeat it : event with my custom controls and Python. Leak is here only after i open folder in Cudatext [it calls Python engine to load filelist and show it in Treeview]. -- Regards, Alexey

[Lazarus] Hi-dpi icons suggestion

2017-05-04 Thread Alexey via Lazarus
I have suggestion for scaling hi-dpi for Speedbuttons with icons Now: icons scale by any scale, e.g. by 175% if OS scale is 175% It looks bad for 16x16 ide icons. they are looking broken. Suggestion: - until scale <200%, don't zoom icons, paint 16x even on bigger buttons - scale is >=200%, <300%,

[Lazarus] Gtk2 ShowWindow(..SW_RESTORE)

2017-05-01 Thread Alexey via Lazarus
Hi. Maybe someone can implement it? Gtk2 misses it- case nCmdShow of SW_SHOWNORMAL: begin if B then gtk_widget_show(PGtkWidget(GtkWindow)) else begin if not GTK_WIDGET_VISIBLE(PGtkWidget(GtkWindow)) then gtk_widget_show(PGtkWidget(GtkWindow));

[Lazarus] WMPaint

2017-04-30 Thread Alexey via Lazarus
procedure TCustomControl.WMPaint(var Message: TLMPaint); begin if (csDestroying in ComponentState) or (not HandleAllocated) then exit; Include(FControlState, csCustomPaint); inherited WMPaint(Message); Exclude(FControlState, csCustomPaint); end; Maybe use try-finally here for Exclude?

[Lazarus] Revert ButtonPanel button size

2017-05-19 Thread Alexey via Lazarus
Can you return old height of buttons on TButtonPanel, which is now 2pixels less? Ie, revert patch which gave such effect. I dont like such small buttons on Ubuntu. -- Regards, Alexey -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org

[Lazarus] Horz scroll on Mac trackpad

2017-06-06 Thread Alexey via Lazarus
Added 2 patches to use %subj for Treeview and Grid. Why not to use em in Lazarus 1.8. They are tiny and ok. -- Regards, Alexey -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus

  1   2   >