Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
k54kdk
PyQt Fluent Widgets
提交
8f5a99a5
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看板
提交
8f5a99a5
编写于
3月 14, 2023
作者:
之一Yo
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修复切换主题后开光按钮样式没有跟着改变的问题
上级
b0341b99
变更
5
展开全部
隐藏空白更改
内联
并排
Showing
5 changed file
with
40074 addition
and
40038 deletion
+40074
-40038
qfluentwidgets/_rc/qss/dark/navigation_interface.qss
qfluentwidgets/_rc/qss/dark/navigation_interface.qss
+10
-3
qfluentwidgets/_rc/qss/light/navigation_interface.qss
qfluentwidgets/_rc/qss/light/navigation_interface.qss
+10
-3
qfluentwidgets/_rc/resource.py
qfluentwidgets/_rc/resource.py
+40044
-40023
qfluentwidgets/common/style_sheet.py
qfluentwidgets/common/style_sheet.py
+1
-4
qfluentwidgets/components/navigation/navigation_panel.py
qfluentwidgets/components/navigation/navigation_panel.py
+9
-5
未找到文件。
qfluentwidgets/_rc/qss/dark/navigation_interface.qss
浏览文件 @
8f5a99a5
NavigationPanel {
NavigationPanel[menu=true] {
background-color: rgba(32, 32, 32, --bgOpacity);
background-color: rgb(32, 32, 32);
border: 1px solid rgba(57, 57, 57, --bgOpacity);
border: 1px solid rgb(57, 57, 57);
border-top-right-radius: 7px;
border-bottom-right-radius: 7px;
}
NavigationPanel[menu=false] {
background-color: transparent;
border: 1px solid transparent;
border-top-right-radius: 7px;
border-top-right-radius: 7px;
border-bottom-right-radius: 7px;
border-bottom-right-radius: 7px;
}
}
...
...
qfluentwidgets/_rc/qss/light/navigation_interface.qss
浏览文件 @
8f5a99a5
NavigationPanel {
NavigationPanel[menu=true] {
background-color: rgba(243, 243, 243, --bgOpacity);
background-color: rgb(243, 243, 243);
border: 1px solid rgba(229, 229, 229, --bgOpacity);
border: 1px solid rgb(229, 229, 229);
border-top-right-radius: 7px;
border-bottom-right-radius: 7px;
}
NavigationPanel[menu=false] {
background-color: transparent;
border: 1px solid transparent;
border-top-right-radius: 7px;
border-top-right-radius: 7px;
border-bottom-right-radius: 7px;
border-bottom-right-radius: 7px;
}
}
...
...
qfluentwidgets/_rc/resource.py
浏览文件 @
8f5a99a5
此差异已折叠。
点击以展开。
qfluentwidgets/common/style_sheet.py
浏览文件 @
8f5a99a5
...
@@ -43,10 +43,7 @@ def setStyleSheet(widget, file, theme=Theme.AUTO):
...
@@ -43,10 +43,7 @@ def setStyleSheet(widget, file, theme=Theme.AUTO):
theme: Theme
theme: Theme
the theme of style sheet
the theme of style sheet
"""
"""
# register widget
fluentWidgets
[
widget
]
=
file
if
widget
not
in
fluentWidgets
:
fluentWidgets
[
widget
]
=
file
widget
.
setStyleSheet
(
getStyleSheet
(
file
,
theme
))
widget
.
setStyleSheet
(
getStyleSheet
(
file
,
theme
))
...
...
qfluentwidgets/components/navigation/navigation_panel.py
浏览文件 @
8f5a99a5
...
@@ -4,7 +4,7 @@ from typing import Dict, Union
...
@@ -4,7 +4,7 @@ from typing import Dict, Union
from
PyQt5.QtCore
import
Qt
,
QPropertyAnimation
,
QRect
,
QSize
,
QEvent
,
QEasingCurve
from
PyQt5.QtCore
import
Qt
,
QPropertyAnimation
,
QRect
,
QSize
,
QEvent
,
QEasingCurve
from
PyQt5.QtGui
import
QResizeEvent
,
QIcon
from
PyQt5.QtGui
import
QResizeEvent
,
QIcon
from
PyQt5.QtWidgets
import
QWidget
,
QVBoxLayout
,
QFrame
from
PyQt5.QtWidgets
import
QWidget
,
QVBoxLayout
,
QFrame
,
QApplication
from
.navigation_widget
import
NavigationButton
,
MenuButton
,
NavigationWidget
,
NavigationSeparator
from
.navigation_widget
import
NavigationButton
,
MenuButton
,
NavigationWidget
,
NavigationSeparator
from
..widgets.scroll_area
import
ScrollArea
from
..widgets.scroll_area
import
ScrollArea
...
@@ -44,7 +44,6 @@ class NavigationPanel(QFrame):
...
@@ -44,7 +44,6 @@ class NavigationPanel(QFrame):
self
.
scrollLayout
=
NavigationItemLayout
(
self
.
scrollWidget
)
self
.
scrollLayout
=
NavigationItemLayout
(
self
.
scrollWidget
)
self
.
items
=
{}
# type: Dict[str, NavigationWidget]
self
.
items
=
{}
# type: Dict[str, NavigationWidget]
self
.
_bgOpacity
=
0
self
.
expandAni
=
QPropertyAnimation
(
self
,
b
'geometry'
,
self
)
self
.
expandAni
=
QPropertyAnimation
(
self
,
b
'geometry'
,
self
)
self
.
isMinimalEnabled
=
isMinimalEnabled
self
.
isMinimalEnabled
=
isMinimalEnabled
...
@@ -71,6 +70,7 @@ class NavigationPanel(QFrame):
...
@@ -71,6 +70,7 @@ class NavigationPanel(QFrame):
self
.
menuButton
.
clicked
.
connect
(
self
.
toggle
)
self
.
menuButton
.
clicked
.
connect
(
self
.
toggle
)
self
.
expandAni
.
finished
.
connect
(
self
.
_onExpandAniFinished
)
self
.
expandAni
.
finished
.
connect
(
self
.
_onExpandAniFinished
)
self
.
setProperty
(
'menu'
,
False
)
self
.
scrollWidget
.
setObjectName
(
'scrollWidget'
)
self
.
scrollWidget
.
setObjectName
(
'scrollWidget'
)
setStyleSheet
(
self
,
'navigation_interface'
)
setStyleSheet
(
self
,
'navigation_interface'
)
self
.
__initLayout
()
self
.
__initLayout
()
...
@@ -191,7 +191,8 @@ class NavigationPanel(QFrame):
...
@@ -191,7 +191,8 @@ class NavigationPanel(QFrame):
if
self
.
window
().
width
()
>
1007
and
not
self
.
isMinimalEnabled
:
if
self
.
window
().
width
()
>
1007
and
not
self
.
isMinimalEnabled
:
self
.
displayMode
=
NavigationDisplayMode
.
EXPAND
self
.
displayMode
=
NavigationDisplayMode
.
EXPAND
else
:
else
:
self
.
setStyleSheet
(
getStyleSheet
(
'navigation_interface'
).
replace
(
'--bgOpacity'
,
'1'
))
self
.
setProperty
(
'menu'
,
True
)
self
.
setStyle
(
QApplication
.
style
())
self
.
displayMode
=
NavigationDisplayMode
.
MENU
self
.
displayMode
=
NavigationDisplayMode
.
MENU
if
not
self
.
_parent
.
isWindow
():
if
not
self
.
_parent
.
isWindow
():
pos
=
self
.
parent
().
pos
()
pos
=
self
.
parent
().
pos
()
...
@@ -283,9 +284,12 @@ class NavigationPanel(QFrame):
...
@@ -283,9 +284,12 @@ class NavigationPanel(QFrame):
s
=
getStyleSheet
(
'navigation_interface'
)
s
=
getStyleSheet
(
'navigation_interface'
)
if
self
.
displayMode
==
NavigationDisplayMode
.
MINIMAL
:
if
self
.
displayMode
==
NavigationDisplayMode
.
MINIMAL
:
self
.
hide
()
self
.
hide
()
self
.
setStyleSheet
(
s
.
replace
(
'--bgOpacity'
,
'0'
))
self
.
setProperty
(
'menu'
,
False
)
self
.
setStyle
(
QApplication
.
style
())
elif
self
.
displayMode
==
NavigationDisplayMode
.
COMPACT
:
elif
self
.
displayMode
==
NavigationDisplayMode
.
COMPACT
:
self
.
setStyleSheet
(
s
.
replace
(
'--bgOpacity'
,
'0'
))
self
.
setProperty
(
'menu'
,
False
)
self
.
setStyle
(
QApplication
.
style
())
for
item
in
self
.
items
.
values
():
for
item
in
self
.
items
.
values
():
item
.
setCompacted
(
True
)
item
.
setCompacted
(
True
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录