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

fix: [fontcolorwidget] Fix font selection and display issues #1009

Merged
merged 1 commit into from
Dec 3, 2024

Conversation

Kakueeen
Copy link
Contributor

@Kakueeen Kakueeen commented Dec 2, 2024

Fixed font selection and display issues in FontColorWidget by:

  • Making font combo box non-editable to prevent invalid font selections
  • Using currentText() instead of currentFont().family() for more reliable
    font name retrieval
  • Ensuring consistent font name handling across the widget

The changes improve font selection reliability and prevent potential
issues with font family name mismatches.

Log: Fix font selection and display issues in FontColorWidget

Fixed font selection and display issues in FontColorWidget by:
- Making font combo box non-editable to prevent invalid font selections
- Using currentText() instead of currentFont().family() for more reliable
font name retrieval
- Ensuring consistent font name handling across the widget

The changes improve font selection reliability and prevent potential
issues with font family name mismatches.

Log: Fix font selection and display issues in FontColorWidget
@deepin-ci-robot
Copy link

deepin pr auto review

关键摘要:

  • pointSizesForSelectedFont函数中,使用fontComboBox->currentText()代替fontComboBox->currentFont().family()可能会导致问题,因为currentText()返回的是用户输入的文本,而currentFont().family()返回的是当前选中的字体家族名称。这可能会导致QFontDatabase::pointSizes函数无法正确获取字体大小列表。
  • setUserConfiggetUserConfig函数中,使用currentText()代替currentFont().family()可能会导致配置保存和加载时出现不一致,因为用户输入的文本可能不一定是有效的字体家族名称。

是否建议立即修改:

@deepin-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Kakueeen, LiHua000
Once this PR has been reviewed and has the lgtm label, please assign eric2023 for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@deepin-mozart deepin-mozart merged commit c0f3f6c into linuxdeepin:master Dec 3, 2024
9 of 10 checks passed
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.

4 participants