Code::Blocks主題變更設置
CodeBlocks預設為白底的淺色主題,寫程式時覺得比較刺眼,雖然不能把整個介面改成深色主題,但最主要的編輯器區塊是可以更改配色的。
最終效果
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
這個主題是我自行設置,主要仿照Visual Studio Code的配色,再搭配幾個官方Sublime主題的設定。
更改步驟
-
CodeBlocks至少要先打開過一次,讓default.conf
這個檔案產生。
-
到官方Wiki的主題頁面,找到Installation區塊,複製框框裡的xml內容到記事本,存成.conf
檔。
或是下載我做的colour_themes.conf
,裡面包含官方的Son of Obsidian和Sublime主題,以及我自行設置的VS Code主題。
-
確保CodeBlocks已關閉,備份default.conf
。
檔案路徑:C:\Users\{username}\AppData\Roaming\codeblocks\default.conf
-
打開CodeBlocks安裝目錄中的cb_share_config.exe
,Source configuration file選擇colour_themes.conf
,Destination configuration file選擇default.conf
。勾選想要的主題後,依序點擊Transfer和Save按鈕,這樣主題設置就寫入default.conf
了。
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
-
打開CodeBlocks,在Settings→Editor→左側Syntax highlighting,可以看到主題已成功加入。
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
主題設置至此已初步完成。
其他設置
目前左側行數的區域還是白底黑字,跟旁邊已設定好深色主題的程式碼區域對比有些突兀,所以還要再做一些調整。
Environment
進到Settings→Environment→左側Colours,修改下列項目。
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
-
Code completion : Tooltip/Calltip background:提示框背景顏色 (R60 G60 B60)
-
Code completion : Tooltip/Calltip foreground:提示框文字顏色 (R212 G212 B212)
-
Code completion : Tooltip/Calltip highlight:提示框高亮文字顏色 (R100 G210 B230)
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
-
Editor : Highlight occurrence:和選取文字相同文字的標記顏色 (R255 G0 B127)
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
-
Editor : Line numbers background colour:行數區域背景顏色 (R30 G30 B30)
-
Editor : Line numbers foreground colour:行數區域文字顏色 (R133 G133 B133)
-
Editor : Margin chrome colour:行數和程式碼中間區域的顏色 (R30 G30 B30)
-
Editor : Margin chrome highlight colour:行數和程式碼中間區域的顏色 (R30 G30 B30)
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
Editor
進到Settings→Editor,修改下列項目。
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →