耗时一天,自制 QtCreator v12 主题,拿去用吧

        因为本人找的主题观感上都不能让自己的眼睛觉得尽善尽美,所以干脆慢慢调色做了一套自己喜欢的配色。下面是效果图,字体是 QtCreator 自带字型的,搜Source就会弹出

下面是应用的步骤

        (1)在 Qt 所在文件夹的 styles 文件夹下创一个 my_style.xml 文件,叫什么都可以。

本人 styles 文件夹的路径,以供参考:

        C:\Qt\Tools\QtCreator\share\qtcreator\styles

        (2)打开xml文件,复制粘贴以下代码

        (3)保存代码,然后按以下步骤找到  My Style主题,应用,确定

        (4)在代码编辑界面随便打一个字,就可以看出效果了(本主题只影响字体和代码编辑器颜色,整个Qt Creator 的黑色是其他主题应用的)


【补充样式一】

效果

代码

<?xml version="1.0" encoding="UTF-8"?>
<style-scheme version="1.0" name="One Dark Pro">
  <style name="Text" foreground="#abb2bf" background="#282c34"/>
  <style name="Link" underlineStyle="SingleUnderline"/>
  <style name="Selection" background="#3e4451"/>
  <style name="LineNumber" foreground="#4b5363" bold="true"/>
  <style name="SearchResult" background="#324365"/>
  <style name="SearchScope" background="#3e4451"/>
  <style name="Parentheses" background="#515a6b" />
  <style name="ParenthesesMismatch" foreground="#000000" background="#c678dd"/>
  <style name="AutoComplete" background="#3e4451"/>
  <style name="CurrentLine" background="#3a3f4b" bold="true"/>
  <style name="CurrentLineNumber" foreground="#abb2bf" />
  <style name="Occurrences" background="#324365" />
  <style name="Occurrences.Unused" underlineColor="#d19a66" underlineStyle="DashUnderline"/>
  <style name="Occurrences.Rename" background="#e06c75"/>
  <style name="Number" foreground="#ffb3e6"/>
  <style name="String" foreground="#ffb3e6"/> <!-- 默认绿98c379 -->
  <style name="Type" foreground="#FFFFFF"/>
  <style name="Local" foreground="#FFFFFF"/>
  <style name="Parameter" foreground="#00AA55" />
  <style name="Global" foreground="#FFFFFF"/>
  <style name="Field" foreground="#FFFFFF" />
  <style name="Static" foreground="#FFFFFF" />
  <style name="VirtualMethod" foreground="#61afef" italic="false"/>
  <style name="Function" foreground="#99FF99"/>
  <style name="Keyword" foreground="#c678dd"/> <!-- 关键字(static、this) -->
  <style name="PrimitiveType" foreground="#00AA55"/>
  <style name="Type" foreground="#FFFFBB" />	<!-- 非基础类型(int...)的类型 浅蓝紫99BBFF,桃红f0768b,暗粉红FF8888,蛋黄 FFFFBB -->
  <style name="Operator" foreground="#c678dd" />
  <style name="Overloaded Operator" foreground="#c678dd"/>
  <style name="Punctuation" />	<!-- 标点符号,默认无foreground颜色 -->
  <style name="Preprocessor" foreground="#c678dd"/>
  <style name="Label" foreground="#e06c75" bold="true"/>
  <style name="Comment" foreground="#B0C4DE" italic="false"/>	<!-- 注释 牛油果绿9ACD32,蓝灰B0C4DE -->
  <style name="Doxygen.Comment" foreground="#5c6370" italic="false"/>
  <style name="Doxygen.Tag" foreground="#61afef"/>
  <style name="VisualWhitespace" foreground="#3c4049"/>
  <style name="QmlLocalId" foreground="#61afef"/>
  <style name="QmlExternalId"/>
  <style name="QmlTypeId" foreground="#61afef"/>
  <style name="QmlRootObjectProperty" foreground="#61afef"/>
  <style name="QmlScopeObjectProperty" foreground="#61afef"/>
  <style name="QmlExternalObjectProperty"/>
  <style name="JsScopeVar"/>
  <style name="JsImportVar" foreground="#d19a66"/>
  <style name="JsGlobalVar" foreground="#d19a66"/>
  <style name="QmlStateName" foreground="#61afef"/>
  <style name="Binding" foreground="#c678dd"/>
  <style name="DisabledCode" foreground="#5c6370"/>
  <style name="AddedLine" foreground="#98c379"/>
  <style name="RemovedLine" foreground="#e06c75"/>
  <style name="DiffFile" foreground="#61afef"/>
  <style name="DiffLocation" foreground="#d19a66"/>
  <style name="DiffFileLine" foreground="#000000" background="#e5c07b"/>
  <style name="DiffContextLine" foreground="#000000" background="#56b6c2"/>
  <style name="DiffSourceLine" foreground="#000000" background="#be5046"/>
  <style name="DiffSourceChar" foreground="#000000" background="#e06c75"/>
  <style name="DiffDestLine" foreground="#000000" background="#789353"/>
  <style name="DiffDestChar" foreground="#000000" background="#98c379"/>
  <style name="LogChangeLine" foreground="#e06c75"/>
  <style name="LogAuthorName" foreground="#61afef"/>
  <style name="LogCommitDate" foreground="#98c379"/>
  <style name="LogCommitHash" foreground="#e06c75"/>
  <style name="LogCommitSubject"/>
  <style name="LogDecoration" foreground="#c678dd"/>
  <style name="Warning" underlineColor="#d19a66" underlineStyle="SingleUnderline"/>
  <style name="WarningContext" underlineColor="#d19a66" underlineStyle="DotLine"/>
  <style name="Error" underlineColor="#e06c75" underlineStyle="SingleUnderline"/>
  <style name="ErrorContext" underlineColor="#e06c75" underlineStyle="DotLine"/>
  <style name="Declaration"/>
  <style name="FunctionDefinition"/>
  <style name="OutputArgument" foreground="#00AA55" italic="false"/>
  <style name="LastStyleSentinel"/>
</style-scheme>

【补充样式二】

效果

代码

<?xml version="1.0" encoding="UTF-8"?>
<style-scheme version="1.0" name="One Dark Pro">
  <style name="Text" foreground="#abb2bf" background="#282c34"/>
  <style name="Link" underlineStyle="SingleUnderline"/>
  <style name="Selection" background="#3e4451"/>
  <style name="LineNumber" foreground="#8b8bcd" bold="true"/>  <!-- 行号 默认(灰)4b5363 蓝紫8b8bcd -->
  <style name="SearchResult" background="#324365"/>
  <style name="SearchScope" background="#3e4451"/>
  <style name="Parentheses" background="#515a6b" />
  <style name="ParenthesesMismatch" foreground="#000000" background="#c678dd"/>
  <style name="AutoComplete" background="#3e4451"/>
  <style name="CurrentLine" background="#3a3f4b" bold="true"/>
  <style name="CurrentLineNumber" foreground="#abb2bf" />
  <style name="Occurrences" background="#324365" />
  <style name="Occurrences.Unused" underlineColor="#d19a66" underlineStyle="DashUnderline"/>
  <style name="Occurrences.Rename" background="#e06c75"/>
  <style name="Number" foreground="#ffb3e6"/>
  <style name="String" foreground="#9ACD32"/> <!-- 默认绿98c379 牛油果绿9ACD32 粉红ffb3e6-->
  <style name="Type" foreground="#FFFFFF"/>
  <style name="Local" foreground="#FFFFFF"/>
  <style name="Parameter" foreground="#00AA55" />
  <style name="Global" foreground="#FFFFFF"/>
  <style name="Field" foreground="#FFFFFF" />
  <style name="Static" foreground="#FFFFFF" />  
  <style name="VirtualMethod" foreground="#61afef" italic="false"/>
  <style name="Function" foreground="#8b8bcd"/> <!-- 函数 浅绿99FF99 蓝紫8b8bcd -->
  <style name="Keyword" foreground="#c678dd"/> <!-- 关键字(static、this) -->
  <style name="PrimitiveType" foreground="#00AA55"/>
  <style name="Type" foreground="#FFFFBB" />	<!-- 非基础类型(int...)的类型 浅蓝紫99BBFF,桃红f0768b,暗粉红FF8888,蛋黄 FFFFBB -->
  <style name="Operator" foreground="#c678dd" />
  <style name="Overloaded Operator" foreground="#c678dd"/>
  <style name="Punctuation" />	<!-- 标点符号,默认无foreground颜色 -->
  <style name="Preprocessor" foreground="#c678dd"/>
  <style name="Label" foreground="#e06c75" bold="true"/>
  <style name="Comment" foreground="#B0C4DE" italic="false"/>	<!-- 注释 牛油果绿9ACD32,蓝灰B0C4DE -->
  <style name="Doxygen.Comment" foreground="#5c6370" italic="false"/>
  <style name="Doxygen.Tag" foreground="#61afef"/>
  <style name="VisualWhitespace" foreground="#3c4049"/>
  <style name="QmlLocalId" foreground="#61afef"/>
  <style name="QmlExternalId"/>
  <style name="QmlTypeId" foreground="#61afef"/>
  <style name="QmlRootObjectProperty" foreground="#61afef"/>
  <style name="QmlScopeObjectProperty" foreground="#61afef"/>
  <style name="QmlExternalObjectProperty"/>
  <style name="JsScopeVar"/>
  <style name="JsImportVar" foreground="#d19a66"/>
  <style name="JsGlobalVar" foreground="#d19a66"/>
  <style name="QmlStateName" foreground="#61afef"/>
  <style name="Binding" foreground="#c678dd"/>
  <style name="DisabledCode" foreground="#5c6370"/>
  <style name="AddedLine" foreground="#98c379"/>
  <style name="RemovedLine" foreground="#e06c75"/>
  <style name="DiffFile" foreground="#61afef"/>
  <style name="DiffLocation" foreground="#d19a66"/>
  <style name="DiffFileLine" foreground="#000000" background="#e5c07b"/>
  <style name="DiffContextLine" foreground="#000000" background="#56b6c2"/>
  <style name="DiffSourceLine" foreground="#000000" background="#be5046"/>
  <style name="DiffSourceChar" foreground="#000000" background="#e06c75"/>
  <style name="DiffDestLine" foreground="#000000" background="#789353"/>
  <style name="DiffDestChar" foreground="#000000" background="#98c379"/>
  <style name="LogChangeLine" foreground="#e06c75"/>
  <style name="LogAuthorName" foreground="#61afef"/>
  <style name="LogCommitDate" foreground="#98c379"/>
  <style name="LogCommitHash" foreground="#e06c75"/>
  <style name="LogCommitSubject"/>
  <style name="LogDecoration" foreground="#c678dd"/>
  <style name="Warning" underlineColor="#d19a66" underlineStyle="SingleUnderline"/>
  <style name="WarningContext" underlineColor="#d19a66" underlineStyle="DotLine"/>
  <style name="Error" underlineColor="#e06c75" underlineStyle="SingleUnderline"/>
  <style name="ErrorContext" underlineColor="#e06c75" underlineStyle="DotLine"/>
  <style name="Declaration"/>
  <style name="FunctionDefinition"/>
  <style name="OutputArgument" foreground="#00AA55" italic="false"/>
  <style name="LastStyleSentinel"/>
</style-scheme>

请按效果喜好字型取用和修改!!!

  • 12
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值