1 Star 0 Fork 18

xingwei-liu/qt5-qtbase

forked from src-anolis-os/qt5-qtbase 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
fix_qstylesheetstyle_clip_border_error.patch 1.45 KB
一键复制 编辑 原始数据 按行查看 历史
xingwei-liu 提交于 2022-10-12 16:54 . feature: add patchs for DDE
From 78a4962728faf41a13e4575187b46afc5c63cd80 Mon Sep 17 00:00:00 2001
From: Iceyer Lee <iceyers@gmail.com>
Date: Fri, 26 Jan 2018 16:25:02 +0800
Subject: [PATCH] Fix qstylesheetstyle clip border error
The left border path clip error when border size is odd.
That because borderClip calc path with border with divide 2.
It should be 2.0 that make result to accurately real number.
Change-Id: Iabef104efbe65e738884e72f4a7122724d76303c
---
src/widgets/styles/qstylesheetstyle.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/widgets/styles/qstylesheetstyle.cpp b/src/widgets/styles/qstylesheetstyle.cpp
index 9ce1a04..4235755 100644
--- a/src/widgets/styles/qstylesheetstyle.cpp
+++ b/src/widgets/styles/qstylesheetstyle.cpp
@@ -1299,11 +1299,11 @@ QPainterPath QRenderRule::borderClip(QRect r)
path.lineTo(rect.x() + blr.width(), curY);
curX = rect.left() + borders[LeftEdge]/2.0;
- path.arcTo(curX, rect.bottom() - 2*blr.height() + borders[BottomEdge]/2,
+ path.arcTo(curX, rect.bottom() - 2*blr.height() + borders[BottomEdge]/2.0,
blr.width()*2 - borders[LeftEdge], blr.height()*2 - borders[BottomEdge], 270, -90);
path.lineTo(curX, rect.top() + tlr.height());
- path.arcTo(curX, rect.top() + borders[TopEdge]/2,
+ path.arcTo(curX, rect.top() + borders[TopEdge]/2.0,
tlr.width()*2 - borders[LeftEdge], tlr.height()*2 - borders[TopEdge], 180, -90);
path.closeSubpath();
--
2.7.4
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/xingwei-liu/qt5-qtbase.git
git@gitee.com:xingwei-liu/qt5-qtbase.git
xingwei-liu
qt5-qtbase
qt5-qtbase
a8

搜索帮助

0d507c66 1850385 C8b1a773 1850385