Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
k54kdk
PyQt Fluent Widgets
提交
fcb5124f
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看板
提交
fcb5124f
编写于
1月 30, 2023
作者:
之一Yo
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
将亚克力标签设置为可选项
上级
fde0bef0
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
20 addition
and
45 deletion
+20
-45
README.md
README.md
+3
-4
docs/source/quick-start.md
docs/source/quick-start.md
+3
-4
examples/acrylic_label/demo.py
examples/acrylic_label/demo.py
+1
-1
qfluentwidgets/__init__.py
qfluentwidgets/__init__.py
+1
-1
qfluentwidgets/common/__init__.py
qfluentwidgets/common/__init__.py
+0
-1
qfluentwidgets/components/widgets/__init__.py
qfluentwidgets/components/widgets/__init__.py
+0
-1
qfluentwidgets/components/widgets/label.py
qfluentwidgets/components/widgets/label.py
+7
-27
qfluentwidgets/components/widgets/state_tool_tip.py
qfluentwidgets/components/widgets/state_tool_tip.py
+1
-2
setup.py
setup.py
+4
-4
未找到文件。
README.md
浏览文件 @
fcb5124f
...
@@ -26,14 +26,13 @@
...
@@ -26,14 +26,13 @@
## Install
## Install
To install
use pip
:
To install
lite version (
`AcrylicLabel`
is not available)
:
```
shell
```
shell
pip
install
PyQt-Fluent-Widgets
pip
install
PyQt-Fluent-Widgets
```
```
Or
clone the repo
:
Or
install full-featured version
:
```
shell
```
shell
git clone https://github.com/zhiyiYo/PyQt-Fluent-Widgets.git
pip
install
'PyQt-Fluent-Widgets[full]'
python setup.py
install
```
```
## Run Example
## Run Example
...
...
docs/source/quick-start.md
浏览文件 @
fcb5124f
## Quick start
## Quick start
### Install
### Install
To install use pip:
To install
lite version (
`AcrylicLabel`
is not available)
use pip:
```
shell
```
shell
pip
install
PyQt-Fluent-Widgets
pip
install
PyQt-Fluent-Widgets
```
```
Or
clone the repo
:
Or
install full-featured version use pip
:
```
shell
```
shell
git clone https://github.com/zhiyiYo/PyQt-Fluent-Widgets.git
pip
install
'PyQt-Fluent-Widgets[full]'
python setup.py
install
```
```
### Run example
### Run example
...
...
examples/acrylic_label/demo.py
浏览文件 @
fcb5124f
...
@@ -4,7 +4,7 @@ import sys
...
@@ -4,7 +4,7 @@ import sys
from
PyQt5.QtGui
import
QColor
from
PyQt5.QtGui
import
QColor
from
PyQt5.QtWidgets
import
QApplication
from
PyQt5.QtWidgets
import
QApplication
from
qfluentwidgets
import
AcrylicLabel
from
qfluentwidgets
.components.widgets.label
import
AcrylicLabel
app
=
QApplication
(
sys
.
argv
)
app
=
QApplication
(
sys
.
argv
)
...
...
qfluentwidgets/__init__.py
浏览文件 @
fcb5124f
...
@@ -10,7 +10,7 @@ online at https://pyqt-fluent-widgets.readthedocs.io.
...
@@ -10,7 +10,7 @@ online at https://pyqt-fluent-widgets.readthedocs.io.
:license: MIT, see LICENSE for more details.
:license: MIT, see LICENSE for more details.
"""
"""
__version__
=
"0.2.
0
"
__version__
=
"0.2.
1
"
from
.components
import
*
from
.components
import
*
from
.common
import
*
from
.common
import
*
...
...
qfluentwidgets/common/__init__.py
浏览文件 @
fcb5124f
from
.config
import
*
from
.config
import
*
from
.auto_wrap
import
TextWrap
from
.auto_wrap
import
TextWrap
from
.icon
import
Icon
,
getIconColor
from
.icon
import
Icon
,
getIconColor
from
.image_utils
import
DominantColor
,
gaussianBlur
from
.style_sheet
import
setStyleSheet
,
getStyleSheet
from
.style_sheet
import
setStyleSheet
,
getStyleSheet
\ No newline at end of file
qfluentwidgets/components/widgets/__init__.py
浏览文件 @
fcb5124f
from
.label
import
AcrylicLabel
,
PixmapLabel
from
.menu
import
DWMMenu
,
LineEditMenu
from
.menu
import
DWMMenu
,
LineEditMenu
from
.slider
import
Slider
,
HollowHandleStyle
from
.slider
import
Slider
,
HollowHandleStyle
from
.stacked_widget
import
PopUpAniStackedWidget
,
OpacityAniStackedWidget
from
.stacked_widget
import
PopUpAniStackedWidget
,
OpacityAniStackedWidget
...
...
qfluentwidgets/components/widgets/label.py
浏览文件 @
fcb5124f
# coding:utf-8
# coding:utf-8
import
warnings
from
PyQt5.QtCore
import
Qt
,
QThread
,
pyqtSignal
from
PyQt5.QtCore
import
Qt
,
QThread
,
pyqtSignal
from
PyQt5.QtGui
import
QBrush
,
QColor
,
QImage
,
QPainter
,
QPixmap
from
PyQt5.QtGui
import
QBrush
,
QColor
,
QImage
,
QPainter
,
QPixmap
from
PyQt5.QtWidgets
import
QLabel
from
PyQt5.QtWidgets
import
QLabel
from
...common.image_utils
import
gaussianBlur
try
:
from
...common.image_utils
import
gaussianBlur
except
ImportError
as
e
:
warnings
.
warn
(
'`AcrylicLabel` is not supported in current qfluentwidgets, use `pip install PyQt-Fluent-Widgets[full]` to enable it.'
)
class
BlurCoverThread
(
QThread
):
class
BlurCoverThread
(
QThread
):
...
@@ -138,29 +144,3 @@ class AcrylicLabel(QLabel):
...
@@ -138,29 +144,3 @@ class AcrylicLabel(QLabel):
if
not
self
.
blurPixmap
.
isNull
():
if
not
self
.
blurPixmap
.
isNull
():
self
.
setPixmap
(
self
.
blurPixmap
.
scaled
(
self
.
setPixmap
(
self
.
blurPixmap
.
scaled
(
self
.
size
(),
Qt
.
KeepAspectRatioByExpanding
,
Qt
.
SmoothTransformation
))
self
.
size
(),
Qt
.
KeepAspectRatioByExpanding
,
Qt
.
SmoothTransformation
))
class
PixmapLabel
(
QLabel
):
""" Label for high dpi screen """
def
__init__
(
self
,
parent
=
None
):
super
().
__init__
(
parent
)
self
.
__pixmap
=
QPixmap
()
def
setPixmap
(
self
,
pixmap
:
QPixmap
):
self
.
__pixmap
=
pixmap
self
.
setFixedSize
(
pixmap
.
size
())
self
.
update
()
def
pixmap
(
self
):
return
self
.
__pixmap
def
paintEvent
(
self
,
e
):
if
self
.
__pixmap
.
isNull
():
return
painter
=
QPainter
(
self
)
painter
.
setRenderHints
(
QPainter
.
Antialiasing
|
QPainter
.
SmoothPixmapTransform
)
painter
.
setPen
(
Qt
.
NoPen
)
painter
.
drawPixmap
(
self
.
rect
(),
self
.
__pixmap
)
\ No newline at end of file
qfluentwidgets/components/widgets/state_tool_tip.py
浏览文件 @
fcb5124f
# coding:utf-8
# coding:utf-8
from
PyQt5.QtCore
import
QEasingCurve
,
QPropertyAnimation
,
Qt
,
QTimer
,
pyqtSignal
,
QSize
,
QPoint
,
QRectF
from
PyQt5.QtCore
import
QEasingCurve
,
QPropertyAnimation
,
Qt
,
QTimer
,
pyqtSignal
,
QSize
,
QPoint
,
QRectF
from
PyQt5.QtGui
import
QPainter
,
QPixmap
from
PyQt5.QtGui
import
QPainter
from
PyQt5.QtWidgets
import
QLabel
,
QWidget
,
QToolButton
,
QGraphicsOpacityEffect
from
PyQt5.QtWidgets
import
QLabel
,
QWidget
,
QToolButton
,
QGraphicsOpacityEffect
from
PyQt5.QtSvg
import
QSvgRenderer
,
QSvgWidget
from
PyQt5.QtSvg
import
QSvgRenderer
,
QSvgWidget
from
.label
import
PixmapLabel
from
...common
import
setStyleSheet
from
...common
import
setStyleSheet
...
...
setup.py
浏览文件 @
fcb5124f
...
@@ -6,7 +6,7 @@ with open('README.md', encoding='utf-8') as f:
...
@@ -6,7 +6,7 @@ with open('README.md', encoding='utf-8') as f:
setuptools
.
setup
(
setuptools
.
setup
(
name
=
"PyQt-Fluent-Widgets"
,
name
=
"PyQt-Fluent-Widgets"
,
version
=
"0.2.
0
"
,
version
=
"0.2.
1
"
,
keywords
=
"pyqt fluent widgets"
,
keywords
=
"pyqt fluent widgets"
,
author
=
"zhiyiYo"
,
author
=
"zhiyiYo"
,
author_email
=
"shokokawaii@outlook.com"
,
author_email
=
"shokokawaii@outlook.com"
,
...
@@ -19,10 +19,10 @@ setuptools.setup(
...
@@ -19,10 +19,10 @@ setuptools.setup(
install_requires
=
[
install_requires
=
[
"PyQt5-Frameless-Window"
,
"PyQt5-Frameless-Window"
,
"darkdetect"
,
"darkdetect"
,
"scipy"
,
"pillow"
,
"colorthief"
,
],
],
extras_require
=
{
'full'
:
[
'scipy'
,
'pillow'
,
'colorthief'
]
},
classifiers
=
[
classifiers
=
[
'Programming Language :: Python :: 3'
,
'Programming Language :: Python :: 3'
,
'License :: OSI Approved :: MIT License'
,
'License :: OSI Approved :: MIT License'
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录