Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
k54kdk
PyQt Fluent Widgets
提交
73b9931f
P
PyQt Fluent Widgets
项目概览
k54kdk
/
PyQt Fluent Widgets
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
PyQt Fluent Widgets
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
73b9931f
编写于
8月 05, 2023
作者:
之一Yo
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
调整富文本框底部边框样式 (#252)
上级
d28ab871
变更
4
展开全部
隐藏空白更改
内联
并排
Showing
4 changed file
with
76014 addition
and
75919 deletion
+76014
-75919
qfluentwidgets/_rc/qss/dark/line_edit.qss
qfluentwidgets/_rc/qss/dark/line_edit.qss
+1
-1
qfluentwidgets/_rc/qss/light/line_edit.qss
qfluentwidgets/_rc/qss/light/line_edit.qss
+1
-1
qfluentwidgets/_rc/resource.py
qfluentwidgets/_rc/resource.py
+75975
-75916
qfluentwidgets/components/widgets/line_edit.py
qfluentwidgets/components/widgets/line_edit.py
+37
-1
未找到文件。
qfluentwidgets/_rc/qss/dark/line_edit.qss
浏览文件 @
73b9931f
...
...
@@ -11,7 +11,7 @@ LineEdit, TextEdit, PlainTextEdit {
}
TextEdit, PlainTextEdit {
padding:
0px 0px 0px 10
px;
padding:
2px 3px 2px 8
px;
}
LineEdit:hover, TextEdit:hover, PlainTextEdit:hover {
...
...
qfluentwidgets/_rc/qss/light/line_edit.qss
浏览文件 @
73b9931f
...
...
@@ -11,7 +11,7 @@ LineEdit, TextEdit, PlainTextEdit {
TextEdit,
PlainTextEdit {
padding:
0px 0px 0px 10
px;
padding:
2px 3px 2px 8
px;
}
LineEdit:hover, TextEdit:hover, PlainTextEdit:hover {
...
...
qfluentwidgets/_rc/resource.py
浏览文件 @
73b9931f
此差异已折叠。
点击以展开。
qfluentwidgets/components/widgets/line_edit.py
浏览文件 @
73b9931f
...
...
@@ -3,7 +3,7 @@ from typing import List, Union
from
PyQt5.QtCore
import
QSize
,
Qt
,
QRectF
,
pyqtSignal
,
QPoint
,
QTimer
,
QEvent
,
QAbstractItemModel
from
PyQt5.QtGui
import
QPainter
,
QPainterPath
,
QIcon
,
QCursor
from
PyQt5.QtWidgets
import
(
QApplication
,
QAction
,
QHBoxLayout
,
QLineEdit
,
QToolButton
,
QTextEdit
,
QPlainTextEdit
,
QCompleter
,
QStyle
)
QPlainTextEdit
,
QCompleter
,
QStyle
,
QWidget
)
from
...common.style_sheet
import
FluentStyleSheet
,
themeColor
...
...
@@ -287,11 +287,46 @@ class SearchLineEdit(LineEdit):
self
.
setTextMargins
(
0
,
0
,
28
*
enable
+
30
,
0
)
class
EditLayer
(
QWidget
):
""" Edit layer """
def
__init__
(
self
,
parent
):
super
().
__init__
(
parent
=
parent
)
self
.
setAttribute
(
Qt
.
WA_TransparentForMouseEvents
)
parent
.
installEventFilter
(
self
)
def
eventFilter
(
self
,
obj
,
e
):
if
obj
is
self
.
parent
()
and
e
.
type
()
==
QEvent
.
Resize
:
self
.
resize
(
e
.
size
())
return
super
().
eventFilter
(
obj
,
e
)
def
paintEvent
(
self
,
e
):
if
not
self
.
parent
().
hasFocus
():
return
painter
=
QPainter
(
self
)
painter
.
setRenderHints
(
QPainter
.
Antialiasing
)
painter
.
setPen
(
Qt
.
NoPen
)
m
=
self
.
contentsMargins
()
path
=
QPainterPath
()
w
,
h
=
self
.
width
()
-
m
.
left
()
-
m
.
right
(),
self
.
height
()
path
.
addRoundedRect
(
QRectF
(
m
.
left
(),
h
-
10
,
w
,
10
),
5
,
5
)
rectPath
=
QPainterPath
()
rectPath
.
addRect
(
m
.
left
(),
h
-
10
,
w
,
7.5
)
path
=
path
.
subtracted
(
rectPath
)
painter
.
fillPath
(
path
,
themeColor
())
class
TextEdit
(
QTextEdit
):
""" Text edit """
def
__init__
(
self
,
parent
=
None
):
super
().
__init__
(
parent
=
parent
)
self
.
layer
=
EditLayer
(
self
)
self
.
scrollDelegate
=
SmoothScrollDelegate
(
self
)
FluentStyleSheet
.
LINE_EDIT
.
apply
(
self
)
setFont
(
self
)
...
...
@@ -306,6 +341,7 @@ class PlainTextEdit(QPlainTextEdit):
def
__init__
(
self
,
parent
=
None
):
super
().
__init__
(
parent
=
parent
)
self
.
layer
=
EditLayer
(
self
)
self
.
scrollDelegate
=
SmoothScrollDelegate
(
self
)
FluentStyleSheet
.
LINE_EDIT
.
apply
(
self
)
setFont
(
self
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录