1 Star 0 Fork 19

Yukizhu001/qt5-qtbase

forked from src-anolis-os/qt5-qtbase 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
QTBUG-92468-fix-qtextedit-cursor-drawn-incorrectly.patch 1.21 KB
一键复制 编辑 原始数据 按行查看 历史
xingwei-liu 提交于 2022-10-13 02:47 . !8 feature: add patchs for DDE
Author: Tang Haixiang <tanghaixiang@uniontech.com>
Date: Tue Apr 20 14:10:57 2021 +0800
Subject: fix Draw the cursor considering the descent is 0
Upstream: https://codereview.qt-project.org/c/qt/qtbase/+/342138
---
Index: qtbase-opensource-src/src/gui/text/qtextlayout.cpp
===================================================================
--- qtbase-opensource-src.orig/src/gui/text/qtextlayout.cpp
+++ qtbase-opensource-src/src/gui/text/qtextlayout.cpp
@@ -1325,13 +1325,13 @@ void QTextLayout::drawCursor(QPainter *p
bool rightToLeft = d->isRightToLeft();
if (itm >= 0) {
const QScriptItem &si = d->layoutData->items.at(itm);
- if (si.ascent > 0)
+ if (si.ascent >= 0)
base = si.ascent;
- if (si.descent > 0)
+ if (si.descent >= 0)
descent = si.descent;
rightToLeft = si.analysis.bidiLevel % 2;
}
- qreal y = position.y() + (sl.y + sl.base() - base).toReal();
+ qreal y = position.y() + (sl.y + sl.base() + sl.descent - base - descent).toReal();
bool toggleAntialiasing = !(p->renderHints() & QPainter::Antialiasing)
&& (p->transform().type() > QTransform::TxTranslate);
if (toggleAntialiasing)
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/zhuzhustu/qt5-qtbase.git
git@gitee.com:zhuzhustu/qt5-qtbase.git
zhuzhustu
qt5-qtbase
qt5-qtbase
a8

搜索帮助