Posts: 1,336
Threads: 61
Joined: Jul 2006
05-23-2018, 12:28 AM
(This post was last modified: 05-23-2018, 12:34 AM by Kevin.)
i am trying to change the background and foreground colors in qm. i would prefer to have a dark background as its easier on the eyes .
i can change the background and foreground colors but any code shows the default style still.
int h=id(2210 _hwndqm)
SendMessage h SCI.SCI_STYLESETBACK SCI.STYLE_DEFAULT 0x464646
SendMessage h SCI.SCI_STYLESETFORE SCI.STYLE_DEFAULT 0xC0C0C0
10
SendMessage h SCI.SCI_STYLERESETDEFAULT 0 0
clear all is no help as i want to keep everything but the background and foreground colors
what am i missing?
in future qm versions would love to see the ability to fully style qm and create a vs dark theme for qm
Posts: 12,071
Threads: 140
Joined: Dec 2002
05-23-2018, 09:14 AM
(This post was last modified: 04-26-2021, 05:17 AM by Gintaras.)
Macro Make QM code editor background dark
int backColor(0x464646) foreColor(0xC0C0C0)
int h=id(2210 _hwndqm)
int i
for i 0 18
,SendMessage h SCI.SCI_STYLESETBACK i backColor
SendMessage h SCI.SCI_STYLESETBACK 32 backColor
SendMessage h SCI.SCI_STYLESETFORE 0 foreColor
SendMessage h SCI.SCI_STYLESETFORE 14 foreColor ;;variables; or change it in Options, because default is black
#ret
;style indices used by QM
enum STYLES
{
,STYLE_COMMENT=1, STYLE_COMMENT_AFTER,
,STYLE_STRING, STYLE_NUMBER, STYLE_OPERATOR, STYLE_PUNCTUATION,
,STYLE_F_QM, STYLE_F_UDF, STYLE_F_DLL, STYLE_DIR,
,STYLE_TYPE, STYLE_DEF, STYLE_LIB,
,STYLE_VARIABLE, STYLE_REGION,
,STYLE_MENU_ICON, STYLE_TAB,
,STYLE_NSTYLES_QM,
,//these are not true styles. Will be mapped to other values or messages.
,STYLE__SELECTION=STYLE_NSTYLES_QM, //SCI_SETSELBACK
,STYLE__CARETLINE, //SCI_SETCARETLINEVISIBLE, SCI_SETCARETLINEBACK
,STYLE__SELBAR, STYLE__SELBAR_FOCUS, //STYLE_LINENUMBER, etc
,//these are true styles (not mapped)
,STYLE__SELBAR_CHANGEDLINE_NEW, STYLE__SELBAR_CHANGEDLINE_OLD,
,//mapped again
,STYLE__ANNOTATION, //STYLE__ANNOTATION_OFFSET
,STYLE__FINDHIGHLIGHT, //SCI_INDICSETFORE, SCI_MARKERSETBACK
,//mapped again
,STYLE__NSTYLES_QM,
#ifndef SCI_LINK_INDICATORS
,STYLE__HIDDEN=STYLE_DEFAULT-1, //31. Used with links.
#endif
,STYLE__ANNOTATION_OFFSET=256,
};
Posts: 1,336
Threads: 61
Joined: Jul 2006
|