- enhancement: fill indents in the editor (Turned off by default)
This commit is contained in:
parent
d188d8897f
commit
25d83d0e8d
1
NEWS.md
1
NEWS.md
|
@ -1,6 +1,7 @@
|
|||
Version 0.7.0
|
||||
- fix: Backspace still works in readonly mode
|
||||
- fix: save as file dialog's operation mode is not correct
|
||||
- enhancement: fill indents in the editor (Turned off by default)
|
||||
|
||||
Version 0.6.8
|
||||
- enhancement: add link to cppreference in the help menu
|
||||
|
|
Binary file not shown.
|
@ -933,11 +933,11 @@ Are you really want to continue?</source>
|
|||
<message>
|
||||
<location filename="editor.cpp" line="213"/>
|
||||
<location filename="editor.cpp" line="227"/>
|
||||
<location filename="editor.cpp" line="298"/>
|
||||
<location filename="editor.cpp" line="1125"/>
|
||||
<location filename="editor.cpp" line="303"/>
|
||||
<location filename="editor.cpp" line="1130"/>
|
||||
<location filename="editor.cpp" line="1148"/>
|
||||
<location filename="editor.cpp" line="1135"/>
|
||||
<location filename="editor.cpp" line="1153"/>
|
||||
<location filename="editor.cpp" line="1158"/>
|
||||
<source>Error</source>
|
||||
<translation>错误</translation>
|
||||
</message>
|
||||
|
@ -947,60 +947,60 @@ Are you really want to continue?</source>
|
|||
<translation>无法写入文件"%1"</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="editor.cpp" line="252"/>
|
||||
<location filename="editor.cpp" line="256"/>
|
||||
<source>Save As</source>
|
||||
<translation>另存为</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="editor.cpp" line="1126"/>
|
||||
<location filename="editor.cpp" line="1131"/>
|
||||
<source>The text to be copied exceeds count limit!</source>
|
||||
<translation>要复制的内容超过了行数限制!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="editor.cpp" line="1131"/>
|
||||
<location filename="editor.cpp" line="1136"/>
|
||||
<source>The text to be copied exceeds character limit!</source>
|
||||
<translation>要复制的内容超过了字符数限制!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="editor.cpp" line="1149"/>
|
||||
<location filename="editor.cpp" line="1154"/>
|
||||
<source>The text to be cut exceeds count limit!</source>
|
||||
<translation>要剪切的内容超过了行数限制!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="editor.cpp" line="1154"/>
|
||||
<location filename="editor.cpp" line="1159"/>
|
||||
<source>The text to be cut exceeds character limit!</source>
|
||||
<translation>要剪切的内容超过了字符数限制!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="editor.cpp" line="2122"/>
|
||||
<location filename="editor.cpp" line="2127"/>
|
||||
<source>Print Document</source>
|
||||
<translation>打印文档</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="editor.cpp" line="2669"/>
|
||||
<location filename="editor.cpp" line="2706"/>
|
||||
<location filename="editor.cpp" line="2757"/>
|
||||
<location filename="editor.cpp" line="2674"/>
|
||||
<location filename="editor.cpp" line="2711"/>
|
||||
<location filename="editor.cpp" line="2762"/>
|
||||
<source>Ctrl+click for more info</source>
|
||||
<translation>Ctrl+单击以获取更多信息</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="editor.cpp" line="3102"/>
|
||||
<location filename="editor.cpp" line="3132"/>
|
||||
<location filename="editor.cpp" line="3107"/>
|
||||
<location filename="editor.cpp" line="3137"/>
|
||||
<source>Symbol '%1' not found!</source>
|
||||
<translation>未找到符号'%1'!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="editor.cpp" line="3521"/>
|
||||
<location filename="editor.cpp" line="3526"/>
|
||||
<source>Break point condition</source>
|
||||
<translation>断点条件</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="editor.cpp" line="3522"/>
|
||||
<location filename="editor.cpp" line="3527"/>
|
||||
<source>Enter the condition of the breakpoint:</source>
|
||||
<translation>输入当前断点的生效条件:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="editor.cpp" line="3698"/>
|
||||
<location filename="editor.cpp" line="3704"/>
|
||||
<source>Readonly</source>
|
||||
<translation>只读</translation>
|
||||
</message>
|
||||
|
@ -4857,175 +4857,175 @@ Are you really want to continue?</source>
|
|||
<translation>无法载入自动链接设置</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="settings.cpp" line="1397"/>
|
||||
<location filename="settings.cpp" line="1416"/>
|
||||
<location filename="settings.cpp" line="1409"/>
|
||||
<location filename="settings.cpp" line="1428"/>
|
||||
<location filename="settings.cpp" line="1440"/>
|
||||
<location filename="settings.cpp" line="1452"/>
|
||||
<source>The following %1 directories don't exist:</source>
|
||||
<translation>下列%1文件夹不存在:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="settings.cpp" line="1398"/>
|
||||
<location filename="settings.cpp" line="1408"/>
|
||||
<location filename="settings.cpp" line="1410"/>
|
||||
<location filename="settings.cpp" line="1420"/>
|
||||
<source>binary</source>
|
||||
<translation>二进制</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="settings.cpp" line="1407"/>
|
||||
<location filename="settings.cpp" line="1419"/>
|
||||
<source>No %1 directories have been specified.</source>
|
||||
<translation>未指定%1文件夹</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="settings.cpp" line="1417"/>
|
||||
<location filename="settings.cpp" line="1429"/>
|
||||
<source>C include</source>
|
||||
<translation>C包含</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="settings.cpp" line="1429"/>
|
||||
<location filename="settings.cpp" line="1441"/>
|
||||
<location filename="settings.cpp" line="1453"/>
|
||||
<source>C++ include</source>
|
||||
<translation>C++包含</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="settings.cpp" line="1460"/>
|
||||
<location filename="settings.cpp" line="1465"/>
|
||||
<location filename="settings.cpp" line="1470"/>
|
||||
<location filename="settings.cpp" line="1475"/>
|
||||
<location filename="settings.cpp" line="1472"/>
|
||||
<location filename="settings.cpp" line="1477"/>
|
||||
<location filename="settings.cpp" line="1482"/>
|
||||
<location filename="settings.cpp" line="1487"/>
|
||||
<source>Cannot find the %1 "%2"</source>
|
||||
<translation>无法找到%1程序"%2"</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="settings.cpp" line="2003"/>
|
||||
<location filename="settings.cpp" line="2015"/>
|
||||
<source>C options</source>
|
||||
<translation>C语言选项</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="settings.cpp" line="2004"/>
|
||||
<location filename="settings.cpp" line="2016"/>
|
||||
<source>Support all ANSI standard C programs (-ansi)</source>
|
||||
<translation>支持所有ANSI标准C程序(-ansi)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="settings.cpp" line="2005"/>
|
||||
<location filename="settings.cpp" line="2017"/>
|
||||
<source>Do not recognize asm,inline or typeof as a keyword (-fno-asm)</source>
|
||||
<translation>不支持将asm、inline和typeof作为关键字(-fno-asm)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="settings.cpp" line="2006"/>
|
||||
<location filename="settings.cpp" line="2018"/>
|
||||
<source>Imitate traditional C preprocessors (-traditional-cpp)</source>
|
||||
<translation>模仿传统C预处理器行为(-traditional-cpp)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="settings.cpp" line="2009"/>
|
||||
<location filename="settings.cpp" line="2021"/>
|
||||
<source>Code Generation</source>
|
||||
<translation>代码生成</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="settings.cpp" line="2038"/>
|
||||
<location filename="settings.cpp" line="2050"/>
|
||||
<source>Optimize for the following machine (-march)</source>
|
||||
<translation>生成特定机器的专用指令(-march)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="settings.cpp" line="2039"/>
|
||||
<location filename="settings.cpp" line="2051"/>
|
||||
<source>Optimize less, while maintaining full compatibility (-tune)</source>
|
||||
<translation>完整兼容特定机器,较少优化(-tune)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="settings.cpp" line="2059"/>
|
||||
<location filename="settings.cpp" line="2071"/>
|
||||
<source>Enable use of specific instructions (-mx)</source>
|
||||
<translation>启用特定指令集(-mx)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="settings.cpp" line="2070"/>
|
||||
<location filename="settings.cpp" line="2082"/>
|
||||
<source>Optimization level (-Ox)</source>
|
||||
<translation>优化级别(-Ox)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="settings.cpp" line="2077"/>
|
||||
<location filename="settings.cpp" line="2089"/>
|
||||
<source>Compile with the following pointer size (-mx)</source>
|
||||
<translation>使用下列指针大小编译(-mx)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="settings.cpp" line="2100"/>
|
||||
<location filename="settings.cpp" line="2112"/>
|
||||
<source>Language standard (-std)</source>
|
||||
<translation>语言标准(-std)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="settings.cpp" line="2113"/>
|
||||
<location filename="settings.cpp" line="2125"/>
|
||||
<source>Profile</source>
|
||||
<translation>性能分析</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="settings.cpp" line="2122"/>
|
||||
<location filename="settings.cpp" line="2134"/>
|
||||
<source>Generate debugging information (-g3)</source>
|
||||
<translation>生成调试信息(-g3)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="settings.cpp" line="2114"/>
|
||||
<location filename="settings.cpp" line="2126"/>
|
||||
<source>Generate profiling info for analysis (-pg)</source>
|
||||
<translation>生成性能分析信息(-pg)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="settings.cpp" line="2103"/>
|
||||
<location filename="settings.cpp" line="2115"/>
|
||||
<source>Warnings</source>
|
||||
<translation>代码警告</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="settings.cpp" line="2104"/>
|
||||
<location filename="settings.cpp" line="2116"/>
|
||||
<source>Inhibit all warning messages (-w)</source>
|
||||
<translation>忽略所有警告信息(-w)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="settings.cpp" line="2105"/>
|
||||
<location filename="settings.cpp" line="2117"/>
|
||||
<source>Show most warnings (-Wall)</source>
|
||||
<translation>启用常见问题警告(-Wall)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="settings.cpp" line="2106"/>
|
||||
<location filename="settings.cpp" line="2118"/>
|
||||
<source>Show some more warnings (-Wextra)</source>
|
||||
<translation>启用更多问题警告(-Wextra)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="settings.cpp" line="2107"/>
|
||||
<location filename="settings.cpp" line="2119"/>
|
||||
<source>Check ISO C/C++/C++0x conformance (-pedantic)</source>
|
||||
<translation>检查ISO C/C++/C++0x语法一致性(-pedantic)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="settings.cpp" line="2108"/>
|
||||
<location filename="settings.cpp" line="2120"/>
|
||||
<source>Only check the code for syntax errors (-fsyntax-only)</source>
|
||||
<translation>只进行语法检查(不编译)(-fsyntax-only)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="settings.cpp" line="2109"/>
|
||||
<location filename="settings.cpp" line="2121"/>
|
||||
<source>Make all warnings into errors (-Werror)</source>
|
||||
<translation>将警告作为错误处理(-Werror)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="settings.cpp" line="2110"/>
|
||||
<location filename="settings.cpp" line="2122"/>
|
||||
<source>Abort compilation on first error (-Wfatal-errors)</source>
|
||||
<translation>遇到第一个错误后立即中止编译(-Wfatal-errors)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="settings.cpp" line="2117"/>
|
||||
<location filename="settings.cpp" line="2129"/>
|
||||
<source>Linker</source>
|
||||
<translation>链接器</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="settings.cpp" line="2118"/>
|
||||
<location filename="settings.cpp" line="2130"/>
|
||||
<source>Link an Objective C program (-lobjc)</source>
|
||||
<translation>链接Objective-C程序 (-lobjc)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="settings.cpp" line="2119"/>
|
||||
<location filename="settings.cpp" line="2131"/>
|
||||
<source>Do not use standard system libraries (-nostdlib)</source>
|
||||
<translation>不使用标准库和系统启动文件(-nostdlib)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="settings.cpp" line="2120"/>
|
||||
<location filename="settings.cpp" line="2132"/>
|
||||
<source>Do not create a console window (-mwindows)</source>
|
||||
<translation>不产生控制台窗口(-mwindows)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="settings.cpp" line="2121"/>
|
||||
<location filename="settings.cpp" line="2133"/>
|
||||
<source>Strip executable (-s)</source>
|
||||
<translation>剥除附加信息(-s)</translation>
|
||||
</message>
|
||||
|
@ -5034,43 +5034,43 @@ Are you really want to continue?</source>
|
|||
<translation type="vanished">链接Ojbective C程序(-lobjc)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="settings.cpp" line="2125"/>
|
||||
<location filename="settings.cpp" line="2137"/>
|
||||
<source>Output</source>
|
||||
<translation>输出</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="settings.cpp" line="2126"/>
|
||||
<location filename="settings.cpp" line="2138"/>
|
||||
<source>Put comments in generated assembly code (-fverbose-asm)</source>
|
||||
<translation>在生成的汇编代码中加入注释(-fverbose-asm)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="settings.cpp" line="2128"/>
|
||||
<location filename="settings.cpp" line="2140"/>
|
||||
<source>Use pipes instead of temporary files during compilation (-pipe)</source>
|
||||
<translation>编译时使用管道而不是临时文件(-pipe)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="settings.cpp" line="2127"/>
|
||||
<location filename="settings.cpp" line="2139"/>
|
||||
<source>Do not assemble, compile and generate the assemble code (-S)</source>
|
||||
<translation>只生成汇编代码(-S)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="settings.cpp" line="2344"/>
|
||||
<location filename="settings.cpp" line="2369"/>
|
||||
<location filename="settings.cpp" line="2356"/>
|
||||
<location filename="settings.cpp" line="2381"/>
|
||||
<source>Confirm</source>
|
||||
<translation>确认</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="settings.cpp" line="2345"/>
|
||||
<location filename="settings.cpp" line="2357"/>
|
||||
<source>The following problems were found during validation of compiler set "%1":</source>
|
||||
<translation>在验证编译器设置"%1"时遇到了下列问题:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="settings.cpp" line="2370"/>
|
||||
<location filename="settings.cpp" line="2382"/>
|
||||
<source>Compiler set not configuared.</source>
|
||||
<translation>未配置编译器设置。</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="settings.cpp" line="2372"/>
|
||||
<location filename="settings.cpp" line="2384"/>
|
||||
<source>Would you like Red Panda C++ to search for compilers in the following locations: <BR />'%1'<BR />'%2'? </source>
|
||||
<translation>您需要小熊猫C++在下列位置搜索编译器吗:<br />%1<br />%2</translation>
|
||||
</message>
|
||||
|
@ -6097,8 +6097,8 @@ Are you really want to continue?</source>
|
|||
<context>
|
||||
<name>SynEdit</name>
|
||||
<message>
|
||||
<location filename="qsynedit/TextPainter.cpp" line="909"/>
|
||||
<location filename="qsynedit/TextPainter.cpp" line="910"/>
|
||||
<location filename="qsynedit/TextPainter.cpp" line="936"/>
|
||||
<location filename="qsynedit/TextPainter.cpp" line="937"/>
|
||||
<source>The highlighter seems to be in an infinite loop</source>
|
||||
<translation>高亮处理进入了死循环</translation>
|
||||
</message>
|
||||
|
@ -6320,87 +6320,92 @@ Are you really want to continue?</source>
|
|||
<translation>缩进提示线颜色</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="settingsdialog/editorgeneralwidget.ui" line="129"/>
|
||||
<location filename="settingsdialog/editorgeneralwidget.ui" line="126"/>
|
||||
<source>Fill Indents</source>
|
||||
<translation>填充缩进区域</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="settingsdialog/editorgeneralwidget.ui" line="136"/>
|
||||
<source>Caret</source>
|
||||
<translation>光标</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="settingsdialog/editorgeneralwidget.ui" line="135"/>
|
||||
<location filename="settingsdialog/editorgeneralwidget.ui" line="142"/>
|
||||
<source>Move caret to the first non-space char in the current line when press HOME key</source>
|
||||
<translation>按下HOME键时,光标定位在本行的第一个非空格字符处</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="settingsdialog/editorgeneralwidget.ui" line="142"/>
|
||||
<location filename="settingsdialog/editorgeneralwidget.ui" line="149"/>
|
||||
<source>Move caret to the last non-space char in the current line when press END key</source>
|
||||
<translation>按下End键时,光标定位在本行的最后一个非空格字符处</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="settingsdialog/editorgeneralwidget.ui" line="149"/>
|
||||
<location filename="settingsdialog/editorgeneralwidget.ui" line="156"/>
|
||||
<source>Keep X position of the caret when moving vertically</source>
|
||||
<translation>在上下移动光标时,记住起始时光标所在栏数</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="settingsdialog/editorgeneralwidget.ui" line="184"/>
|
||||
<location filename="settingsdialog/editorgeneralwidget.ui" line="191"/>
|
||||
<source>Caret for inserting mode</source>
|
||||
<translation>插入状态下的光标</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="settingsdialog/editorgeneralwidget.ui" line="221"/>
|
||||
<location filename="settingsdialog/editorgeneralwidget.ui" line="228"/>
|
||||
<source>Use text color as caret color</source>
|
||||
<translation>使用文字颜色作为光标颜色</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="settingsdialog/editorgeneralwidget.ui" line="234"/>
|
||||
<location filename="settingsdialog/editorgeneralwidget.ui" line="241"/>
|
||||
<source>Scroll</source>
|
||||
<translation>滚动条</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="settingsdialog/editorgeneralwidget.ui" line="240"/>
|
||||
<location filename="settingsdialog/editorgeneralwidget.ui" line="247"/>
|
||||
<source>Auto hide scroll bars</source>
|
||||
<translation>自动隐藏滚动条</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="settingsdialog/editorgeneralwidget.ui" line="247"/>
|
||||
<location filename="settingsdialog/editorgeneralwidget.ui" line="254"/>
|
||||
<source>Can scroll the last char to the left edge of the editor</source>
|
||||
<translation>可以将每行末尾字符滚动到编辑器最左侧</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="settingsdialog/editorgeneralwidget.ui" line="254"/>
|
||||
<location filename="settingsdialog/editorgeneralwidget.ui" line="261"/>
|
||||
<source>Can scroll the last line to the top edge of the editor</source>
|
||||
<translation>可以将最后一行滚动到编辑器最上方</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="settingsdialog/editorgeneralwidget.ui" line="261"/>
|
||||
<location filename="settingsdialog/editorgeneralwidget.ui" line="268"/>
|
||||
<source>Page Up/Down scrolls half a page</source>
|
||||
<translation>翻页键只滚动半页</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="settingsdialog/editorgeneralwidget.ui" line="268"/>
|
||||
<location filename="settingsdialog/editorgeneralwidget.ui" line="275"/>
|
||||
<source>Forces page scroll to be one line less</source>
|
||||
<translation>在滚动页时少滚动一行</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="settingsdialog/editorgeneralwidget.ui" line="278"/>
|
||||
<location filename="settingsdialog/editorgeneralwidget.ui" line="285"/>
|
||||
<source>Show right edge line</source>
|
||||
<translation>显示右边缘线</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="settingsdialog/editorgeneralwidget.ui" line="290"/>
|
||||
<location filename="settingsdialog/editorgeneralwidget.ui" line="297"/>
|
||||
<source>Right egde width</source>
|
||||
<translation>右边缘宽度</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="settingsdialog/editorgeneralwidget.ui" line="342"/>
|
||||
<location filename="settingsdialog/editorgeneralwidget.ui" line="349"/>
|
||||
<source>Right edge line color</source>
|
||||
<translation>右边缘颜色</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="settingsdialog/editorgeneralwidget.ui" line="214"/>
|
||||
<location filename="settingsdialog/editorgeneralwidget.ui" line="221"/>
|
||||
<source>Caret for overwriting mode</source>
|
||||
<translation>覆写状态下的光标</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="settingsdialog/editorgeneralwidget.ui" line="194"/>
|
||||
<location filename="settingsdialog/editorgeneralwidget.ui" line="201"/>
|
||||
<source>Caret Color</source>
|
||||
<translation>光标颜色</translation>
|
||||
</message>
|
||||
|
|
|
@ -3581,6 +3581,7 @@ void Editor::applySettings()
|
|||
|
||||
codeFolding().indentGuides = pSettings->editor().showIndentLines();
|
||||
codeFolding().indentGuidesColor = pSettings->editor().indentLineColor();
|
||||
codeFolding().fillIndents = pSettings->editor().fillIndents();
|
||||
|
||||
QFont f=QFont(pSettings->editor().fontName(),pSettings->editor().fontSize());
|
||||
f.setStyleStrategy(QFont::PreferAntialias);
|
||||
|
|
|
@ -23,6 +23,7 @@ PSynEditFoldRegion SynEditFoldRegions::get(int index)
|
|||
}
|
||||
|
||||
SynEditCodeFolding::SynEditCodeFolding():
|
||||
fillIndents(false),
|
||||
indentGuides(true),
|
||||
showCollapsedLine(true),
|
||||
collapsedLineColor(QColor("black")),
|
||||
|
|
|
@ -29,6 +29,7 @@ struct SynEditFoldRegion {
|
|||
|
||||
struct SynEditCodeFolding {
|
||||
bool indentGuides;
|
||||
bool fillIndents;
|
||||
bool showCollapsedLine;
|
||||
QColor collapsedLineColor;
|
||||
QColor folderBarLinesColor;
|
||||
|
|
|
@ -650,12 +650,17 @@ void SynEditTextPainter::PaintFoldAttributes()
|
|||
// Paint indent guides. Use folds to determine indent value of these
|
||||
// Use a separate loop so we can use a custom pen
|
||||
// Paint indent guides using custom pen
|
||||
if (edit->mCodeFolding.indentGuides) {
|
||||
QPen dottedPen(Qt::PenStyle::DashLine);
|
||||
dottedPen.setColor(edit->mCodeFolding.indentGuidesColor);
|
||||
|
||||
if (edit->mCodeFolding.indentGuides || edit->mCodeFolding.fillIndents) {
|
||||
QColor paintColor;
|
||||
if (edit->mCodeFolding.indentGuidesColor.isValid()) {
|
||||
paintColor = edit->mCodeFolding.indentGuidesColor;
|
||||
} else {
|
||||
paintColor = edit->palette().color(QPalette::Text);
|
||||
}
|
||||
QColor gradientStart = paintColor;
|
||||
QColor gradientEnd = paintColor;
|
||||
QPen oldPen = painter->pen();
|
||||
painter->setPen(dottedPen);
|
||||
|
||||
// Now loop through all the lines. The indices are valid for Lines.
|
||||
for (cRow = aFirstRow; cRow<=aLastRow;cRow++) {
|
||||
vLine = edit->rowToLine(cRow);
|
||||
|
@ -682,23 +687,45 @@ void SynEditTextPainter::PaintFoldAttributes()
|
|||
//TabSteps = edit->mTabWidth;
|
||||
TabSteps = 0;
|
||||
indentLevel = 0;
|
||||
|
||||
while (TabSteps < LineIndent) {
|
||||
X = TabSteps * edit->mCharWidth + edit->textOffset() - 2;
|
||||
TabSteps+=edit->mTabWidth;
|
||||
indentLevel++ ;
|
||||
if (edit->mHighlighter) {
|
||||
if (edit->mCodeFolding.indentGuides) {
|
||||
PSynHighlighterAttribute attr = edit->mHighlighter->symbolAttribute();
|
||||
GetBraceColorAttr(indentLevel,attr);
|
||||
if (attr!=edit->mHighlighter->symbolAttribute()) {
|
||||
dottedPen.setColor(attr->foreground());
|
||||
painter->setPen(dottedPen);
|
||||
paintColor = attr->foreground();
|
||||
}
|
||||
if (edit->mCodeFolding.fillIndents) {
|
||||
PSynHighlighterAttribute attr = edit->mHighlighter->symbolAttribute();
|
||||
GetBraceColorAttr(indentLevel,attr);
|
||||
gradientStart=attr->foreground();
|
||||
attr = edit->mHighlighter->symbolAttribute();
|
||||
GetBraceColorAttr(indentLevel+1,attr);
|
||||
gradientStart=attr->foreground();
|
||||
}
|
||||
}
|
||||
if (edit->mCodeFolding.fillIndents) {
|
||||
int X1=TabSteps * edit->mCharWidth + edit->textOffset() - 2;
|
||||
gradientStart.setAlpha(20);
|
||||
gradientEnd.setAlpha(10);
|
||||
QLinearGradient gradient(X,Y,X1,Y);
|
||||
gradient.setColorAt(0,gradientStart);
|
||||
gradient.setColorAt(1,gradientEnd);
|
||||
painter->fillRect(X,Y,edit->mTabWidth * edit->mCharWidth,edit->mTextHeight,gradient);
|
||||
}
|
||||
|
||||
// Move to top of vertical line
|
||||
if (edit->mCodeFolding.indentGuides) {
|
||||
QPen dottedPen(Qt::PenStyle::DashLine);
|
||||
dottedPen.setColor(paintColor);
|
||||
painter->setPen(dottedPen);
|
||||
painter->drawLine(X,Y,X,Y+edit->mTextHeight);
|
||||
}
|
||||
}
|
||||
}
|
||||
painter->setPen(oldPen);
|
||||
}
|
||||
|
||||
|
@ -920,18 +947,24 @@ void SynEditTextPainter::PaintLines()
|
|||
}
|
||||
// It's at least partially visible. Get the token attributes now.
|
||||
attr = edit->mHighlighter->getTokenAttribute();
|
||||
if (sToken == "[") {
|
||||
GetBraceColorAttr(edit->mHighlighter->getRangeState().bracketLevel,attr);
|
||||
} else if (sToken == "]") {
|
||||
GetBraceColorAttr(edit->mHighlighter->getRangeState().bracketLevel+1,attr);
|
||||
} else if (sToken == "(") {
|
||||
GetBraceColorAttr(edit->mHighlighter->getRangeState().parenthesisLevel,attr);
|
||||
} else if (sToken == ")") {
|
||||
GetBraceColorAttr(edit->mHighlighter->getRangeState().parenthesisLevel+1,attr);
|
||||
} else if (sToken == "{") {
|
||||
GetBraceColorAttr(edit->mHighlighter->getRangeState().braceLevel,attr);
|
||||
} else if (sToken == "}") {
|
||||
GetBraceColorAttr(edit->mHighlighter->getRangeState().braceLevel+1,attr);
|
||||
if (sToken == "["
|
||||
|| sToken == "("
|
||||
|| sToken == "{"
|
||||
) {
|
||||
SynRangeState rangeState = edit->mHighlighter->getRangeState();
|
||||
GetBraceColorAttr(rangeState.bracketLevel
|
||||
+rangeState.braceLevel
|
||||
+rangeState.parenthesisLevel
|
||||
,attr);
|
||||
} else if (sToken == "]"
|
||||
|| sToken == ")"
|
||||
|| sToken == "}"
|
||||
){
|
||||
SynRangeState rangeState = edit->mHighlighter->getRangeState();
|
||||
GetBraceColorAttr(rangeState.bracketLevel
|
||||
+rangeState.braceLevel
|
||||
+rangeState.parenthesisLevel+1,
|
||||
attr);
|
||||
}
|
||||
if (bCurrentLine && edit->mInputPreeditString.length()>0) {
|
||||
int startPos = edit->mHighlighter->getTokenPos()+1;
|
||||
|
|
|
@ -487,6 +487,16 @@ void Settings::Editor::setShowFunctionTips(bool newShowFunctionTips)
|
|||
mShowFunctionTips = newShowFunctionTips;
|
||||
}
|
||||
|
||||
bool Settings::Editor::fillIndents() const
|
||||
{
|
||||
return mfillIndents;
|
||||
}
|
||||
|
||||
void Settings::Editor::setFillIndents(bool newFillIndents)
|
||||
{
|
||||
mfillIndents = newFillIndents;
|
||||
}
|
||||
|
||||
bool Settings::Editor::enableTooltips() const
|
||||
{
|
||||
return mEnableTooltips;
|
||||
|
@ -957,6 +967,7 @@ void Settings::Editor::doSave()
|
|||
saveValue("tab_width", mTabWidth);
|
||||
saveValue("show_indent_lines", mShowIndentLines);
|
||||
saveValue("indent_line_color",mIndentLineColor);
|
||||
saveValue("fill_indents",mfillIndents);
|
||||
// caret
|
||||
saveValue("enhance_home_key",mEnhanceHomeKey);
|
||||
saveValue("enhance_end_key",mEnhanceEndKey);
|
||||
|
@ -1063,6 +1074,7 @@ void Settings::Editor::doLoad()
|
|||
mTabWidth = intValue("tab_width",4);
|
||||
mShowIndentLines = boolValue("show_indent_lines",true);
|
||||
mIndentLineColor = colorValue("indent_line_color",QColorConstants::Svg::silver);
|
||||
mfillIndents = boolValue("fill_indents", false);
|
||||
// caret
|
||||
mEnhanceHomeKey = boolValue("enhance_home_key", true);
|
||||
mEnhanceEndKey = boolValue("enhance_end_key",true);
|
||||
|
|
|
@ -320,6 +320,9 @@ public:
|
|||
bool showFunctionTips() const;
|
||||
void setShowFunctionTips(bool newShowFunctionTips);
|
||||
|
||||
bool fillIndents() const;
|
||||
void setFillIndents(bool newFillIndents);
|
||||
|
||||
private:
|
||||
//General
|
||||
// indents
|
||||
|
@ -329,6 +332,7 @@ public:
|
|||
int mTabWidth;
|
||||
bool mShowIndentLines;
|
||||
QColor mIndentLineColor;
|
||||
bool mfillIndents;
|
||||
// caret
|
||||
bool mEnhanceHomeKey;
|
||||
bool mEnhanceEndKey;
|
||||
|
|
|
@ -44,6 +44,7 @@ void EditorGeneralWidget::doLoad()
|
|||
ui->spTabWidth->setValue(pSettings->editor().tabWidth());
|
||||
ui->chkShowIndentLines->setChecked(pSettings->editor().showIndentLines());
|
||||
ui->colorIndentLine->setColor(pSettings->editor().indentLineColor());
|
||||
ui->chkFillIndents->setChecked(pSettings->editor().fillIndents());
|
||||
//carets
|
||||
ui->chkEnhanceHome->setChecked(pSettings->editor().enhanceHomeKey());
|
||||
ui->chkEnhanceEndKey->setChecked(pSettings->editor().enhanceEndKey());
|
||||
|
@ -73,6 +74,8 @@ void EditorGeneralWidget::doSave()
|
|||
pSettings->editor().setTabWidth(ui->spTabWidth->value());
|
||||
pSettings->editor().setShowIndentLines(ui->chkShowIndentLines->isChecked());
|
||||
pSettings->editor().setIndentLineColor(ui->colorIndentLine->color());
|
||||
pSettings->editor().setFillIndents(ui->chkFillIndents->isChecked());
|
||||
|
||||
//carets
|
||||
pSettings->editor().setEnhanceHomeKey(ui->chkEnhanceHome->isChecked());
|
||||
pSettings->editor().setEnhanceEndKey(ui->chkEnhanceEndKey->isChecked());
|
||||
|
|
|
@ -120,6 +120,13 @@
|
|||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="chkFillIndents">
|
||||
<property name="text">
|
||||
<string>Fill Indents</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
|
||||
#define DEVCPP_VERSION "0.6.9"
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
#define APP_SETTSINGS_FILENAME "redpandacpp.ini"
|
||||
#ifdef Q_OS_WIN
|
||||
#define GCC_PROGRAM "gcc.exe"
|
||||
#define GPP_PROGRAM "g++.exe"
|
||||
#define GDB_PROGRAM "gdb.exe"
|
||||
|
@ -16,8 +16,17 @@
|
|||
#define GPROF_PROGRAM "gprof.exe"
|
||||
#define CLEAN_PROGRAM "del /q /f"
|
||||
#define CPP_PROGRAM "cpp.exe"
|
||||
#elif defined(Q_OS_LINUX)
|
||||
#define GCC_PROGRAM "gcc"
|
||||
#define GPP_PROGRAM "g++"
|
||||
#define GDB_PROGRAM "gdb"
|
||||
#define GDB32_PROGRAM "gdb32"
|
||||
#define MAKE_PROGRAM "make"
|
||||
#define GPROF_PROGRAM "gprof"
|
||||
#define CLEAN_PROGRAM "rm -rf"
|
||||
#define CPP_PROGRAM "cpp"
|
||||
#else
|
||||
#error "Only support windows now!"
|
||||
#error "Only support windows and linux now!"
|
||||
#endif
|
||||
|
||||
#define DEV_PROJECT_EXT "dev"
|
||||
|
@ -46,7 +55,7 @@
|
|||
# define STATIC_LIB_EXT "a"
|
||||
# define DYNAMIC_LIB_EXT "dll"
|
||||
# define MAKEFILE_NAME "makefile.win"
|
||||
#elif Q_OS_LINUX
|
||||
#elif defined(Q_OS_LINUX)
|
||||
# define PATH_SENSITIVITY Qt::CaseSensitive
|
||||
# define PATH_SEPARATOR ":"
|
||||
# define NULL_FILE "/dev/null"
|
||||
|
|
Loading…
Reference in New Issue