As noted in Notepad++ idea 113 https://sourceforge.net/apps/ideatorrent/notepad-plus/ideatorrent/idea/113/, bookmarks do not correctly antialias on dark background. Here is a script which implements the four proposed solutions in the idea, but not exactly as proposed for solutions #1 and #2 (because of current Scintilla limitation). Simply set "solution" to the solution you like (or only copy that part of the code). You can paste that code at end of "startup.py" and configure PythonScript initialisation ATSTARTUP. For solution #2, bookmark margin can be disabled to save some space, and for solution #4 all margins can be disabled to save even more space.
#Idea#113https://sourceforge.net/apps/ideatorrent/notepad-plus/ideatorrent/idea/113/#Choosethesolution:(solutions1and2arenotcompletebecauseofScintillalimitations)solution=2foredin[editor1, editor2]:ed.setMarginMaskN(0,ed.getMarginMaskN(0)&~0x1000000)#donotdrawmarkerinlinenumbermargin(default)ed.setMarginMaskN(1,ed.getMarginMaskN(1)|0x1000000)#drawmarkerinsecondmargin(default)ifsolution==4:#solution#4Highlightthecompletetextlineed.markerDefine(24,MARKERSYMBOL.BACKGROUND),#markwholelinebackgroundusingbackcolorandalphaed.markerSetBack(24,(255,170,0))#linehighlightcolored.markerSetAlpha(24,80)#256tosetlinebackgroundcolorinsteadofusingalphablendingelifsolution==3:#solution#3"good-old"...ed.markerDefine(24,MARKERSYMBOL.CIRCLE),#useacoloredsymbol(possiblesymbolsareCIRCLE,ROUNDRECT,ARROW,SMALLRECT,SHORTARROW,...seeMARKERSYMBOLinPythonScriptdocumentation)withforecolorcontourandbackcolorfill.ed.markerSetFore(24,(255,0,0))#contourofsymboled.markerSetBack(24,(255,255,0))#fillingelifsolution==2:#incompletesolution#2,firstverion(Scintilladrawslinenumberundermarkers,notover)ed.markerDefine(24,MARKERSYMBOL.LEFTRECT),#LEFTRECTorFULLRECTusingbackcolor.WithcurrentScintillaFULLRECTisnotagoodideaforlinenumbermargin,butcanbeusedinothermarginsed.markerSetBack(24,(255,170,0))#rectcolored.setMarginMaskN(0,ed.getMarginMaskN(0)|0x1000000)#drawmarksinlinenumbermarginifed.getMarginWidthN(1)>0:ed.setMarginWidthN(1,4)#reducewidthofsecondmargin(couldalsobesetto0,or"Display bookmark"uncheckedinSettings/Preferences.../Editing)elifsolution==2.1:#incompletesolution#2,secondversion(Scintilladoesnotsupportaphablendingofmarkernordrawinglinenumbersovermarkers)#redefinemarkpixmapwithditheredrectangleed.markerDefinePixmap(24,'''/* XPM */static char * test_xpm[] = {"32 16 2 1"," c None",". c #F08000", // color used for dithering". . . . . . . . . . . . . . . . "," "," . . . . . . . . . . . . . . . ."," ",". . . . . . . . . . . . . . . . "," "," . . . . . . . . . . . . . . . ."," ",". . . . . . . . . . . . . . . . "," "," . . . . . . . . . . . . . . . ."," ",". . . . . . . . . . . . . . . . "," "," . . . . . . . . . . . . . . . ."," "};\0''')ed.setMarginMaskN(0,ed.getMarginMaskN(0)|0x1000000)#drawmarksinlinenumbermargined.setMarginMaskN(1,ed.getMarginMaskN(1)&~0x1000000)#notinsecondmarginelifsolution==1:#incompletesolution#1(Scintilladoesnotsupportaphablendingofmarker,butwecandefineanewmarkerwithoutantialiasing,whichshoulddisplaycorrectlyonblackbackground)#redefinemarkpixmaped.markerDefinePixmap(24,'''/* XPM */static char * xpm[] = {"13 14 54 1"," c None",". c #545254","+ c #3C3E3C","@ c #646464","# c #A4A4A4","$ c #B7B8B7","% c #747284","& c #B4B2C4","* c #DCD7E4","= c #1C1A1C","- c #403E58","; c #5C5A8C","> c #7C7EAC",", c #7C8EBC","'c#242644",")c#282668","!c#24367C","~c#244A84","{c#2C5098","]c#14162C","^c#142E7C","/c#143789","(c#204990","_c#174091",":c#0C0630","<c#24327C","[ c #2450A0","} c #345DB4","| c #3C68B8","1 c #141244","2 c #24428C","3 c #3462B9","4 c #4470C4","5 c #4C7FD6","6 c #4472CC","7 c #24224C","8 c #5C8DEC","9 c #5C94F6","0 c #5482DF","a c #619DF7","b c #6CA6FC","c c #64A2FC","d c #1C2E5C","e c #6CA2FC","f c #74B2FC","g c #7CB8FC","h c #1C3264","i c #346AD4","j c #7CBEFC","k c #3C72DC","l c #243250","m c #346AB4","n c #3C82DC","o c #6C6A6C"," .+. "," @##$##@ "," @%&***&%@ "," =-;>,,,>;-= "," ')!~{{{~!)' ","])^/({{{(_^)]",":<_[}|||}[_<:","12[3455563[21","7_365899063_7","/|09abc904/","d}8efgfb83d","hiafjgakh","l~mnm~l","o@o"};\0''')
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Yes, by ' not complete' I meant 'not exactly as proposed', because the color is not under line number but only on each side of it. I tried to put the color under, but would have to modify Scintilla to do it. The modification is easy, just have to put the marks drawing loop before the line number drawing loop, but we would have to verify that no editor using Scintilla rely on the fact that marks are over the numbers.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Yes, you have to install the Python Script plugin for this to work. The startup.py file is the python script that is executed when the plugin starts; you need to set the initialization mode of Python Script plugin to "ATSTARTUP" if you want it to start at the same time as Notepad++ (otherwise it defaults to start when you first select a script in its menu). The initialization mode is changed in menu Plugins->Python Script->Configuration, at the bottom of the dialog (you can choose between "ATSTARTUP" and "LAZY").
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
As noted in Notepad++ idea 113 https://sourceforge.net/apps/ideatorrent/notepad-plus/ideatorrent/idea/113/, bookmarks do not correctly antialias on dark background. Here is a script which implements the four proposed solutions in the idea, but not exactly as proposed for solutions #1 and #2 (because of current Scintilla limitation). Simply set "solution" to the solution you like (or only copy that part of the code). You can paste that code at end of "startup.py" and configure PythonScript initialisation ATSTARTUP. For solution #2, bookmark margin can be disabled to save some space, and for solution #4 all margins can be disabled to save even more space.
About solution #2:
if by 'not complete' you mean that highlight color is not drawn under line number, I'd say - it's complete :)
That's my personal taste of course, but it looks really nice to me, and it is distinctive
Hiding folding margin when there is no need for it is just neat
Thanks again for your solutions
Yes, by ' not complete' I meant 'not exactly as proposed', because the color is not under line number but only on each side of it. I tried to put the color under, but would have to modify Scintilla to do it. The modification is easy, just have to put the marks drawing loop before the line number drawing loop, but we would have to verify that no editor using Scintilla rely on the fact that marks are over the numbers.
I am not clear on how to apply this idea. I don't have a startup.py file. Am I supposed to?
How would I implement this? Do I simply create a startup.py file with this as the content?
Does this require that I install Python? Does this idea only apply to the editing of Python files?
Are startup files covered in the documentation? A first pass with Google does not show anything about them. Do you have a pointer for me?
Thanks,
Paul
Yes, you have to install the Python Script plugin for this to work. The startup.py file is the python script that is executed when the plugin starts; you need to set the initialization mode of Python Script plugin to "ATSTARTUP" if you want it to start at the same time as Notepad++ (otherwise it defaults to start when you first select a script in its menu). The initialization mode is changed in menu Plugins->Python Script->Configuration, at the bottom of the dialog (you can choose between "ATSTARTUP" and "LAZY").