如何更改MySQL Workbench设置,使其使用深色主题?
MySQL Workbench 8.0更新
根据冈瑟的回答,似乎在code_editor.xml
他们计划在未来的某个时候启用黑暗模式。曾经的前色现在分为前色-浅色和前
色-深色
。背景色
也是如此。
以下是基于 elMestre 慷慨提供的 Monokai 颜色获得深色编辑器(不是整个应用程序主题)的方法:
<!--
dark-gray: #282828;
brown-gray: #49483E;
gray: #888888;
light-gray: #CCCCCC;
ghost-white: #F8F8F0;
light-ghost-white: #F8F8F2;
yellow: #E6DB74;
blue: #66D9EF;
pink: #F92672;
purple: #AE81FF;
brown: #75715E;
orange: #FD971F;
light-orange: #FFD569;
green: #A6E22E;
sea-green: #529B2F;
-->
<style id="32" fore-color-light="#DDDDDD" back-color-light="#282828" fore-color-dark="#DDDDDD" back-color-dark="#282828" bold="No" /> <!-- STYLE_DEFAULT !BACKGROUND! -->
<style id="33" fore-color-light="#DDDDDD" back-color-light="#282828" fore-color-dark="#DDDDDD" back-color-dark="#282828" bold="No" /> <!-- STYLE_LINENUMBER -->
<style id= "0" fore-color-light="#DDDDDD" back-color-light="#282828" fore-color-dark="#DDDDDD" back-color-dark="#282828" bold="No" /> <!-- SCE_MYSQL_DEFAULT -->
<style id= "1" fore-color-light="#999999" back-color-light="#282828" fore-color-dark="#999999" back-color-dark="#282828" bold="No" /> <!-- SCE_MYSQL_COMMENT -->
<style id= "2" fore-color-light="#999999" back-color-light="#282828" fore-color-dark="#999999" back-color-dark="#282828" bold="No" /> <!-- SCE_MYSQL_COMMENTLINE -->
<style id= "3" fore-color-light="#DDDDDD" back-color-light="#282828" fore-color-dark="#DDDDDD" back-color-dark="#282828" bold="No" /> <!-- SCE_MYSQL_VARIABLE -->
<style id= "4" fore-color-light="#66D9EF" back-color-light="#282828" fore-color-dark="#66D9EF" back-color-dark="#282828" bold="No" /> <!-- SCE_MYSQL_SYSTEMVARIABLE -->
<style id= "5" fore-color-light="#66D9EF" back-color-light="#282828" fore-color-dark="#66D9EF" back-color-dark="#282828" bold="No" /> <!-- SCE_MYSQL_KNOWNSYSTEMVARIABLE -->
<style id= "6" fore-color-light="#AE81FF" back-color-light="#282828" fore-color-dark="#AE81FF" back-color-dark="#282828" bold="No" /> <!-- SCE_MYSQL_NUMBER -->
<style id= "7" fore-color-light="#F92672" back-color-light="#282828" fore-color-dark="#F92672" back-color-dark="#282828" bold="No" /> <!-- SCE_MYSQL_MAJORKEYWORD -->
<style id= "8" fore-color-light="#F92672" back-color-light="#282828" fore-color-dark="#F92672" back-color-dark="#282828" bold="No" /> <!-- SCE_MYSQL_KEYWORD -->
<style id= "9" fore-color-light="#9B859D" back-color-light="#282828" fore-color-dark="#9B859D" back-color-dark="#282828" bold="No" /> <!-- SCE_MYSQL_DATABASEOBJECT -->
<style id="10" fore-color-light="#DDDDDD" back-color-light="#282828" fore-color-dark="#DDDDDD" back-color-dark="#282828" bold="No" /> <!-- SCE_MYSQL_PROCEDUREKEYWORD -->
<style id="11" fore-color-light="#E6DB74" back-color-light="#282828" fore-color-dark="#E6DB74" back-color-dark="#282828" bold="No" /> <!-- SCE_MYSQL_STRING -->
<style id="12" fore-color-light="#E6DB74" back-color-light="#282828" fore-color-dark="#E6DB74" back-color-dark="#282828" bold="No" /> <!-- SCE_MYSQL_SQSTRING -->
<style id="13" fore-color-light="#E6DB74" back-color-light="#282828" fore-color-dark="#E6DB74" back-color-dark="#282828" bold="No" /> <!-- SCE_MYSQL_DQSTRING -->
<style id="14" fore-color-light="#F92672" back-color-light="#282828" fore-color-dark="#F92672" back-color-dark="#282828" bold="No" /> <!-- SCE_MYSQL_OPERATOR -->
<style id="15" fore-color-light="#9B859D" back-color-light="#282828" fore-color-dark="#9B859D" back-color-dark="#282828" bold="No" /> <!-- SCE_MYSQL_FUNCTION -->
<style id="16" fore-color-light="#DDDDDD" back-color-light="#282828" fore-color-dark="#DDDDDD" back-color-dark="#282828" bold="No" /> <!-- SCE_MYSQL_IDENTIFIER -->
<style id="17" fore-color-light="#E6DB74" back-color-light="#282828" fore-color-dark="#E6DB74" back-color-dark="#282828" bold="No" /> <!-- SCE_MYSQL_QUOTEDIDENTIFIER -->
<style id="18" fore-color-light="#529B2F" back-color-light="#282828" fore-color-dark="#529B2F" back-color-dark="#282828" bold="No" /> <!-- SCE_MYSQL_USER1 -->
<style id="19" fore-color-light="#529B2F" back-color-light="#282828" fore-color-dark="#529B2F" back-color-dark="#282828" bold="No" /> <!-- SCE_MYSQL_USER2 -->
<style id="20" fore-color-light="#529B2F" back-color-light="#282828" fore-color-dark="#529B2F" back-color-dark="#282828" bold="No" /> <!-- SCE_MYSQL_USER3 -->
<style id="21" fore-color-light="#66D9EF" back-color-light="#49483E" fore-color-dark="#66D9EF" back-color-dark="#49483E" bold="No" /> <!-- SCE_MYSQL_HIDDENCOMMAND -->
<style id="22" fore-color-light="#909090" back-color-light="#49483E" fore-color-dark="#909090" back-color-dark="#49483E" bold="No" /> <!-- SCE_MYSQL_PLACEHOLDER -->
<!-- All styles again in their variant in a hidden command -->
<style id="65" fore-color-light="#999999" back-color-light="#49483E" fore-color-dark="#999999" back-color-dark="#49483E" bold="No" /> <!-- SCE_MYSQL_COMMENT -->
<style id="66" fore-color-light="#999999" back-color-light="#49483E" fore-color-dark="#999999" back-color-dark="#49483E" bold="No" /> <!-- SCE_MYSQL_COMMENTLINE -->
<style id="67" fore-color-light="#DDDDDD" back-color-light="#49483E" fore-color-dark="#DDDDDD" back-color-dark="#49483E" bold="No" /> <!-- SCE_MYSQL_VARIABLE -->
<style id="68" fore-color-light="#66D9EF" back-color-light="#49483E" fore-color-dark="#66D9EF" back-color-dark="#49483E" bold="No" /> <!-- SCE_MYSQL_SYSTEMVARIABLE -->
<style id="69" fore-color-light="#66D9EF" back-color-light="#49483E" fore-color-dark="#66D9EF" back-color-dark="#49483E" bold="No" /> <!-- SCE_MYSQL_KNOWNSYSTEMVARIABLE -->
<style id="70" fore-color-light="#AE81FF" back-color-light="#49483E" fore-color-dark="#AE81FF" back-color-dark="#49483E" bold="No" /> <!-- SCE_MYSQL_NUMBER -->
<style id="71" fore-color-light="#F92672" back-color-light="#49483E" fore-color-dark="#F92672" back-color-dark="#49483E" bold="No" /> <!-- SCE_MYSQL_MAJORKEYWORD -->
<style id="72" fore-color-light="#F92672" back-color-light="#49483E" fore-color-dark="#F92672" back-color-dark="#49483E" bold="No" /> <!-- SCE_MYSQL_KEYWORD -->
<style id="73" fore-color-light="#9B859D" back-color-light="#49483E" fore-color-dark="#9B859D" back-color-dark="#49483E" bold="No" /> <!-- SCE_MYSQL_DATABASEOBJECT -->
<style id="74" fore-color-light="#DDDDDD" back-color-light="#49483E" fore-color-dark="#DDDDDD" back-color-dark="#49483E" bold="No" /> <!-- SCE_MYSQL_PROCEDUREKEYWORD -->
<style id="75" fore-color-light="#E6DB74" back-color-light="#49483E" fore-color-dark="#E6DB74" back-color-dark="#49483E" bold="No" /> <!-- SCE_MYSQL_STRING -->
<style id="76" fore-color-light="#E6DB74" back-color-light="#49483E" fore-color-dark="#E6DB74" back-color-dark="#49483E" bold="No" /> <!-- SCE_MYSQL_SQSTRING -->
<style id="77" fore-color-light="#E6DB74" back-color-light="#49483E" fore-color-dark="#E6DB74" back-color-dark="#49483E" bold="No" /> <!-- SCE_MYSQL_DQSTRING -->
<style id="78" fore-color-light="#F92672" back-color-light="#49483E" fore-color-dark="#F92672" back-color-dark="#49483E" bold="No" /> <!-- SCE_MYSQL_OPERATOR -->
<style id="79" fore-color-light="#9B859D" back-color-light="#49483E" fore-color-dark="#9B859D" back-color-dark="#49483E" bold="No" /> <!-- SCE_MYSQL_FUNCTION -->
<style id="80" fore-color-light="#DDDDDD" back-color-light="#49483E" fore-color-dark="#DDDDDD" back-color-dark="#49483E" bold="No" /> <!-- SCE_MYSQL_IDENTIFIER -->
<style id="81" fore-color-light="#E6DB74" back-color-light="#49483E" fore-color-dark="#E6DB74" back-color-dark="#49483E" bold="No" /> <!-- SCE_MYSQL_QUOTEDIDENTIFIER -->
<style id="82" fore-color-light="#529B2F" back-color-light="#49483E" fore-color-dark="#529B2F" back-color-dark="#49483E" bold="No" /> <!-- SCE_MYSQL_USER1 -->
<style id="83" fore-color-light="#529B2F" back-color-light="#49483E" fore-color-dark="#529B2F" back-color-dark="#49483E" bold="No" /> <!-- SCE_MYSQL_USER2 -->
<style id="84" fore-color-light="#529B2F" back-color-light="#49483E" fore-color-dark="#529B2F" back-color-dark="#49483E" bold="No" /> <!-- SCE_MYSQL_USER3 -->
<style id="85" fore-color-light="#66D9EF" back-color-light="#888888" fore-color-dark="#66D9EF" back-color-dark="#888888" bold="No" /> <!-- SCE_MYSQL_HIDDENCOMMAND -->
<style id="86" fore-color-light="#AAAAAA" back-color-light="#888888" fore-color-dark="#AAAAAA" back-color-dark="#888888" bold="No" /> <!-- SCE_MYSQL_PLACEHOLDER -->
请记住将所有这些样式粘贴到
您可以在终端/控制台上使用default - run below命令禁用MySQL WorkBench黑暗模式。
defaults write com.oracle.workbench.MySQLWorkbench NSRequiresAquaSystemAppearance -bool yes
以下是更改MySQL Workbench颜色(包括背景颜色)的方法。
打开位于MySQL Workbench安装目录(通常为< code > C:\ Program Files \ MySQL \ MySQL work bench 6.3 CE \ data )的data文件夹中名为< code>code_editor.xml的XML文件。在这里,您会发现不同代码元素的许多样式,但也有一些缺失。
MySQL Workbench使用scintilla作为代码编辑器,scintilla定义了可以在code_editor.xml
文件中使用的更多样式。用于背景颜色的是样式 ID 32。
以下是MySQL的完整列表(scintilla具有多种语言的数千种样式)和我的配置:
<style id= "0" fore-color="#DDDDDD" back-color="#2A2A2A" bold="No" /> <!-- SCE_MYSQL_DEFAULT -->
<style id= "1" fore-color="#999999" back-color="#2A2A2A" bold="No" /> <!-- SCE_MYSQL_COMMENT -->
<style id= "2" fore-color="#999999" back-color="#2A2A2A" bold="No" /> <!-- SCE_MYSQL_COMMENTLINE -->
<style id= "3" fore-color="#DDDDDD" back-color="#2A2A2A" bold="No" /> <!-- SCE_MYSQL_VARIABLE -->
<style id= "4" fore-color="#9B859D" back-color="#2A2A2A" bold="No" /> <!-- SCE_MYSQL_SYSTEMVARIABLE -->
<style id= "5" fore-color="#9B859D" back-color="#2A2A2A" bold="No" /> <!-- SCE_MYSQL_KNOWNSYSTEMVARIABLE -->
<style id= "6" fore-color="#FF8080" back-color="#2A2A2A" bold="No" /> <!-- SCE_MYSQL_NUMBER -->
<style id= "7" fore-color="#7AAAD7" back-color="#2A2A2A" bold="No" /> <!-- SCE_MYSQL_MAJORKEYWORD -->
<style id= "8" fore-color="#7AAAD7" back-color="#2A2A2A" bold="No" /> <!-- SCE_MYSQL_KEYWORD -->
<style id= "9" fore-color="#9B859D" back-color="#2A2A2A" bold="No" /> <!-- SCE_MYSQL_DATABASEOBJECT -->
<style id="10" fore-color="#DDDDDD" back-color="#2A2A2A" bold="No" /> <!-- SCE_MYSQL_PROCEDUREKEYWORD -->
<style id="11" fore-color="#B9CB89" back-color="#2A2A2A" bold="No" /> <!-- SCE_MYSQL_STRING -->
<style id="12" fore-color="#B9CB89" back-color="#2A2A2A" bold="No" /> <!-- SCE_MYSQL_SQSTRING -->
<style id="13" fore-color="#B9CB89" back-color="#2A2A2A" bold="No" /> <!-- SCE_MYSQL_DQSTRING -->
<style id="14" fore-color="#FFBB80" back-color="#2A2A2A" bold="No" /> <!-- SCE_MYSQL_OPERATOR -->
<style id="15" fore-color="#9B859D" back-color="#2A2A2A" bold="No" /> <!-- SCE_MYSQL_FUNCTION -->
<style id="16" fore-color="#DDDDDD" back-color="#2A2A2A" bold="No" /> <!-- SCE_MYSQL_IDENTIFIER -->
<style id="17" fore-color="#B9CB89" back-color="#2A2A2A" bold="No" /> <!-- SCE_MYSQL_QUOTEDIDENTIFIER -->
<style id="18" fore-color="#B9CB89" back-color="#2A2A2A" bold="No" /> <!-- SCE_MYSQL_USER1 -->
<style id="19" fore-color="#B9CB89" back-color="#2A2A2A" bold="No" /> <!-- SCE_MYSQL_USER2 -->
<style id="20" fore-color="#B9CB89" back-color="#2A2A2A" bold="No" /> <!-- SCE_MYSQL_USER3 -->
<style id="21" fore-color="#FFBB80" back-color="#707070" bold="No" /> <!-- SCE_MYSQL_HIDDENCOMMAND -->
<style id="22" fore-color="#909090" back-color="#707070" bold="No" /> <!-- SCE_MYSQL_PLACEHOLDER -->
<!-- These two are for scintilla globally. -->
<style id="32" fore-color="#DDDDDD" back-color="#2A2A2A" bold="No" /> <!-- STYLE_DEFAULT THIS IS THE ONE FOR THE BACKGROUND!!!!! -->
<style id="33" fore-color="#2A2A2A" back-color="#DDDDDD" bold="No" /> <!-- STYLE_LINENUMBER -->
<!-- All styles again in their variant in a hidden command (with a 0x40 offset). -->
<style id="65" fore-color="#999999" back-color="#707070" bold="No" /> <!-- SCE_MYSQL_COMMENT -->
<style id="66" fore-color="#999999" back-color="#707070" bold="No" /> <!-- SCE_MYSQL_COMMENTLINE -->
<style id="67" fore-color="#DDDDDD" back-color="#707070" bold="No" /> <!-- SCE_MYSQL_VARIABLE -->
<style id="68" fore-color="#9B859D" back-color="#707070" bold="No" /> <!-- SCE_MYSQL_SYSTEMVARIABLE -->
<style id="69" fore-color="#9B859D" back-color="#707070" bold="No" /> <!-- SCE_MYSQL_KNOWNSYSTEMVARIABLE -->
<style id="70" fore-color="#FF8080" back-color="#707070" bold="No" /> <!-- SCE_MYSQL_NUMBER -->
<style id="71" fore-color="#7AAAD7" back-color="#707070" bold="No" /> <!-- SCE_MYSQL_MAJORKEYWORD -->
<style id="72" fore-color="#7AAAD7" back-color="#707070" bold="No" /> <!-- SCE_MYSQL_KEYWORD -->
<style id="73" fore-color="#9B859D" back-color="#707070" bold="No" /> <!-- SCE_MYSQL_DATABASEOBJECT -->
<style id="74" fore-color="#DDDDDD" back-color="#707070" bold="No" /> <!-- SCE_MYSQL_PROCEDUREKEYWORD -->
<style id="75" fore-color="#B9CB89" back-color="#707070" bold="No" /> <!-- SCE_MYSQL_STRING -->
<style id="76" fore-color="#B9CB89" back-color="#707070" bold="No" /> <!-- SCE_MYSQL_SQSTRING -->
<style id="77" fore-color="#B9CB89" back-color="#707070" bold="No" /> <!-- SCE_MYSQL_DQSTRING -->
<style id="78" fore-color="#FFBB80" back-color="#707070" bold="No" /> <!-- SCE_MYSQL_OPERATOR -->
<style id="79" fore-color="#9B859D" back-color="#707070" bold="No" /> <!-- SCE_MYSQL_FUNCTION -->
<style id="80" fore-color="#DDDDDD" back-color="#707070" bold="No" /> <!-- SCE_MYSQL_IDENTIFIER -->
<style id="81" fore-color="#B9CB89" back-color="#707070" bold="No" /> <!-- SCE_MYSQL_QUOTEDIDENTIFIER -->
<style id="82" fore-color="#B9CB89" back-color="#707070" bold="No" /> <!-- SCE_MYSQL_USER1 -->
<style id="83" fore-color="#B9CB89" back-color="#707070" bold="No" /> <!-- SCE_MYSQL_USER2 -->
<style id="84" fore-color="#B9CB89" back-color="#707070" bold="No" /> <!-- SCE_MYSQL_USER3 -->
<style id="85" fore-color="#FFBB80" back-color="#909090" bold="No" /> <!-- SCE_MYSQL_HIDDENCOMMAND -->
<style id="86" fore-color="#AAAAAA" back-color="#909090" bold="No" /> <!-- SCE_MYSQL_PLACEHOLDER -->
我在Windows8.1上为C/C++开发人员提供了Eclipse IDE。我从市场上安装了Darkest Dark主题,但它不起作用。在重新启动时,Eclipse以我以前的主题开始,而Darkest Dark甚至不会出现在Preferences窗口中。然而,当我再次打开Marketplace并搜索它时,它显示为已安装。我找了找,但没有找到这个确切问题的答案。有人帮忙吗?
我从eclipse.org下载了。并且我更改了上的主题。但这不是我想要的。 我如何做完全黑暗?
我们的应用程序依赖于让我们从和中拾取明暗主题颜色 但是每次我们尝试使用时,它都会从重置UiMode开始,我们的应用程序会混淆为我们的主题选择哪些颜色值 有些人在这里和这里详细讨论了这个问题 有人遇到类似的问题吗?
从Android10开始,你可以在黑暗模式和默认灯光模式之间切换。我还没有做任何更深入的研究,因为这是一个新的话题。暗模式的颜色切换是由操作系统自动的,还是有任何方法告诉我的应用程序切换不同的应用程序主题,如果暗模式是打开的?此外,黑暗模式也可能出现在一些Android 9设备上。 因为我使用自定义参数创建了自定义深色主题,并在资源中为每种颜色设置了深色(在中使用自定义属性,并在的主题中为它们应用
我会尽量详细解释“请帮忙。我打开了一个新项目。在新项目中,“主题”部分打开了两次“一亮一暗”。我在应用程序中添加了黑色文字。文字看起来是白色的,因为我的手机是黑色主题。这很好,但令人费解。我只有一种颜色。xml文件(不适用于夜间版本)文本是如何变为白色的?这很好,但我添加的图标(矢量“xml”)并将其设置为灰色,但现在它无法理解。图标的颜色在黑暗中从灰色变为黑色。我想让他换成白人。我还打开了颜色。