On osx,
color set twilight, in source editor cursor not viewing, system color is black for cursor too. Can it be colored in source editor?
Mailing lists / lazarus / 2015-01
Is it posibble change cursor in source editor
20 messages · 2 people · –
- FFreeMan 12
- MMartin Frb 8
Reply by email Subscribe to this list Your subscription
Read-only archive. Use j and k to move between messages.
FreeMan wroteOn osx, color set twilight, in source editor cursor not viewing, system color is black for cursor too. Can it be colored in source editor?
Not that I know.
The caret is drawn by the OS. At least on windows. Apparently GTK does not have it, and the code in the Lcl/widgetset emulates it (but has no property for color).
On Mac, I do not know what happens.
SynEdit can influence the shape of the caret. But the IDE has no setting to influence this, you would have to add your own change in the IDE code.
Thank you,
This problem in just 64 bit QT on osx on corbon is okey short way is change background color, or change color set. https://code.google.com/p/delphi-ide-theme-editor/ 2300 color themes for lazarus :)
Martin Frb wrote 10 lines
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20150130/8219ba1a/attachment.html>
Not that I know. The caret is drawn by the OS. At least on windows. Apparently GTK does…
Martin Frb wrote 15 lines
It might be now, but you need to do a couple of code changes, since no options exist.
unit:
components\synedit\syneditpointclasses.pas
line 2410
constructor TSynEditScreenCaret.Create(AHandleOwner: TWinControl);
change (old)
FCaretPainter := TSynEditScreenCaretPainterSystem.Create(AHandleOwner);
into (new)
FCaretPainter := TSynEditScreenCaretPainterInternal.Create(AHandleOwner);
Then find (same unit),
procedure TSynEditScreenCaretPainterInternal.Paint;and change the color
- black inverts
- white does nothing
- red inverts the blue and green, but leaves red untouched. if you have some medium grey as background, try $808080
thank you Martin, I can look next week.
Martin Frb wrote 25 lines
Hello Martin,
After this message, syneditpointclasses.pas file is changed, create codes etc. If its possible sent new suggestion please?
FreeMan wrote 37 lines
Still the same, just line numbers are changed. Search for TSynEditScreenCaret.Create(
Or go to ide/SourceSynEditor and
in line 1610
constructor TIDESynEditor.Create(AOwner: TComponent);
add
ScreenCaret.ChangePainter(TSynEditScreenCaretPainterInternal);
TSynEditScreenCaretPainterInternal(ScreenCaret.Painter).Color :=FreeMan wrote 49 lines
Show quoted text 16 lines
Something wrong but what is wrong :)
I got svn version fpc & lazarus I added lines from source. I wrote create code is different in your message, I told about that.
/opt/lazarus/components/synedit/syneditpointclasses.pas .....
2644:{ TSynEditScreenCaret }
constructor TSynEditScreenCaret.Create(AHandleOwner: TWinControl);
begin
Create(AHandleOwner, TSynEditScreenCaretPainterSystem);
end;
constructor TSynEditScreenCaret.Create(AHandleOwner: TWinControl;
APainterClass: TSynEditScreenCaretPainterClass);
begin
inherited Create;
FCaretPainter := APainterClass.Create(AHandleOwner, Self);
FLockCount := -1;
ResetCaretTypeSizes;
FHandleOwner := AHandleOwner;
FVisible := False;
FCurrentVisible := False;
FCurrentCreated := False;
FCurrentPosX := -1;
FCurrentPosY := -1;
FClipExtraPixel := 0;
FLockCount := 0;
end;FreeMan wrote 30 lines
Replace this with
Create(AHandleOwner, TSynEditScreenCaretPainterInternal);and then
procedure TSynEditScreenCaretPainterInternal.Init;
begin
FSavePen := TPen.Create;
FColor := clBlack;
inherited Init;
end;replace clBlack with your choice
I did before, when start IDE, IDE give Access violation, and terminate
Martin Frb wroteReplace this with Create(AHandleOwner, TSynEditScreenCaretPainterInternal); and then
FreeMan wrote 8 lines
I just tried this myself (under win32), no error. IDE started just fine. Make sure you have todays SVN. And this, and the color are the 2 only changes in the file.
Otherwise try the 2 lines in SourcSynEditor I sent 2 mails before.
If it still happens maybe it is a mac only bug, could you try and get a stacktrace?
I tryed all, but same result, "Access violation." and IDE terminate. source editor is opening, but default colors, popup error message and click ok or cancel IDE terminate.
I'm still not use to osx, how can I get stacktrace?
Martin Frb wrote 5 lines
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20150208/ab5b11ed/attachment.html>
FreeMan wrote 11 lines
You will need gdb. (codesigned)
See the wiki. Unfortunately, I can not advice myself on how to codesign gdb.
You can debug the IDE inside the IDE, by opening ide/lazarus.lpi
Or you may run in a shell (there is a lazarus somewhere inside the lazarus.app folder, find it , and use that path below) gdb /path/to/laz/lazarus.app/......./lazarus
then in gdb, enter "r" and return and when the error happen (lazarus will freeze, gdb will print something), enter "bt" and return.
I am doing further changes to the code, so maybe just use the old version, until I commit again.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20150208/4677e8c0/attachment-0001.html>
Okey, I'm waiting your commit
Martin Frb wrote 14 lines
FreeMan wroteOkey, I'm waiting your commit
Done, if you test please let me know how it goes.
r47714:
insource editor,
i386 carbon:
cursor (or carret) color is blank but now its not blink x64 qt cursor (or carret) color is blank but now its not blink. And in the same line, position set first time but, if click other column, later or before, cursor not move. not move left or right via keyboard as well. this is urgent :)
Martin Frb wrote 11 lines
may be give more info, I forget add before, sorry. osx -QT- x64
FreeMan wrote 14 lines
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20150212/4f1122a7/attachment-0001.html> -------------- next part --------------
A non-text attachment was scrubbed...
Name: cgahfjfi.
Type: image/jpeg
Size: 15756 bytes
Desc: not available
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20150212/4f1122a7/attachment-0001.jpe>
lazarus r47718:
on qt x64:
{$IFDEF LCLCarbon}
FForcePaintEvents := True;
{$ELSE}
FForcePaintEvents := True; --> this is work normal now, carret isshowing and blinking, in carbon work too
{$ENDIF}I attached 2 screenshots. How to view carret in widgetset. qt little bit thin and down I think.
this is in carbon :
this is in QT :
I think now can try change colour for visibility in dark(black) background.
Martin Frb wrote 15 lines
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20150212/9a7fe72d/attachment-0001.html> -------------- next part --------------
A non-text attachment was scrubbed...
Name: aiiffcbf.
Type: image/jpeg
Size: 15708 bytes
Desc: not available
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20150212/9a7fe72d/attachment-0002.jpe> -------------- next part --------------
A non-text attachment was scrubbed...
Name: jdiffdci.
Type: image/jpeg
Size: 15708 bytes
Desc: not available
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20150212/9a7fe72d/attachment-0003.jpe>
FColor := $CCD148;// Medium Turquoise
//todo- for me maybe change shape caret toowill you add this caret color property to lazarus IDE options -> Editor -> Display -> Colors ?
Thank you.
FreeMan wrote 17 lines
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20150212/88745230/attachment-0001.html> -------------- next part --------------
A non-text attachment was scrubbed...
Name: idccjjac.
Type: image/jpeg
Size: 15673 bytes
Desc: not available
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20150212/88745230/attachment-0003.jpe> -------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/jpeg
Size: 15708 bytes
Desc: not available
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20150212/88745230/attachment-0004.jpe> -------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/jpeg
Size: 15708 bytes
Desc: not available
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20150212/88745230/attachment-0005.jpe>
FreeMan wrote 7 lines
Maybe, ... (if I find time).
I am working on other stuff, that I want to do first.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20150212/02383173/attachment.html> -------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/jpeg
Size: 15673 bytes
Desc: not available
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20150212/02383173/attachment.jpe>
