- enhancement: let user choose app theme when first run
This commit is contained in:
parent
cbd718dcfe
commit
162121efa2
1
NEWS.md
1
NEWS.md
|
@ -8,6 +8,7 @@ Red Panda C++ Version 0.14.4
|
||||||
- enhancement: auto find compiler sets when run for the first time
|
- enhancement: auto find compiler sets when run for the first time
|
||||||
- enhancement: git - remotes
|
- enhancement: git - remotes
|
||||||
- enhancement: rename "open folder" to "choose working folder"
|
- enhancement: rename "open folder" to "choose working folder"
|
||||||
|
- enhancement: let user choose app theme when first run
|
||||||
|
|
||||||
Red Panda C++ Version 0.14.3
|
Red Panda C++ Version 0.14.3
|
||||||
- fix: wrong code completion font size, when screen dpi changed
|
- fix: wrong code completion font size, when screen dpi changed
|
||||||
|
|
|
@ -104,6 +104,7 @@ SOURCES += \
|
||||||
vcs/gitutils.cpp \
|
vcs/gitutils.cpp \
|
||||||
widgets/aboutdialog.cpp \
|
widgets/aboutdialog.cpp \
|
||||||
widgets/bookmarkmodel.cpp \
|
widgets/bookmarkmodel.cpp \
|
||||||
|
widgets/choosethemedialog.cpp \
|
||||||
widgets/classbrowser.cpp \
|
widgets/classbrowser.cpp \
|
||||||
widgets/codecompletionlistview.cpp \
|
widgets/codecompletionlistview.cpp \
|
||||||
widgets/codecompletionpopup.cpp \
|
widgets/codecompletionpopup.cpp \
|
||||||
|
@ -245,6 +246,7 @@ HEADERS += \
|
||||||
vcs/gitutils.h \
|
vcs/gitutils.h \
|
||||||
widgets/aboutdialog.h \
|
widgets/aboutdialog.h \
|
||||||
widgets/bookmarkmodel.h \
|
widgets/bookmarkmodel.h \
|
||||||
|
widgets/choosethemedialog.h \
|
||||||
widgets/classbrowser.h \
|
widgets/classbrowser.h \
|
||||||
widgets/codecompletionlistview.h \
|
widgets/codecompletionlistview.h \
|
||||||
widgets/codecompletionpopup.h \
|
widgets/codecompletionpopup.h \
|
||||||
|
@ -346,6 +348,7 @@ FORMS += \
|
||||||
vcs/gitremotedialog.ui \
|
vcs/gitremotedialog.ui \
|
||||||
vcs/gitresetdialog.ui \
|
vcs/gitresetdialog.ui \
|
||||||
widgets/aboutdialog.ui \
|
widgets/aboutdialog.ui \
|
||||||
|
widgets/choosethemedialog.ui \
|
||||||
widgets/cpudialog.ui \
|
widgets/cpudialog.ui \
|
||||||
mainwindow.ui \
|
mainwindow.ui \
|
||||||
settingsdialog/compilersetdirectorieswidget.ui \
|
settingsdialog/compilersetdirectorieswidget.ui \
|
||||||
|
|
|
@ -428,6 +428,30 @@ p, li { white-space: pre-wrap; }
|
||||||
<translation>凯尔特语系</translation>
|
<translation>凯尔特语系</translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
|
<context>
|
||||||
|
<name>ChooseThemeDialog</name>
|
||||||
|
<message>
|
||||||
|
<location filename="widgets/choosethemedialog.ui" line="14"/>
|
||||||
|
<location filename="widgets/choosethemedialog.ui" line="20"/>
|
||||||
|
<source>Choose Theme</source>
|
||||||
|
<translation>选择主题</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="widgets/choosethemedialog.ui" line="26"/>
|
||||||
|
<source>Dark Theme</source>
|
||||||
|
<translation>深色主题</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="widgets/choosethemedialog.ui" line="49"/>
|
||||||
|
<source>Light Theme</source>
|
||||||
|
<translation>浅色主题</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="widgets/choosethemedialog.ui" line="116"/>
|
||||||
|
<source>Ok</source>
|
||||||
|
<translation>确定</translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>CodeSnippetsManager</name>
|
<name>CodeSnippetsManager</name>
|
||||||
<message>
|
<message>
|
||||||
|
@ -3684,7 +3708,7 @@ Are you really want to continue?</oldsource>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainwindow.ui" line="560"/>
|
<location filename="mainwindow.ui" line="560"/>
|
||||||
<location filename="mainwindow.ui" line="2631"/>
|
<location filename="mainwindow.ui" line="2634"/>
|
||||||
<location filename="mainwindow.cpp" line="4282"/>
|
<location filename="mainwindow.cpp" line="4282"/>
|
||||||
<location filename="mainwindow.cpp" line="4285"/>
|
<location filename="mainwindow.cpp" line="4285"/>
|
||||||
<location filename="mainwindow.cpp" line="4289"/>
|
<location filename="mainwindow.cpp" line="4289"/>
|
||||||
|
@ -3719,27 +3743,27 @@ Are you really want to continue?</oldsource>
|
||||||
<translation>编辑</translation>
|
<translation>编辑</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainwindow.ui" line="99"/>
|
<location filename="mainwindow.ui" line="178"/>
|
||||||
<location filename="mainwindow.ui" line="1541"/>
|
<location filename="mainwindow.ui" line="1541"/>
|
||||||
<location filename="mainwindow.ui" line="2591"/>
|
<location filename="mainwindow.ui" line="2594"/>
|
||||||
<source>Project</source>
|
<source>Project</source>
|
||||||
<translation>项目</translation>
|
<translation>项目</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainwindow.ui" line="150"/>
|
<location filename="mainwindow.ui" line="229"/>
|
||||||
<location filename="mainwindow.ui" line="2599"/>
|
<location filename="mainwindow.ui" line="2602"/>
|
||||||
<source>Watch</source>
|
<source>Watch</source>
|
||||||
<translation>监视</translation>
|
<translation>监视</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainwindow.ui" line="189"/>
|
<location filename="mainwindow.ui" line="268"/>
|
||||||
<location filename="mainwindow.ui" line="2607"/>
|
<location filename="mainwindow.ui" line="2610"/>
|
||||||
<source>Structure</source>
|
<source>Structure</source>
|
||||||
<translation>结构</translation>
|
<translation>结构</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainwindow.ui" line="228"/>
|
<location filename="mainwindow.ui" line="99"/>
|
||||||
<location filename="mainwindow.ui" line="2615"/>
|
<location filename="mainwindow.ui" line="2618"/>
|
||||||
<source>Files</source>
|
<source>Files</source>
|
||||||
<translation>文件</translation>
|
<translation>文件</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -3752,7 +3776,7 @@ Are you really want to continue?</oldsource>
|
||||||
<location filename="mainwindow.ui" line="1690"/>
|
<location filename="mainwindow.ui" line="1690"/>
|
||||||
<location filename="mainwindow.ui" line="2036"/>
|
<location filename="mainwindow.ui" line="2036"/>
|
||||||
<location filename="mainwindow.ui" line="2039"/>
|
<location filename="mainwindow.ui" line="2039"/>
|
||||||
<location filename="mainwindow.ui" line="2647"/>
|
<location filename="mainwindow.ui" line="2650"/>
|
||||||
<source>Debug</source>
|
<source>Debug</source>
|
||||||
<translation>调试</translation>
|
<translation>调试</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -3785,7 +3809,7 @@ Are you really want to continue?</oldsource>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainwindow.ui" line="926"/>
|
<location filename="mainwindow.ui" line="926"/>
|
||||||
<location filename="mainwindow.ui" line="1506"/>
|
<location filename="mainwindow.ui" line="1506"/>
|
||||||
<location filename="mainwindow.ui" line="2655"/>
|
<location filename="mainwindow.ui" line="2658"/>
|
||||||
<source>Search</source>
|
<source>Search</source>
|
||||||
<translation>查找</translation>
|
<translation>查找</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -3904,7 +3928,7 @@ Are you really want to continue?</oldsource>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainwindow.ui" line="615"/>
|
<location filename="mainwindow.ui" line="615"/>
|
||||||
<location filename="mainwindow.ui" line="2639"/>
|
<location filename="mainwindow.ui" line="2642"/>
|
||||||
<source>Tools Output</source>
|
<source>Tools Output</source>
|
||||||
<translation>工具输出</translation>
|
<translation>工具输出</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -4104,7 +4128,7 @@ Are you really want to continue?</oldsource>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainwindow.ui" line="307"/>
|
<location filename="mainwindow.ui" line="307"/>
|
||||||
<location filename="mainwindow.ui" line="334"/>
|
<location filename="mainwindow.ui" line="334"/>
|
||||||
<location filename="mainwindow.ui" line="2623"/>
|
<location filename="mainwindow.ui" line="2626"/>
|
||||||
<location filename="mainwindow.cpp" line="658"/>
|
<location filename="mainwindow.cpp" line="658"/>
|
||||||
<source>Problem Set</source>
|
<source>Problem Set</source>
|
||||||
<translation>试题集</translation>
|
<translation>试题集</translation>
|
||||||
|
@ -4160,20 +4184,20 @@ Are you really want to continue?</oldsource>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainwindow.ui" line="1094"/>
|
<location filename="mainwindow.ui" line="1094"/>
|
||||||
<location filename="mainwindow.ui" line="2663"/>
|
<location filename="mainwindow.ui" line="2666"/>
|
||||||
<source>TODO</source>
|
<source>TODO</source>
|
||||||
<translation>TODO</translation>
|
<translation>TODO</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainwindow.ui" line="1112"/>
|
<location filename="mainwindow.ui" line="1112"/>
|
||||||
<location filename="mainwindow.ui" line="2671"/>
|
<location filename="mainwindow.ui" line="2674"/>
|
||||||
<source>Bookmark</source>
|
<source>Bookmark</source>
|
||||||
<translation>书签</translation>
|
<translation>书签</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainwindow.ui" line="1139"/>
|
<location filename="mainwindow.ui" line="1139"/>
|
||||||
<location filename="mainwindow.ui" line="1182"/>
|
<location filename="mainwindow.ui" line="1182"/>
|
||||||
<location filename="mainwindow.ui" line="2679"/>
|
<location filename="mainwindow.ui" line="2682"/>
|
||||||
<location filename="mainwindow.cpp" line="656"/>
|
<location filename="mainwindow.cpp" line="656"/>
|
||||||
<source>Problem</source>
|
<source>Problem</source>
|
||||||
<translation>试题</translation>
|
<translation>试题</translation>
|
||||||
|
@ -4626,70 +4650,70 @@ Are you really want to continue?</oldsource>
|
||||||
<translation>C++参考手册</translation>
|
<translation>C++参考手册</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainwindow.ui" line="2567"/>
|
<location filename="mainwindow.ui" line="2570"/>
|
||||||
<source>C Reference</source>
|
<source>C Reference</source>
|
||||||
<translation>C参考手册</translation>
|
<translation>C参考手册</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainwindow.ui" line="2575"/>
|
<location filename="mainwindow.ui" line="2578"/>
|
||||||
<source>Show Tool Panels</source>
|
<source>Show Tool Panels</source>
|
||||||
<translation>显示全部工具面板</translation>
|
<translation>显示全部工具面板</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainwindow.ui" line="2765"/>
|
<location filename="mainwindow.ui" line="2768"/>
|
||||||
<source>Create Git Repository</source>
|
<source>Create Git Repository</source>
|
||||||
<oldsource>Create Repository</oldsource>
|
<oldsource>Create Repository</oldsource>
|
||||||
<translation>创建Git仓库</translation>
|
<translation>创建Git仓库</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainwindow.ui" line="2770"/>
|
<location filename="mainwindow.ui" line="2773"/>
|
||||||
<source>Commit</source>
|
<source>Commit</source>
|
||||||
<translation>提交(Commit)</translation>
|
<translation>提交(Commit)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainwindow.ui" line="2775"/>
|
<location filename="mainwindow.ui" line="2778"/>
|
||||||
<source>Revert</source>
|
<source>Revert</source>
|
||||||
<translation>撤销(Revert)</translation>
|
<translation>撤销(Revert)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainwindow.ui" line="2780"/>
|
<location filename="mainwindow.ui" line="2783"/>
|
||||||
<source>Reset</source>
|
<source>Reset</source>
|
||||||
<translation>回滚(Reset)</translation>
|
<translation>回滚(Reset)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainwindow.ui" line="2785"/>
|
<location filename="mainwindow.ui" line="2788"/>
|
||||||
<source>Add Files</source>
|
<source>Add Files</source>
|
||||||
<translation>添加文件</translation>
|
<translation>添加文件</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainwindow.ui" line="2790"/>
|
<location filename="mainwindow.ui" line="2793"/>
|
||||||
<source>Restore</source>
|
<source>Restore</source>
|
||||||
<translation>还原(Restore)</translation>
|
<translation>还原(Restore)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainwindow.ui" line="2795"/>
|
<location filename="mainwindow.ui" line="2798"/>
|
||||||
<source>Website</source>
|
<source>Website</source>
|
||||||
<translation>官方网站</translation>
|
<translation>官方网站</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainwindow.ui" line="2800"/>
|
<location filename="mainwindow.ui" line="2803"/>
|
||||||
<source>Branch/Switch</source>
|
<source>Branch/Switch</source>
|
||||||
<translation>分支切换(Switch)</translation>
|
<translation>分支切换(Switch)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainwindow.ui" line="2805"/>
|
<location filename="mainwindow.ui" line="2808"/>
|
||||||
<source>Merge</source>
|
<source>Merge</source>
|
||||||
<translation>合并(Merge)</translation>
|
<translation>合并(Merge)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainwindow.ui" line="2810"/>
|
|
||||||
<location filename="mainwindow.ui" line="2813"/>
|
<location filename="mainwindow.ui" line="2813"/>
|
||||||
|
<location filename="mainwindow.ui" line="2816"/>
|
||||||
<source>Show Log</source>
|
<source>Show Log</source>
|
||||||
<oldsource>Log</oldsource>
|
<oldsource>Log</oldsource>
|
||||||
<translation>显示日志(Log)</translation>
|
<translation>显示日志(Log)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainwindow.ui" line="2818"/>
|
<location filename="mainwindow.ui" line="2821"/>
|
||||||
<source>Remotes...</source>
|
<source>Remotes...</source>
|
||||||
<translation>远程仓库...</translation>
|
<translation>远程仓库...</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -4698,50 +4722,50 @@ Are you really want to continue?</oldsource>
|
||||||
<translation type="vanished">工具窗口栏</translation>
|
<translation type="vanished">工具窗口栏</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainwindow.ui" line="2583"/>
|
<location filename="mainwindow.ui" line="2586"/>
|
||||||
<source>Status Bar</source>
|
<source>Status Bar</source>
|
||||||
<translation>状态栏</translation>
|
<translation>状态栏</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainwindow.ui" line="2719"/>
|
<location filename="mainwindow.ui" line="2722"/>
|
||||||
<source>Ctrl+Backspace</source>
|
<source>Ctrl+Backspace</source>
|
||||||
<translation>Ctrl+Backspace</translation>
|
<translation>Ctrl+Backspace</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainwindow.ui" line="2728"/>
|
<location filename="mainwindow.ui" line="2731"/>
|
||||||
<source>Interrupt</source>
|
<source>Interrupt</source>
|
||||||
<translation>中断</translation>
|
<translation>中断</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainwindow.ui" line="2733"/>
|
|
||||||
<location filename="mainwindow.ui" line="2736"/>
|
<location filename="mainwindow.ui" line="2736"/>
|
||||||
|
<location filename="mainwindow.ui" line="2739"/>
|
||||||
<source>Delete To Word Begin</source>
|
<source>Delete To Word Begin</source>
|
||||||
<translation>删除到单词开头</translation>
|
<translation>删除到单词开头</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainwindow.ui" line="2739"/>
|
<location filename="mainwindow.ui" line="2742"/>
|
||||||
<source>Ctrl+Shift+B</source>
|
<source>Ctrl+Shift+B</source>
|
||||||
<translation>Ctrl+Shift+B</translation>
|
<translation>Ctrl+Shift+B</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainwindow.ui" line="2744"/>
|
<location filename="mainwindow.ui" line="2747"/>
|
||||||
<source>Delete to Word End</source>
|
<source>Delete to Word End</source>
|
||||||
<translation>删除到单词结尾</translation>
|
<translation>删除到单词结尾</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainwindow.ui" line="2747"/>
|
<location filename="mainwindow.ui" line="2750"/>
|
||||||
<source>Ctrl+Shift+E</source>
|
<source>Ctrl+Shift+E</source>
|
||||||
<translation>Ctrl+Shift+E</translation>
|
<translation>Ctrl+Shift+E</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainwindow.ui" line="2752"/>
|
<location filename="mainwindow.ui" line="2755"/>
|
||||||
<source>New Class...</source>
|
<source>New Class...</source>
|
||||||
<oldsource>Add Class...</oldsource>
|
<oldsource>Add Class...</oldsource>
|
||||||
<translation>新建类...</translation>
|
<translation>新建类...</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainwindow.ui" line="2757"/>
|
|
||||||
<location filename="mainwindow.ui" line="2760"/>
|
<location filename="mainwindow.ui" line="2760"/>
|
||||||
|
<location filename="mainwindow.ui" line="2763"/>
|
||||||
<source>New Header...</source>
|
<source>New Header...</source>
|
||||||
<oldsource>New Header</oldsource>
|
<oldsource>New Header</oldsource>
|
||||||
<translation>新建头文件...</translation>
|
<translation>新建头文件...</translation>
|
||||||
|
@ -4751,47 +4775,47 @@ Are you really want to continue?</oldsource>
|
||||||
<translation type="vanished">插入行</translation>
|
<translation type="vanished">插入行</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainwindow.ui" line="2684"/>
|
<location filename="mainwindow.ui" line="2687"/>
|
||||||
<source>Delete Line</source>
|
<source>Delete Line</source>
|
||||||
<translation>删除当前行</translation>
|
<translation>删除当前行</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainwindow.ui" line="2687"/>
|
<location filename="mainwindow.ui" line="2690"/>
|
||||||
<source>Ctrl+D</source>
|
<source>Ctrl+D</source>
|
||||||
<translation>Ctrl+D</translation>
|
<translation>Ctrl+D</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainwindow.ui" line="2692"/>
|
<location filename="mainwindow.ui" line="2695"/>
|
||||||
<source>Duplicate Line</source>
|
<source>Duplicate Line</source>
|
||||||
<translation>复制当前行</translation>
|
<translation>复制当前行</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainwindow.ui" line="2695"/>
|
<location filename="mainwindow.ui" line="2698"/>
|
||||||
<source>Ctrl+E</source>
|
<source>Ctrl+E</source>
|
||||||
<translation>Ctrl+E</translation>
|
<translation>Ctrl+E</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainwindow.ui" line="2700"/>
|
<location filename="mainwindow.ui" line="2703"/>
|
||||||
<source>Delete Word</source>
|
<source>Delete Word</source>
|
||||||
<translation>删除当前单词</translation>
|
<translation>删除当前单词</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainwindow.ui" line="2703"/>
|
<location filename="mainwindow.ui" line="2706"/>
|
||||||
<source>Ctrl+Shift+D</source>
|
<source>Ctrl+Shift+D</source>
|
||||||
<translation>Ctrl+Shift+D</translation>
|
<translation>Ctrl+Shift+D</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainwindow.ui" line="2708"/>
|
<location filename="mainwindow.ui" line="2711"/>
|
||||||
<source>Delete to EOL</source>
|
<source>Delete to EOL</source>
|
||||||
<translation>删除到行尾</translation>
|
<translation>删除到行尾</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainwindow.ui" line="2711"/>
|
<location filename="mainwindow.ui" line="2714"/>
|
||||||
<source>Ctrl+Del</source>
|
<source>Ctrl+Del</source>
|
||||||
<translation>Ctrl+Del</translation>
|
<translation>Ctrl+Del</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainwindow.ui" line="2716"/>
|
<location filename="mainwindow.ui" line="2719"/>
|
||||||
<source>Delete to BOL</source>
|
<source>Delete to BOL</source>
|
||||||
<translation>删除到行首</translation>
|
<translation>删除到行首</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -4825,12 +4849,11 @@ Are you really want to continue?</oldsource>
|
||||||
<translation>在文件视图中定位</translation>
|
<translation>在文件视图中定位</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainwindow.ui" line="2553"/>
|
|
||||||
<source>Open Folder</source>
|
<source>Open Folder</source>
|
||||||
<translation>打开文件夹</translation>
|
<translation type="vanished">打开文件夹</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="mainwindow.ui" line="2562"/>
|
<location filename="mainwindow.ui" line="2565"/>
|
||||||
<source>Running Parameters...</source>
|
<source>Running Parameters...</source>
|
||||||
<translation>运行参数...</translation>
|
<translation>运行参数...</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -5440,6 +5463,8 @@ Are you really want to continue?</oldsource>
|
||||||
<translation>你真的要删除它吗?</translation>
|
<translation>你真的要删除它吗?</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
|
<location filename="mainwindow.ui" line="2553"/>
|
||||||
|
<location filename="mainwindow.ui" line="2556"/>
|
||||||
<location filename="mainwindow.cpp" line="6222"/>
|
<location filename="mainwindow.cpp" line="6222"/>
|
||||||
<source>Choose Working Folder</source>
|
<source>Choose Working Folder</source>
|
||||||
<translation type="unfinished">选择工作文件夹</translation>
|
<translation type="unfinished">选择工作文件夹</translation>
|
||||||
|
@ -6704,7 +6729,7 @@ Are you really want to continue?</oldsource>
|
||||||
<context>
|
<context>
|
||||||
<name>QApplication</name>
|
<name>QApplication</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="main.cpp" line="219"/>
|
<location filename="main.cpp" line="231"/>
|
||||||
<source>Error</source>
|
<source>Error</source>
|
||||||
<translation>错误</translation>
|
<translation>错误</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -6758,23 +6783,23 @@ Are you really want to continue?</oldsource>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="colorscheme.cpp" line="572"/>
|
<location filename="colorscheme.cpp" line="572"/>
|
||||||
<location filename="main.cpp" line="97"/>
|
<location filename="main.cpp" line="98"/>
|
||||||
<location filename="main.cpp" line="104"/>
|
<location filename="main.cpp" line="105"/>
|
||||||
<source>Error</source>
|
<source>Error</source>
|
||||||
<translation>错误</translation>
|
<translation>错误</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="main.cpp" line="98"/>
|
<location filename="main.cpp" line="99"/>
|
||||||
<source>Can't create configuration folder %1</source>
|
<source>Can't create configuration folder %1</source>
|
||||||
<translation>无法创建配置文件夹"%1"</translation>
|
<translation>无法创建配置文件夹"%1"</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="main.cpp" line="105"/>
|
<location filename="main.cpp" line="106"/>
|
||||||
<source>Can't write to configuration file %1</source>
|
<source>Can't write to configuration file %1</source>
|
||||||
<translation>无法写入配置文件夹"%1"</translation>
|
<translation>无法写入配置文件夹"%1"</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="main.cpp" line="170"/>
|
<location filename="main.cpp" line="182"/>
|
||||||
<source>Can't load autolink settings</source>
|
<source>Can't load autolink settings</source>
|
||||||
<translation>无法载入自动链接设置</translation>
|
<translation>无法载入自动链接设置</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -7409,7 +7434,7 @@ Are you really want to continue?</oldsource>
|
||||||
<translation>无法解析试题集文件"%1":%2</translation>
|
<translation>无法解析试题集文件"%1":%2</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="vcs/gitmanager.cpp" line="345"/>
|
<location filename="vcs/gitmanager.cpp" line="348"/>
|
||||||
<location filename="vcs/gitmergedialog.cpp" line="18"/>
|
<location filename="vcs/gitmergedialog.cpp" line="18"/>
|
||||||
<source><Auto Generated by Git></source>
|
<source><Auto Generated by Git></source>
|
||||||
<translation><由Git自动生成></translation>
|
<translation><由Git自动生成></translation>
|
||||||
|
|
|
@ -109,4 +109,10 @@
|
||||||
<file>images/associations/template.ico</file>
|
<file>images/associations/template.ico</file>
|
||||||
<file>images/dark-close.svg</file>
|
<file>images/dark-close.svg</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
|
<qresource prefix="/demos">
|
||||||
|
<file alias="dark.png">images/demos/dark.png</file>
|
||||||
|
<file alias="dark-zh_CN.png">images/demos/dark-zh_CN.png</file>
|
||||||
|
<file alias="light.png">images/demos/light.png</file>
|
||||||
|
<file alias="light-zh_CN.png">images/demos/light-zh_CN.png</file>
|
||||||
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
|
|
@ -35,6 +35,8 @@
|
||||||
#include "platform.h"
|
#include "platform.h"
|
||||||
#include "parser/parserutils.h"
|
#include "parser/parserutils.h"
|
||||||
#include "editorlist.h"
|
#include "editorlist.h"
|
||||||
|
#include "widgets/choosethemedialog.h"
|
||||||
|
#include "thememanager.h"
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#endif
|
#endif
|
||||||
|
@ -109,6 +111,21 @@ QString getSettingFilename(const QString& filepath, bool& firstRun) {
|
||||||
return filename;
|
return filename;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void setTheme(const QString& theme) {
|
||||||
|
pSettings->environment().setTheme(theme);
|
||||||
|
ThemeManager themeManager;
|
||||||
|
PAppTheme appTheme = themeManager.theme(theme);
|
||||||
|
if (appTheme && !appTheme->defaultColorScheme().isEmpty()) {
|
||||||
|
pSettings->editor().setColorScheme(appTheme->defaultColorScheme());
|
||||||
|
pSettings->editor().save();
|
||||||
|
}
|
||||||
|
if (appTheme && !appTheme->defaultIconSet().isEmpty()) {
|
||||||
|
pSettings->environment().setIconSet(appTheme->defaultIconSet());
|
||||||
|
}
|
||||||
|
pSettings->environment().save();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
//QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
//QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
||||||
|
@ -157,6 +174,18 @@ int main(int argc, char *argv[])
|
||||||
pSettings->compilerSets().saveSets();
|
pSettings->compilerSets().saveSets();
|
||||||
}
|
}
|
||||||
pSettings->load();
|
pSettings->load();
|
||||||
|
if (firstRun) {
|
||||||
|
//set theme
|
||||||
|
ChooseThemeDialog themeDialog;
|
||||||
|
themeDialog.exec();
|
||||||
|
switch (themeDialog.theme()) {
|
||||||
|
case ChooseThemeDialog::Theme::Dark:
|
||||||
|
setTheme("dark");
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
setTheme("default");
|
||||||
|
}
|
||||||
|
}
|
||||||
auto settings = std::unique_ptr<Settings>(pSettings);
|
auto settings = std::unique_ptr<Settings>(pSettings);
|
||||||
|
|
||||||
//Color scheme settings must be loaded after translation
|
//Color scheme settings must be loaded after translation
|
||||||
|
|
|
@ -5058,7 +5058,7 @@ void Settings::UI::doLoad()
|
||||||
mBottomPanelIndex = intValue("bottom_panel_index",0);
|
mBottomPanelIndex = intValue("bottom_panel_index",0);
|
||||||
mLeftPanelOpenned = boolValue("left_panel_openned",true);
|
mLeftPanelOpenned = boolValue("left_panel_openned",true);
|
||||||
mLeftPanelWidth = intValue("left_panel_width",250);
|
mLeftPanelWidth = intValue("left_panel_width",250);
|
||||||
mLeftPanelIndex = intValue("left_panel_index",2);
|
mLeftPanelIndex = intValue("left_panel_index",0);
|
||||||
mClassBrowserSortAlpha = boolValue("class_browser_sort_alphabetically",true);
|
mClassBrowserSortAlpha = boolValue("class_browser_sort_alphabetically",true);
|
||||||
mClassBrowserSortType = boolValue("class_browser_sort_by_type",true);
|
mClassBrowserSortType = boolValue("class_browser_sort_by_type",true);
|
||||||
mClassBrowserShowInherited = boolValue("class_browser_show_inherited",true);
|
mClassBrowserShowInherited = boolValue("class_browser_show_inherited",true);
|
||||||
|
|
|
@ -0,0 +1,28 @@
|
||||||
|
#include "choosethemedialog.h"
|
||||||
|
#include "ui_choosethemedialog.h"
|
||||||
|
|
||||||
|
ChooseThemeDialog::ChooseThemeDialog(QWidget *parent) :
|
||||||
|
QDialog(parent),
|
||||||
|
ui(new Ui::ChooseThemeDialog)
|
||||||
|
{
|
||||||
|
ui->setupUi(this);
|
||||||
|
ui->rbDark->setChecked(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
ChooseThemeDialog::~ChooseThemeDialog()
|
||||||
|
{
|
||||||
|
delete ui;
|
||||||
|
}
|
||||||
|
|
||||||
|
ChooseThemeDialog::Theme ChooseThemeDialog::theme()
|
||||||
|
{
|
||||||
|
if (ui->rbDark->isChecked())
|
||||||
|
return Theme::Dark;
|
||||||
|
return Theme::Light;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ChooseThemeDialog::on_btnOk_clicked()
|
||||||
|
{
|
||||||
|
accept();
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,30 @@
|
||||||
|
#ifndef CHOOSETHEMEDIALOG_H
|
||||||
|
#define CHOOSETHEMEDIALOG_H
|
||||||
|
|
||||||
|
#include <QDialog>
|
||||||
|
|
||||||
|
namespace Ui {
|
||||||
|
class ChooseThemeDialog;
|
||||||
|
}
|
||||||
|
|
||||||
|
class ChooseThemeDialog : public QDialog
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
enum class Theme {
|
||||||
|
Dark,
|
||||||
|
Light
|
||||||
|
};
|
||||||
|
explicit ChooseThemeDialog(QWidget *parent = nullptr);
|
||||||
|
~ChooseThemeDialog();
|
||||||
|
Theme theme();
|
||||||
|
|
||||||
|
private slots:
|
||||||
|
void on_btnOk_clicked();
|
||||||
|
|
||||||
|
private:
|
||||||
|
Ui::ChooseThemeDialog *ui;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // CHOOSETHEMEDIALOG_H
|
|
@ -0,0 +1,129 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>ChooseThemeDialog</class>
|
||||||
|
<widget class="QDialog" name="ChooseThemeDialog">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>1041</width>
|
||||||
|
<height>593</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string>Choose Theme</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
|
<item>
|
||||||
|
<widget class="QGroupBox" name="grpTheme">
|
||||||
|
<property name="title">
|
||||||
|
<string>Choose Theme</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QRadioButton" name="rbDark">
|
||||||
|
<property name="text">
|
||||||
|
<string>Dark Theme</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QLabel" name="label">
|
||||||
|
<property name="frameShape">
|
||||||
|
<enum>QFrame::Box</enum>
|
||||||
|
</property>
|
||||||
|
<property name="frameShadow">
|
||||||
|
<enum>QFrame::Sunken</enum>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
<property name="pixmap">
|
||||||
|
<pixmap resource="../icons.qrc">:/demos/dark.png</pixmap>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1">
|
||||||
|
<widget class="QRadioButton" name="rbLight">
|
||||||
|
<property name="text">
|
||||||
|
<string>Light Theme</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1">
|
||||||
|
<widget class="QLabel" name="label_2">
|
||||||
|
<property name="frameShape">
|
||||||
|
<enum>QFrame::Box</enum>
|
||||||
|
</property>
|
||||||
|
<property name="frameShadow">
|
||||||
|
<enum>QFrame::Sunken</enum>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
<property name="pixmap">
|
||||||
|
<pixmap resource="../icons.qrc">:/demos/light.png</pixmap>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="verticalSpacer">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>77</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QWidget" name="widget" native="true">
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
|
<property name="leftMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<spacer name="horizontalSpacer">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>1828</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="btnOk">
|
||||||
|
<property name="text">
|
||||||
|
<string>Ok</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<resources>
|
||||||
|
<include location="../icons.qrc"/>
|
||||||
|
</resources>
|
||||||
|
<connections/>
|
||||||
|
</ui>
|
Loading…
Reference in New Issue