Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XML中的Font节点添加id属性,支持font自定义,同时兼容过去的索引方式 #42

Merged
merged 3 commits into from
Jun 12, 2019

Conversation

smallevilbeast
Copy link
Contributor

@smallevilbeast smallevilbeast commented Jun 9, 2019

使用例子, 如果设置了ID,就不能使用索引了
Global.xml:

<!--0-->
<Font name="system" size="12"/>
<!--1-->
<Font id="system_size_12" name="system" size="12"/>
<!--2-->
<Font name="system" size="14"/>
<!--3-->
<Font id="system_size_16" name="system" size="16"/>
<!--4-->
<Font name="system" size="18"/>
<!--5-->
<Font id="system_bold_size_10" name="system" size="10" bold="true"/>

使用:

<Label font="0" text="这是使用索引方式设置字体"/>
<Label font="system_bold_size_10" text="这是使用ID设置字体"/>

@nmgwddj
Copy link
Collaborator

nmgwddj commented Jun 10, 2019

感谢您的贡献,我会拉取您仓库中的代码进行验证,如无其他异常将合并这个 PR,再次感谢您的提交。

@nmgwddj
Copy link
Collaborator

nmgwddj commented Jun 11, 2019

@lovesnow 我拉取了这个 commit,带有 RichEdit 的项目编译后无法成功运行,烦请检查一下构造 RichEdit 时的初始化成员列表。

@smallevilbeast
Copy link
Contributor Author

@nmgwddj 是初始错了 我重新提一个PR? 还是提一个增量的PR

@smallevilbeast
Copy link
Contributor Author

smallevilbeast commented Jun 11, 2019

Global.xml中第一个Font值改成了12, 我看你之前把Label字体默认用了第二个 ,我的方式是 第一个字体为默认字体 这样也好理解

XML文件我已经全部使用新的Class方式和新的Font方式修改过了,字体还是增加了default属性

@smallevilbeast
Copy link
Contributor Author

@nmgwddj 老大,你再拉下试试,所有的demo我这边都测试通过了

Copy link
Collaborator

@nmgwddj nmgwddj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

功能测试通过,需要改动有以下几点。
1、global.xml 中有一些单引号未完全反转义
2、progress 通用样式中包含 value 属性,导致整条记录都不生效
3、历史使用索引方式引用字体配置方式已经不能生效

@nmgwddj nmgwddj merged commit 8183d81 into netease-im:development Jun 12, 2019
@shuilan0066
Copy link

不兼容过去索引方式了么? 怎么提示找不到

QWarGod pushed a commit to QWarGod/NIM_Duilib_Framework that referenced this pull request Jun 18, 2021
XML中的Font节点添加id属性,支持font自定义,同时兼容过去的索引方式
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants