关于Material Theme UI 里的 Material Dark 配色问题 Maven pom.xml 文件内大部分为灰色的问题有佬解决了没?
关于IDEA Material Theme UI的配色问题
- 写回答
- 好问题 0 提建议
- 追加酬金
- 关注问题
- 邀请回答
-
2条回答 默认 最新
- 专家-皆知 2024-03-28 11:26关注
引自免费微信小程序:皆我百晓生
在IntelliJ IDEA (IntelliJ IDEA) Material Theme UI 中,部分主题颜色问题可能涉及以下几个步骤来解决:
-
获取项目模板:
- 打开你的IntelliJ IDEA工程根目录(通常是
C:\Users\yourusername\.IntelliJ IDEA
)。 - 在左侧的视图树中,点击左上角的
Project Structure
(工具栏)图标。 - 在打开的窗口中,选择
Settings
(设置)标签,并在其右侧点击themes
。
- 打开你的IntelliJ IDEA工程根目录(通常是
-
更改主题颜色:
- 在
themes
标签页,找到并选中对应的 Material Dark 主题名称,例如Default
、Material Design Light
或Material Dark Sublime Text
。 - 在
Customize
选项卡中,您可以查看已添加的主题组件和样式列表,找到selectorPrimaryColor
(主色调渐变颜色)或colorPrimaryDark
(深色调渐变颜色)用于配置主色调。
(针对Element Colors) 如果您希望修改元素的颜色,可以使用
element(color)
语法来指定相应的色块。下面是一个示例:val selectorPrimaryColor = pomElement(element(CaseRoot element(), ElementGroupName("primary-color"), "background")) selectorPrimaryColor.color("light grey")
element()
方法接受一个<style>
或<theme>
元素,通过这个元素我们可以指定elementGroup
(元素组),elementName
(元素名),以及对应的颜色属性。在这个例子中,我们创建了一个名为primary-color
的元素组,其中包含两个子元素Background
(背景颜色)和Text
(文本颜色)。(针对CSS Color Theme) 如果您的主题已经定义了自定义的CSS(类选择器)和应用它们到不同的元素上,只需修改相应类的CSS规则即可。
- 确保已经添加了
*
作为元素匹配选择器,如* { /* CSS rules */ }
。 - 检查以下基本属性:
background-color
,color
,text-color
,text-decoration
,font-family
,font-size
,line-height
,letter-spacing
,vertical-align
,padding
,margin
,border-radius
,opacity
.
对于Maven pom.xml 文件,这里是一个简单示例,用于应用Material Dark主题到所有项目元素:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> ... <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.2.2.2.RELEASE</version> </parent> ... <dependencyManagement> <dependencies> <dependency> <groupId>com.google.code.gson</groupId> <artifactId>gson</artifactId> <version>2.9.10</version> </dependency> <!-- Include other dependencies here --> </dependencies> </dependencyManagement> ... <module> <groupId>cn.Lonfy</groupId> <artifactId>lonfy-exercise</artifactId> <version>1.0.0</version> <packaging>pom</packaging> <name>Lonfy Exercise</name> <url>https://github.com/Lonfy/exercise.git</url> <build> <plugins> <!-- Custom theme plugins go here --> <plugin> <groupId>com.github.johnreid-singularforms</groupId> <artifactId>template-project-plugin</artifactId> <version>3.1.1</version> <configuration> <targetProperties> <property name="customizableProperties" value="#{local.properties}" /> </targetProperties> </configuration> <executions> <execution> <goals> <goal>generate-template</goal> </goals> <phase>process-resources</phase> <configuration> <resources> <resource> <directory>src/main/resources</directory> <filtering>true</filtering> <includes> <include>**/*.puml</include> </includes> <excludes> <exclude>**/.puml-comment.*</exclude> </excludes> </resource> </resources> </configuration> </execution> </executions> </plugin> <!-- Include other custom theme plugins here --> <plugin> <groupId>com.github.hubspot.jenkins</groupId> <artifactId>hudson-maven-plugin</artifactId> <version>7.45.2</version> <configuration> <jobs> <job> <id>jetty</id> <type>java-war</type> <mainClass>org.example.ExampleApplication</mainClass> <runOnExit>true</runOnExit> <dockerStrategy>Automated</dockerStrategy> <arguments> <argument>-Dfile.encoding=UTF-8</argument> <argument>${project.basedir}/target/webapp/index.html</argument> </arguments> </job> <node> <id>listener</id> <containerClass>org.example.JettyServerContainer</containerClass> <args> <arg>-jar=target/webapp/${project.build.finalName}.war</arg> <arg>-port=8080</arg> <arg>-connectableThreads=2</arg> </args> </node> <node> <id>logback-appender</id> <containerClass>org.example.LogbackAppenderContainer</containerClass> <args> <arg>-output=logback-{context.name}.out</arg> <arg>-level=info</arg> <arg>-remoteDebuggingEnabled=true</arg> <arg>-formatter=pretty-standard</arg> </args> </node> <node> <id>yaml</id> <containerClass>org.example.YamlAppenderContainer</containerClass> <args> <arg>-format=yaml</arg> <arg>-append>true</arg> <arg>${project.basedir}/target/webapp/build.yaml</arg> </args> </node> <node> <id>db</id> <containerClass>org.example.DbAppenderContainer</containerClass> <args> <arg>-connectionURL=jdbc:mysql://localhost:3306/exampleDatabase?useUnicode=true&characterEncoding=utf-8</arg> <arg>-username=myusername</arg> <arg>-password=mypassword</arg> <arg>-port=3306</arg> <arg>-driver=com.mysql.jdbc.Driver</arg> <arg>-listTables=true</arg> <arg>-autoReconnect=true</arg> <arg>-useSSL=false</arg> </args> </node> <node> <id>file</id> <containerClass>org.example.FileAppenderContainer</containerClass> <args> <arg>-append>true</arg> <arg>${project.basedir}/target/webapp/logs/*</arg> <arg>-appendLogToConsole=true</arg> <arg>-maxFileSizeBytes=1GB</arg> <arg>-clientLogLevelName=ERROR</arg> </args> </node> </jobs> </configuration> </plugin> ... <!-- Other custom theme plugins here --> </plugins> </configuration> </build> </module> ... <dependencyManagement> <dependencies> <!-- Add additional dependencies as needed --> </dependencies> </dependencyManagement> ... <build> ... ... ... ... <testResources> <testResource> <directory>src/test/resources</directory> <filtering>true</filtering> <includes> <include>**/*.json</include> </includes> </testResource> </testResources> </build> ... ... ... ... ... <profiles> <profile> <id>dev</id> <activation> <activeByDefault>true</activeByDefault> </activation> <build> <plugins> <!-- Disable any build warnings and errors during development --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-eclipse-plugin</artifactId> <version>3.20.0</version> <configuration> <additionalConfig> <key>compiler.compatibilityLevel</key> <value>1.8</value> </additionalConfig> </configuration> </plugin> </plugins> </build> </profile> <!-- Add additional profiles as needed --> </profiles> ... ... ... ... ... ... ... <!-- Other relevant build configuration --> <!-- Save your customizations in a `.project` file --> <settings> ... ... ... ... <global
- 在
解决评论 打赏 举报 编辑记录无用 1 -
悬赏问题
- ¥30 关于用python写支付宝扫码付异步通知收不到的问题
- ¥50 vue组件中无法正确接收并处理axios请求
- ¥15 隐藏系统界面pdf的打印、下载按钮
- ¥15 MATLAB联合adams仿真卡死如何解决(代码模型无问题)
- ¥15 基于pso参数优化的LightGBM分类模型
- ¥15 安装Paddleocr时报错无法解决
- ¥15 python中transformers可以正常下载,但是没有办法使用pipeline
- ¥50 分布式追踪trace异常问题
- ¥15 人在外地出差,速帮一点点
- ¥15 如何使用canvas在图片上进行如下的标注,以下代码不起作用,如何修改