4 Star 0 Fork 4

src-openEuler/kiran-qt5-integration

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0019-fix-QCompleter-Adjust-the-height-of-the-QCompleter-P.patch 1.97 KB
一键复制 编辑 原始数据 按行查看 历史
From 72166cc21f423f9c7a93f4773080dced6bfa8564 Mon Sep 17 00:00:00 2001
From: liuxinhao <liuxinhao@kylinsec.com.cn>
Date: Tue, 24 Sep 2024 14:54:44 +0800
Subject: [PATCH] fix(QCompleter): Adjust the height of the QCompleter Popup
pop-up
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- 针对QCompleter Popup弹出的高度进行调整
Closes #42329
---
style/src/style.cpp | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/style/src/style.cpp b/style/src/style.cpp
index 6fba993..000fe11 100644
--- a/style/src/style.cpp
+++ b/style/src/style.cpp
@@ -170,6 +170,8 @@ int Style::pixelMetric(QStyle::PixelMetric metric, const QStyleOption *option, c
switch (metric)
{
case PM_DefaultFrameWidth:
+ if (qobject_cast<const QAbstractScrollArea *>(widget))
+ return 2;
return 6;
case PM_SpinBoxFrameWidth:
return 2;
@@ -182,7 +184,6 @@ int Style::pixelMetric(QStyle::PixelMetric metric, const QStyleOption *option, c
case PM_FocusFrameVMargin:
case PM_FocusFrameHMargin:
return 2;
-
// 布局默认边距
case PM_LayoutLeftMargin:
case PM_LayoutTopMargin:
@@ -199,7 +200,7 @@ int Style::pixelMetric(QStyle::PixelMetric metric, const QStyleOption *option, c
return 6;
}
}
-
+
// 布局默认间距
case PM_LayoutHorizontalSpacing:
case PM_LayoutVerticalSpacing:
@@ -268,7 +269,6 @@ int Style::pixelMetric(QStyle::PixelMetric metric, const QStyleOption *option, c
case PM_TabCloseIndicatorWidth:
case PM_TabCloseIndicatorHeight:
return pixelMetric(PM_SmallIconSize, option, widget);
-
// scrollbars
case PM_ScrollBarExtent:
return 5;
@@ -317,7 +317,6 @@ int Style::pixelMetric(QStyle::PixelMetric metric, const QStyleOption *option, c
return 1;
case PM_DockWidgetSeparatorExtent:
return 1;
-
default: // fallback
break;
}
--
2.27.0
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-openeuler/kiran-qt5-integration.git
git@gitee.com:src-openeuler/kiran-qt5-integration.git
src-openeuler
kiran-qt5-integration
kiran-qt5-integration
master

搜索帮助