Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
k54kdk
PyQt Fluent Widgets
提交
874e2edd
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看板
提交
874e2edd
编写于
5月 10, 2023
作者:
之一Yo
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
添加单向滚动区域示例
上级
5fed9e02
变更
9
展开全部
隐藏空白更改
内联
并排
Showing
9 changed file
with
214264 addition
and
207545 deletion
+214264
-207545
examples/gallery/app/common/resource.py
examples/gallery/app/common/resource.py
+214216
-207534
examples/gallery/app/resource/i18n/gallery.zh_CN.qm
examples/gallery/app/resource/i18n/gallery.zh_CN.qm
+0
-0
examples/gallery/app/resource/i18n/gallery.zh_CN.ts
examples/gallery/app/resource/i18n/gallery.zh_CN.ts
+10
-0
examples/gallery/app/resource/i18n/gallery.zh_HK.qm
examples/gallery/app/resource/i18n/gallery.zh_HK.qm
+0
-0
examples/gallery/app/resource/i18n/gallery.zh_HK.ts
examples/gallery/app/resource/i18n/gallery.zh_HK.ts
+11
-1
examples/gallery/app/resource/images/chidanta4.jpg
examples/gallery/app/resource/images/chidanta4.jpg
+0
-0
examples/gallery/app/resource/resource.qrc
examples/gallery/app/resource/resource.qrc
+1
-0
examples/gallery/app/view/scroll_interface.py
examples/gallery/app/view/scroll_interface.py
+21
-4
qfluentwidgets/components/widgets/scroll_bar.py
qfluentwidgets/components/widgets/scroll_bar.py
+5
-6
未找到文件。
examples/gallery/app/common/resource.py
浏览文件 @
874e2edd
此差异已折叠。
点击以展开。
examples/gallery/app/resource/i18n/gallery.zh_CN.qm
浏览文件 @
874e2edd
无法预览此类型文件
examples/gallery/app/resource/i18n/gallery.zh_CN.ts
浏览文件 @
874e2edd
...
...
@@ -737,6 +737,16 @@
<
source
>
Chitanda
Eru
is
so
hot
🥵🥵
<
/source
>
<
translation
>
春寒赐浴华清池
,
温泉水滑洗凝脂
🥵🥵
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/scroll_interface.py
"
line
=
"
67
"
/>
<
source
>
Single
direction
scroll
scroll
area
<
/source
>
<
translation
>
单方向平滑滚动区域
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/scroll_interface.py
"
line
=
"
73
"
/>
<
source
>
Chitanda
Eru
is
so
hot
🥵🥵🥵
<
/source
>
<
translation
>
春宵苦短日高起
,
从此君王不早朝
🥵🥵🥵
<
/translation
>
<
/message
>
<
/context
>
<
context
>
<
name
>
SettingInterface
<
/name
>
...
...
examples/gallery/app/resource/i18n/gallery.zh_HK.qm
浏览文件 @
874e2edd
无法预览此类型文件
examples/gallery/app/resource/i18n/gallery.zh_HK.ts
浏览文件 @
874e2edd
<
?
xml
version
=
"
1.0
"
encoding
=
"
utf-8
"
?
>
<!
DOCTYPE
TS
>
<
TS
version
=
"
2.1
"
language
=
"
zh_
HK
"
sourcelanguage
=
"
en_US
"
>
<
TS
version
=
"
2.1
"
language
=
"
zh_
CN
"
sourcelanguage
=
"
en_US
"
>
<
context
>
<
name
>
BasicInputInterface
<
/name
>
<
message
>
...
...
@@ -737,6 +737,16 @@
<
source
>
Chitanda
Eru
is
so
hot
🥵🥵
<
/source
>
<
translation
>
春寒賜浴華清池
,
温泉水滑洗凝脂
🥵🥵
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/scroll_interface.py
"
line
=
"
67
"
/>
<
source
>
Single
direction
scroll
scroll
area
<
/source
>
<
translation
>
單方向平滑滾動區域
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../view/scroll_interface.py
"
line
=
"
73
"
/>
<
source
>
Chitanda
Eru
is
so
hot
🥵🥵🥵
<
/source
>
<
translation
>
春宵苦短日高起
,
從此君王不早朝
🥵🥵🥵
<
/translation
>
<
/message
>
<
/context
>
<
context
>
<
name
>
SettingInterface
<
/name
>
...
...
examples/gallery/app/resource/images/chidanta4.jpg
0 → 100644
浏览文件 @
874e2edd
103.8 KB
examples/gallery/app/resource/resource.qrc
浏览文件 @
874e2edd
...
...
@@ -109,6 +109,7 @@
<file>images/chidanta.jpg</file>
<file>images/chidanta2.jpg</file>
<file>images/chidanta3.jpg</file>
<file>images/chidanta4.jpg</file>
<file>images/header.png</file>
<file>images/header1.png</file>
<file>images/kunkun.png</file>
...
...
examples/gallery/app/view/scroll_interface.py
浏览文件 @
874e2edd
...
...
@@ -2,7 +2,7 @@
from
PyQt5.QtCore
import
Qt
,
QEasingCurve
from
PyQt5.QtGui
import
QPixmap
from
PyQt5.QtWidgets
import
QWidget
from
qfluentwidgets
import
SingleDirectionScrollArea
,
SmoothScrollArea
,
ToolTipFilter
,
PixmapLabel
from
qfluentwidgets
import
SingleDirectionScrollArea
,
SmoothScrollArea
,
ToolTipFilter
,
PixmapLabel
,
ScrollArea
from
.gallery_interface
import
GalleryInterface
from
..common.translator
import
Translator
...
...
@@ -19,7 +19,8 @@ class ScrollInterface(GalleryInterface):
parent
=
parent
)
w
=
SingleDirectionScrollArea
()
# scroll area
w
=
ScrollArea
()
label
=
PixmapLabel
(
self
)
label
.
setPixmap
(
QPixmap
(
":/gallery/images/chidanta2.jpg"
).
scaled
(
775
,
1229
,
Qt
.
KeepAspectRatio
,
Qt
.
SmoothTransformation
...
...
@@ -28,7 +29,6 @@ class ScrollInterface(GalleryInterface):
w
.
horizontalScrollBar
().
setValue
(
0
)
w
.
setWidget
(
label
)
w
.
setFixedSize
(
775
,
430
)
w
.
setObjectName
(
'imageViewer'
)
card
=
self
.
addExampleCard
(
self
.
tr
(
'Smooth scroll area'
),
...
...
@@ -39,13 +39,13 @@ class ScrollInterface(GalleryInterface):
card
.
card
.
setToolTip
(
self
.
tr
(
'Chitanda Eru is too hot 🥵'
))
card
.
card
.
setToolTipDuration
(
2000
)
# smooth scroll area
w
=
SmoothScrollArea
()
label
=
PixmapLabel
(
self
)
label
.
setPixmap
(
QPixmap
(
":/gallery/images/chidanta3.jpg"
))
w
.
setWidget
(
label
)
w
.
setFixedSize
(
660
,
540
)
w
.
setObjectName
(
'imageViewer'
)
card
=
self
.
addExampleCard
(
self
.
tr
(
'Smooth scroll area implemented by animation'
),
...
...
@@ -55,3 +55,20 @@ class ScrollInterface(GalleryInterface):
card
.
card
.
installEventFilter
(
ToolTipFilter
(
card
.
card
,
showDelay
=
500
))
card
.
card
.
setToolTip
(
self
.
tr
(
'Chitanda Eru is so hot 🥵🥵'
))
card
.
card
.
setToolTipDuration
(
2000
)
# single direction scroll area
w
=
SingleDirectionScrollArea
(
self
,
Qt
.
Horizontal
)
label
=
PixmapLabel
(
self
)
label
.
setPixmap
(
QPixmap
(
":/gallery/images/chidanta4.jpg"
))
w
.
setWidget
(
label
)
w
.
setFixedSize
(
660
,
498
)
card
=
self
.
addExampleCard
(
self
.
tr
(
'Single direction scroll scroll area'
),
w
,
'https://github.com/zhiyiYo/PyQt-Fluent-Widgets/blob/master/examples/scroll_area/demo.py'
,
)
card
.
card
.
installEventFilter
(
ToolTipFilter
(
card
.
card
,
showDelay
=
500
))
card
.
card
.
setToolTip
(
self
.
tr
(
'Chitanda Eru is so hot 🥵🥵🥵'
))
card
.
card
.
setToolTipDuration
(
2000
)
qfluentwidgets/components/widgets/scroll_bar.py
浏览文件 @
874e2edd
...
...
@@ -333,15 +333,14 @@ class ScrollBar(QWidget):
self
.
move
(
1
,
size
.
height
()
-
13
)
def
_adjustHandleSize
(
self
):
total
=
self
.
maximum
()
-
self
.
minimum
()
+
self
.
parent
().
height
()
if
total
!=
0
:
s
=
int
(
self
.
_grooveLength
()
*
self
.
parent
().
height
()
/
total
)
else
:
s
=
1
p
=
self
.
parent
()
if
self
.
orientation
()
==
Qt
.
Vertical
:
total
=
self
.
maximum
()
-
self
.
minimum
()
+
p
.
height
()
s
=
int
(
self
.
_grooveLength
()
*
p
.
height
()
/
max
(
total
,
1
))
self
.
handle
.
setFixedHeight
(
max
(
40
,
s
))
else
:
total
=
self
.
maximum
()
-
self
.
minimum
()
+
p
.
width
()
s
=
int
(
self
.
_grooveLength
()
*
p
.
width
()
/
max
(
total
,
1
))
self
.
handle
.
setFixedWidth
(
max
(
40
,
s
))
def
_adjustHandlePos
(
self
):
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录