提交 0c04b4f6 编写于 作者: 之一Yo's avatar 之一Yo

添加翻译和过渡动画

上级 1874a838
# coding:utf-8 # coding:utf-8
from enum import Enum from enum import Enum
from PyQt5.QtCore import Qt
from PyQt5.QtGui import QGuiApplication, QFont
from qfluentwidgets import (qconfig, QConfig, ConfigItem, OptionsConfigItem, BoolValidator, from qfluentwidgets import (qconfig, QConfig, ConfigItem, OptionsConfigItem, BoolValidator,
ColorConfigItem, OptionsValidator, RangeConfigItem, RangeValidator, OptionsValidator, RangeConfigItem, RangeValidator,
FolderListValidator, EnumSerializer, FolderValidator) FolderListValidator, EnumSerializer, FolderValidator)
...@@ -28,19 +26,16 @@ class Config(QConfig): ...@@ -28,19 +26,16 @@ class Config(QConfig):
"Folders", "Download", "app/download", FolderValidator()) "Folders", "Download", "app/download", FolderValidator())
# main window # main window
minimizeToTray = ConfigItem(
"MainWindow", "MinimizeToTray", True, BoolValidator())
playBarColor = ColorConfigItem("MainWindow", "PlayBarColor", "#225C7F")
recentPlaysNumber = RangeConfigItem(
"MainWindow", "RecentPlayNumbers", 300, RangeValidator(10, 300))
dpiScale = OptionsConfigItem( dpiScale = OptionsConfigItem(
"MainWindow", "DpiScale", "Auto", OptionsValidator([1, 1.25, 1.5, 1.75, 2, "Auto"]), restart=True) "MainWindow", "DpiScale", "Auto", OptionsValidator([1, 1.25, 1.5, 1.75, 2, "Auto"]), restart=True)
language = OptionsConfigItem( language = OptionsConfigItem(
"MainWindow", "Language", Language.AUTO, OptionsValidator(Language), EnumSerializer(Language), restart=True) "MainWindow", "Language", Language.AUTO, OptionsValidator(Language), EnumSerializer(Language), restart=True)
# Material
blurRadius = RangeConfigItem("Material", "AcrylicBlurRadius", 15, RangeValidator(0, 40))
# software update # software update
checkUpdateAtStartUp = ConfigItem( checkUpdateAtStartUp = ConfigItem("Update", "CheckUpdateAtStartUp", True, BoolValidator())
"Update", "CheckUpdateAtStartUp", True, BoolValidator())
YEAR = 2023 YEAR = 2023
......
...@@ -9,6 +9,7 @@ class Icon(FluentIconBase, Enum): ...@@ -9,6 +9,7 @@ class Icon(FluentIconBase, Enum):
HOME = "Home" HOME = "Home"
CHAT = "Chat" CHAT = "Chat"
MENU = "Menu" MENU = "Menu"
ALBUM = "Album"
SCROLL = "Scroll" SCROLL = "Scroll"
LAYOUT = "Layout" LAYOUT = "Layout"
GITHUB = "Github" GITHUB = "Github"
......
此差异已折叠。
此差异已折叠。
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS> <!DOCTYPE TS>
<TS version="2.1" language="zh_CN"> <TS version="2.1" language="zh_CN">
<!-- The translation of components in PyQt-Fluent-Widgets --> <!-- The translation of components in PyQt-Fluent-Widgets -->
<context> <context>
<name>ColorDialog</name> <name>ColorDialog</name>
<message> <message>
<source>OK</source> <source>OK</source>
<translation>確認</translation> <translation>確認</translation>
</message> </message>
<message> <message>
<source>Cancel</source> <source>Cancel</source>
<translation>取消</translation> <translation>取消</translation>
</message> </message>
<message> <message>
<source>Edit Color</source> <source>Edit Color</source>
<translation>編輯顏色</translation> <translation>編輯顏色</translation>
</message> </message>
<message> <message>
<source>Red</source> <source>Red</source>
<translation>紅色</translation> <translation>紅色</translation>
</message> </message>
<message> <message>
<source>Blue</source> <source>Blue</source>
<translation>藍色</translation> <translation>藍色</translation>
</message> </message>
<message> <message>
<source>Green</source> <source>Green</source>
<translation>綠色</translation> <translation>綠色</translation>
</message> </message>
</context> </context>
<context> <context>
<name>MessageDialog</name> <name>MessageDialog</name>
<message> <message>
<source>OK</source> <source>OK</source>
<translation>確認</translation> <translation>確認</translation>
</message> </message>
<message> <message>
<source>Cancel</source> <source>Cancel</source>
<translation>取消</translation> <translation>取消</translation>
</message> </message>
</context> </context>
<context> <context>
<name>Dialog</name> <name>Dialog</name>
<message> <message>
<source>OK</source> <source>OK</source>
<translation>確認</translation> <translation>確認</translation>
</message> </message>
<message> <message>
<source>Cancel</source> <source>Cancel</source>
<translation>取消</translation> <translation>取消</translation>
</message> </message>
</context> </context>
<context> <context>
<name>FolderListDialog</name> <name>FolderListDialog</name>
<message> <message>
<source>Done</source> <source>Done</source>
<translation>完成</translation> <translation>完成</translation>
</message> </message>
<message> <message>
<source>Choose folder</source> <source>Choose folder</source>
<translation>選擇文件夾</translation> <translation>選擇文件夾</translation>
</message> </message>
<message> <message>
<source>Are you sure you want to delete the folder?</source> <source>Are you sure you want to delete the folder?</source>
<translation>是否確認刪除此文件夾</translation> <translation>是否確認刪除此文件夾</translation>
</message> </message>
<message> <message>
<source>If you delete the </source> <source>If you delete the </source>
<translation>如果將 </translation> <translation>如果將 </translation>
</message> </message>
<message> <message>
<source> folder and remove it from the list, the folder will no longer appear in the <source> folder and remove it from the list, the folder will no longer appear in the list, but will not be deleted.</source>
list, but will not be deleted.</source> <translation> 文件夾從列表中移除則該文件夾不會再出現在列表中但不會被刪除</translation>
<translation> 文件夾從列表中移除則該文件夾不會再出現在列表中但不會被刪除</translation> </message>
</message> </context>
</context> <context>
<context> <name>SwitchSettingCard</name>
<name>SwitchSettingCard</name> <message>
<message> <source>Off</source>
<source>Off</source> <translation></translation>
<translation></translation> </message>
</message> <message>
<message> <source>On</source>
<source>On</source> <translation></translation>
<translation></translation> </message>
</message> </context>
</context> <context>
<context> <name>CustomColorSettingCard</name>
<name>CustomColorSettingCard</name> <message>
<message> <source>Custom color</source>
<source>Custom color</source> <translation>自定義顏色</translation>
<translation>自定義顏色</translation> </message>
</message> <message>
<message> <source>Default color</source>
<source>Default color</source> <translation>默認顏色</translation>
<translation>默認顏色</translation> </message>
</message> <message>
<message> <source>Choose color</source>
<source>Choose color</source> <translation>選擇顏色</translation>
<translation>選擇顏色</translation> </message>
</message> </context>
</context> <context>
<context> <name>ColorPickerButton</name>
<name>ColorPickerButton</name> <message>
<message> <source>Choose </source>
<source>Choose </source> <translation>選擇</translation>
<translation>選擇</translation> </message>
</message> </context>
</context> <context>
<context> <name>FolderListSettingCard</name>
<name>FolderListSettingCard</name> <message>
<message> <source>Add folder</source>
<source>Add folder</source> <translation>添加文件夾</translation>
<translation>添加文件夾</translation> </message>
</message> <message>
<message> <source>Choose folder</source>
<source>Choose folder</source> <translation>選擇文件夾</translation>
<translation>選擇文件夾</translation> </message>
</message> <message>
<message> <source>Are you sure you want to delete the folder?</source>
<source>Are you sure you want to delete the folder?</source> <translation>是否確認刪除此文件夾</translation>
<translation>是否確認刪除此文件夾</translation> </message>
</message> <message>
<message> <source>If you delete the </source>
<source>If you delete the </source> <translation>如果將 </translation>
<translation>如果將 </translation> </message>
</message> <message>
<message> <source> folder and remove it from the list, the folder will no longer appear in the list, but will not be deleted.</source>
<source> folder and remove it from the list, the folder will no longer appear in the <translation> 文件夾從列表中移除則該文件夾不會再出現在列表中但不會被刪除</translation>
list, but will not be deleted.</source> </message>
<translation> 文件夾從列表中移除則該文件夾不會再出現在列表中但不會被刪除</translation> </context>
</message> <context>
</context> <name>LineEditMenu</name>
<message>
<!-- Put the translation of your interface below --> <source>Cut</source>
<context> <translation>剪切</translation>
<name>SettingInterface</name> </message>
<message> <message>
<source>Settings</source> <source>Copy</source>
<translation>設置</translation> <translation>復製</translation>
</message> </message>
<message> <message>
<source>Music on this PC</source> <source>Paste</source>
<translation> PC 上的音樂</translation> <translation>粘貼</translation>
</message> </message>
<message> <message>
<source>Local music library</source> <source>Cancel</source>
<translation>本地音樂庫</translation> <translation>撤回</translation>
</message> </message>
<message> <message>
<source>Choose folder</source> <source>Select all</source>
<translation>選擇文件夾</translation> <translation>全選</translation>
</message> </message>
<message> </context>
<source>Download directory</source>
<translation>下載目錄</translation>
</message>
<message>
<source>Personalization</source>
<translation>個性化</translation>
</message>
<message>
<source>Use Acrylic effect</source>
<translation>啟用亞克力效果</translation>
</message>
<message>
<source>Acrylic effect has better visual experience, but it may cause the window to
become stuck</source>
<translation>亞克力效果的視覺體驗更好但可能導致窗口卡頓</translation>
</message>
<message>
<source>Application theme</source>
<translation>應用主題</translation>
</message>
<message>
<source>Theme color</source>
<translation>主題色</translation>
</message>
<message>
<source>Change the theme color of you application</source>
<translation>調整你的應用主題顏色</translation>
</message>
<message>
<source>Change the appearance of your application</source>
<translation>調整你的應用外觀</translation>
</message>
<message>
<source>Light</source>
<translation>淺色</translation>
</message>
<message>
<source>Dark</source>
<translation>深色</translation>
</message>
<message>
<source>Use system setting</source>
<translation>跟隨系統設置</translation>
</message>
<message>
<source>Interface zoom</source>
<translation>界面縮放</translation>
</message>
<message>
<source>Change the size of widgets and fonts</source>
<translation>調整組件和字體的大小</translation>
</message>
<message>
<source>Language</source>
<translation>語言</translation>
</message>
<message>
<source>Set your preferred language for UI</source>
<translation>選擇界面所使用的語言</translation>
</message>
<message>
<source>Online Music</source>
<translation>在線音樂</translation>
</message>
<message>
<source>Number of online music displayed on each page</source>
<translation>每頁顯示的在線歌曲數量</translation>
</message>
<message>
<source>Online music quality</source>
<translation>在線播放音質</translation>
</message>
<message>
<source>Standard quality</source>
<translation>流暢</translation>
</message>
<message>
<source>High quality</source>
<translation>高品</translation>
</message>
<message>
<source>Super quality</source>
<translation>超品</translation>
</message>
<message>
<source>Lossless quality</source>
<translation>無損</translation>
</message>
<message>
<source>Online MV quality</source>
<translation>在線 MV 畫質</translation>
</message>
<message>
<source>Full HD</source>
<translation>超清</translation>
</message>
<message>
<source>HD</source>
<translation>高清</translation>
</message>
<message>
<source>SD</source>
<translation>標清</translation>
</message>
<message>
<source>LD</source>
<translation>流暢</translation>
</message>
<message>
<source>Desktop Lyric</source>
<translation>桌面歌詞</translation>
</message>
<message>
<source>Choose font</source>
<translation>選擇字體</translation>
</message>
<message>
<source>Font</source>
<translation>字體</translation>
</message>
<message>
<source>Foreground color</source>
<translation>前景色</translation>
</message>
<message>
<source>Background color</source>
<translation>背景色</translation>
</message>
<message>
<source>Stroke color</source>
<translation>描邊色</translation>
</message>
<message>
<source>Stroke size</source>
<translation>描邊大小</translation>
</message>
<message>
<source>Alignment</source>
<translation>對齊方式</translation>
</message>
<message>
<source>Center aligned</source>
<translation>居中對齊</translation>
</message>
<message>
<source>Left aligned</source>
<translation>左對齊</translation>
</message>
<message>
<source>Right aligned</source>
<translation>右對齊</translation>
</message>
<message>
<source>Main Panel</source>
<translation>主面板</translation>
</message>
<message>
<source>Minimize to tray after closing</source>
<translation>關閉後最小化到托盤</translation>
</message>
<message>
<source>PyQt-Fluent-Widgets will continue to run in the background</source>
<translation>PyQt-Fluent-Widgets 將在後臺繼續運行</translation>
</message>
<message>
<location filename="../../View/setting_interface/setting_interface.py" line="156" />
<source>Software update</source>
<translation>軟件更新</translation>
</message>
<message>
<source>Check for updates when the application starts</source>
<translation>在應用程序啟動時檢查更新</translation>
</message>
<message>
<source>The new version will be more stable and have more features</source>
<translation>新版本將更加穩定並擁有更多功能建議啟用此選項</translation>
</message>
<message>
<source>About</source>
<translation>關於</translation>
</message>
<message>
<source>Open help page</source>
<translation>打開幫助頁面</translation>
</message>
<message>
<source>Discover new features and learn useful tips about PyQt-Fluent-Widgets</source>
<translation>發現新功能並了解有關 PyQt-Fluent-Widgets 的使用技巧</translation>
</message>
<message>
<source>Provide feedback</source>
<translation>提供反饋</translation>
</message>
<message>
<source>Help us improve PyQt-Fluent-Widgets by providing feedback</source>
<translation>通過提供反饋幫助我們改進 PyQt-Fluent-Widgets</translation>
</message>
<message>
<source>Check update</source>
<translation>檢查更新</translation>
</message>
<message>
<source>Copyright</source>
<translation>版權所有</translation>
</message>
<message>
<source>Version</source>
<translation>當前版本</translation>
</message>
<message>
<source>Configuration updated successfully</source>
<translation>配置更新成功</translation>
</message>
<message>
<source>Configuration takes effect after restart</source>
<translation>配置在重啟軟件後生效</translation>
</message>
</context>
</TS> </TS>
\ No newline at end of file
...@@ -130,242 +130,27 @@ ...@@ -130,242 +130,27 @@
<translation> 文件夹从列表中移除则该文件夹不会再出现在列表中但不会被删除</translation> <translation> 文件夹从列表中移除则该文件夹不会再出现在列表中但不会被删除</translation>
</message> </message>
</context> </context>
<!-- Put the translation of your interface below -->
<context> <context>
<name>SettingInterface</name> <name>LineEditMenu</name>
<message> <message>
<source>Settings</source> <source>Cut</source>
<translation>设置</translation> <translation>剪切</translation>
</message> </message>
<message> <message>
<source>Music on this PC</source> <source>Copy</source>
<translation> PC 上的音乐</translation> <translation>复制</translation>
</message> </message>
<message> <message>
<source>Local music library</source> <source>Paste</source>
<translation>本地音乐库</translation> <translation>粘贴</translation>
</message> </message>
<message> <message>
<source>Choose folder</source> <source>Cancel</source>
<translation>选择文件夹</translation> <translation>撤回</translation>
</message>
<message>
<source>Download directory</source>
<translation>下载目录</translation>
</message>
<message>
<source>Personalization</source>
<translation>个性化</translation>
</message>
<message>
<source>Use Acrylic effect</source>
<translation>启用亚克力效果</translation>
</message>
<message>
<source>Acrylic effect has better visual experience, but it may cause the window to become stuck</source>
<translation>亚克力效果的视觉体验更好但可能导致窗口卡顿</translation>
</message>
<message>
<source>Application theme</source>
<translation>应用主题</translation>
</message>
<message>
<source>Theme color</source>
<translation>主题色</translation>
</message>
<message>
<source>Change the theme color of you application</source>
<translation>调整你的应用主题颜色</translation>
</message>
<message>
<source>Change the appearance of your application</source>
<translation>调整你的应用外观</translation>
</message>
<message>
<source>Light</source>
<translation>浅色</translation>
</message>
<message>
<source>Dark</source>
<translation>深色</translation>
</message>
<message>
<source>Use system setting</source>
<translation>跟随系统设置</translation>
</message>
<message>
<source>Interface zoom</source>
<translation>界面缩放</translation>
</message>
<message>
<source>Change the size of widgets and fonts</source>
<translation>调整组件和字体的大小</translation>
</message>
<message>
<source>Language</source>
<translation>语言</translation>
</message>
<message>
<source>Set your preferred language for UI</source>
<translation>选择界面所使用的语言</translation>
</message>
<message>
<source>Online Music</source>
<translation>在线音乐</translation>
</message>
<message>
<source>Number of online music displayed on each page</source>
<translation>每页显示的在线歌曲数量</translation>
</message>
<message>
<source>Online music quality</source>
<translation>在线播放音质</translation>
</message>
<message>
<source>Standard quality</source>
<translation>流畅</translation>
</message>
<message>
<source>High quality</source>
<translation>高品</translation>
</message>
<message>
<source>Super quality</source>
<translation>超品</translation>
</message>
<message>
<source>Lossless quality</source>
<translation>无损</translation>
</message>
<message>
<source>Online MV quality</source>
<translation>在线 MV 画质</translation>
</message>
<message>
<source>Full HD</source>
<translation>超清</translation>
</message>
<message>
<source>HD</source>
<translation>高清</translation>
</message>
<message>
<source>SD</source>
<translation>标清</translation>
</message>
<message>
<source>LD</source>
<translation>流畅</translation>
</message>
<message>
<source>Desktop Lyric</source>
<translation>桌面歌词</translation>
</message>
<message>
<source>Choose font</source>
<translation>选择字体</translation>
</message>
<message>
<source>Font</source>
<translation>字体</translation>
</message>
<message>
<source>Foreground color</source>
<translation>前景色</translation>
</message>
<message>
<source>Background color</source>
<translation>背景色</translation>
</message>
<message>
<source>Stroke color</source>
<translation>描边色</translation>
</message>
<message>
<source>Stroke size</source>
<translation>描边大小</translation>
</message>
<message>
<source>Alignment</source>
<translation>对齐方式</translation>
</message>
<message>
<source>Center aligned</source>
<translation>居中对齐</translation>
</message>
<message>
<source>Left aligned</source>
<translation>左对齐</translation>
</message>
<message>
<source>Right aligned</source>
<translation>右对齐</translation>
</message>
<message>
<source>Main Panel</source>
<translation>主面板</translation>
</message>
<message>
<source>Minimize to tray after closing</source>
<translation>关闭后最小化到托盘</translation>
</message>
<message>
<source>PyQt-Fluent-Widgets will continue to run in the background</source>
<translation>PyQt-Fluent-Widgets 将在后台继续运行</translation>
</message>
<message>
<location filename="../../View/setting_interface/setting_interface.py" line="156"/>
<source>Software update</source>
<translation>软件更新</translation>
</message>
<message>
<source>Check for updates when the application starts</source>
<translation>在应用程序启动时检查更新</translation>
</message>
<message>
<source>The new version will be more stable and have more features</source>
<translation>新版本将更加稳定并拥有更多功能建议启用此选项</translation>
</message>
<message>
<source>About</source>
<translation>关于</translation>
</message>
<message>
<source>Open help page</source>
<translation>打开帮助页面</translation>
</message>
<message>
<source>Discover new features and learn useful tips about PyQt-Fluent-Widgets</source>
<translation>发现新功能并了解有关 PyQt-Fluent-Widgets 的使用技巧</translation>
</message>
<message>
<source>Provide feedback</source>
<translation>提供反馈</translation>
</message>
<message>
<source>Help us improve PyQt-Fluent-Widgets by providing feedback</source>
<translation>通过提供反馈帮助我们改进 PyQt-Fluent-Widgets</translation>
</message>
<message>
<source>Check update</source>
<translation>检查更新</translation>
</message>
<message>
<source>Copyright</source>
<translation>版权所有</translation>
</message>
<message>
<source>Version</source>
<translation>当前版本</translation>
</message>
<message>
<source>Configuration updated successfully</source>
<translation>配置更新成功</translation>
</message> </message>
<message> <message>
<source>Configuration takes effect after restart</source> <source>Select all</source>
<translation>配置在重启软件后生效</translation> <translation>全选</translation>
</message> </message>
</context> </context>
</TS> </TS>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<svg id="" width="16" height="16" style="width:16px;height:16px;" version="1.1"
xmlns="http://www.w3.org/2000/svg" viewBox="0 0 2048 2048" enable-background="new 0 0 2048 2048"
xml:space="preserve"><path fill="#000000" d="M429.71 2048 q-85.71 0 -163.99 -34.86 q-78.29 -34.86 -137.15 -93.72 q-58.86 -58.86 -93.72 -137.14 q-34.85 -78.28 -34.85 -163.99 l0 -1188.58 q0 -85.71 34.85 -163.99 q34.85 -78.29 93.72 -137.15 q58.86 -58.86 137.15 -93.72 q78.28 -34.85 163.99 -34.85 l1188.58 0 q85.71 0 163.99 34.85 q78.29 34.85 137.14 93.72 q58.86 58.86 93.72 137.15 q34.86 78.28 34.86 163.99 l0 1188.58 q0 85.71 -34.86 163.99 q-34.86 78.29 -93.72 137.14 q-58.86 58.86 -137.14 93.72 q-78.28 34.86 -163.99 34.86 l-1188.58 0 ZM1614.86 1901.71 q57.14 0 109.14 -23.43 q52 -23.42 91.43 -62.86 q39.43 -39.43 62.86 -91.43 q23.43 -52 23.43 -109.14 l0 -1181.72 q0 -57.14 -23.43 -109.14 q-23.42 -52 -62.86 -91.43 q-39.43 -39.43 -91.43 -62.86 q-52 -23.42 -109.14 -23.42 l-1181.72 0 q-57.14 0 -109.14 23.42 q-52 23.43 -91.43 62.86 q-39.43 39.43 -62.86 91.43 q-23.42 52 -23.42 109.14 l0 1181.72 q0 57.14 23.42 109.14 q23.43 52 62.86 91.43 q39.43 39.43 91.43 62.86 q52 23.43 109.14 23.43 l1181.72 0 ZM292.57 1024 q0 -152 57.15 -285.14 q57.14 -133.14 156.57 -232.57 q99.43 -99.43 232.57 -156.57 q133.14 -57.15 285.14 -57.15 q152 0 285.14 57.15 q133.14 57.14 232.57 156.57 q99.42 99.43 156.57 232.57 q57.14 133.14 57.14 285.14 q0 152 -57.14 285.14 q-57.14 133.14 -156.57 232.57 q-99.43 99.42 -232.57 156.57 q-133.14 57.14 -285.14 57.14 q-152 0 -285.14 -57.14 q-133.14 -57.14 -232.57 -156.57 q-99.43 -99.43 -156.57 -232.57 q-57.15 -133.14 -57.15 -285.14 ZM1609.14 1024 l0 -11.43 q0 -118.86 -47.42 -223.43 q-47.43 -104.57 -128 -182.29 q-80.58 -77.72 -186.29 -122.86 q-105.72 -45.14 -223.43 -45.14 q-121.14 0 -228 45.71 q-106.86 45.71 -186.29 125.14 q-79.42 79.43 -125.14 186.29 q-45.71 106.86 -45.71 228 q0 121.14 45.71 228 q45.71 106.86 125.14 186.28 q79.43 79.43 186.29 125.14 q106.86 45.71 228 45.71 q121.14 0 228 -45.71 q106.86 -45.72 186.28 -125.14 q79.43 -79.42 125.14 -186.28 q45.71 -106.86 45.71 -228 ZM877.71 1024 q0 -30.86 11.43 -57.14 q11.43 -26.28 31.43 -46.28 q20 -20 46.28 -31.43 q26.28 -11.43 57.14 -11.43 q29.71 0 56.57 11.43 q26.86 11.43 46.86 31.43 q20 20 31.43 46.86 q11.43 26.86 11.43 56.57 q0 30.86 -11.43 57.14 q-11.43 26.29 -31.43 46.29 q-20 20 -46.29 31.43 q-26.29 11.43 -57.14 11.43 q-30.86 0 -57.72 -11.43 q-26.86 -11.43 -46.28 -30.86 q-19.43 -19.43 -30.86 -46.29 q-11.43 -26.86 -11.43 -57.71 Z"/></svg>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<svg id="" width="16" height="16" style="width:16px;height:16px;" version="1.1"
xmlns="http://www.w3.org/2000/svg" viewBox="0 0 2048 2048" enable-background="new 0 0 2048 2048"
xml:space="preserve"><path fill="#ffffff" d="M429.71 2048 q-85.71 0 -163.99 -34.86 q-78.29 -34.86 -137.15 -93.72 q-58.86 -58.86 -93.72 -137.14 q-34.85 -78.28 -34.85 -163.99 l0 -1188.58 q0 -85.71 34.85 -163.99 q34.85 -78.29 93.72 -137.15 q58.86 -58.86 137.15 -93.72 q78.28 -34.85 163.99 -34.85 l1188.58 0 q85.71 0 163.99 34.85 q78.29 34.85 137.14 93.72 q58.86 58.86 93.72 137.15 q34.86 78.28 34.86 163.99 l0 1188.58 q0 85.71 -34.86 163.99 q-34.86 78.29 -93.72 137.14 q-58.86 58.86 -137.14 93.72 q-78.28 34.86 -163.99 34.86 l-1188.58 0 ZM1614.86 1901.71 q57.14 0 109.14 -23.43 q52 -23.42 91.43 -62.86 q39.43 -39.43 62.86 -91.43 q23.43 -52 23.43 -109.14 l0 -1181.72 q0 -57.14 -23.43 -109.14 q-23.42 -52 -62.86 -91.43 q-39.43 -39.43 -91.43 -62.86 q-52 -23.42 -109.14 -23.42 l-1181.72 0 q-57.14 0 -109.14 23.42 q-52 23.43 -91.43 62.86 q-39.43 39.43 -62.86 91.43 q-23.42 52 -23.42 109.14 l0 1181.72 q0 57.14 23.42 109.14 q23.43 52 62.86 91.43 q39.43 39.43 91.43 62.86 q52 23.43 109.14 23.43 l1181.72 0 ZM292.57 1024 q0 -152 57.15 -285.14 q57.14 -133.14 156.57 -232.57 q99.43 -99.43 232.57 -156.57 q133.14 -57.15 285.14 -57.15 q152 0 285.14 57.15 q133.14 57.14 232.57 156.57 q99.42 99.43 156.57 232.57 q57.14 133.14 57.14 285.14 q0 152 -57.14 285.14 q-57.14 133.14 -156.57 232.57 q-99.43 99.42 -232.57 156.57 q-133.14 57.14 -285.14 57.14 q-152 0 -285.14 -57.14 q-133.14 -57.14 -232.57 -156.57 q-99.43 -99.43 -156.57 -232.57 q-57.15 -133.14 -57.15 -285.14 ZM1609.14 1024 l0 -11.43 q0 -118.86 -47.42 -223.43 q-47.43 -104.57 -128 -182.29 q-80.58 -77.72 -186.29 -122.86 q-105.72 -45.14 -223.43 -45.14 q-121.14 0 -228 45.71 q-106.86 45.71 -186.29 125.14 q-79.42 79.43 -125.14 186.29 q-45.71 106.86 -45.71 228 q0 121.14 45.71 228 q45.71 106.86 125.14 186.28 q79.43 79.43 186.29 125.14 q106.86 45.71 228 45.71 q121.14 0 228 -45.71 q106.86 -45.72 186.28 -125.14 q79.43 -79.42 125.14 -186.28 q45.71 -106.86 45.71 -228 ZM877.71 1024 q0 -30.86 11.43 -57.14 q11.43 -26.28 31.43 -46.28 q20 -20 46.28 -31.43 q26.28 -11.43 57.14 -11.43 q29.71 0 56.57 11.43 q26.86 11.43 46.86 31.43 q20 20 31.43 46.86 q11.43 26.86 11.43 56.57 q0 30.86 -11.43 57.14 q-11.43 26.29 -31.43 46.29 q-20 20 -46.29 31.43 q-26.29 11.43 -57.14 11.43 q-30.86 0 -57.72 -11.43 q-26.86 -11.43 -46.28 -30.86 q-19.43 -19.43 -30.86 -46.29 q-11.43 -26.86 -11.43 -57.71 Z"/></svg>
\ No newline at end of file
...@@ -22,7 +22,7 @@ class BasicInputInterface(GalleryInterface): ...@@ -22,7 +22,7 @@ class BasicInputInterface(GalleryInterface):
self.addExampleCard( self.addExampleCard(
self.tr('A simple button with text content'), self.tr('A simple button with text content'),
PushButton('Standard push button'), PushButton(self.tr('Standard push button')),
'https://github.com/zhiyiYo/PyQt-Fluent-Widgets/blob/master/examples/button/demo.py' 'https://github.com/zhiyiYo/PyQt-Fluent-Widgets/blob/master/examples/button/demo.py'
) )
...@@ -39,23 +39,23 @@ class BasicInputInterface(GalleryInterface): ...@@ -39,23 +39,23 @@ class BasicInputInterface(GalleryInterface):
self.addExampleCard( self.addExampleCard(
self.tr('Accent style applied to button'), self.tr('Accent style applied to button'),
PrimaryPushButton('Accent style button'), PrimaryPushButton(self.tr('Accent style button')),
'https://github.com/zhiyiYo/PyQt-Fluent-Widgets/blob/master/examples/button/demo.py' 'https://github.com/zhiyiYo/PyQt-Fluent-Widgets/blob/master/examples/button/demo.py'
) )
self.addExampleCard( self.addExampleCard(
self.tr('A hyperlink button that navigates to a URI'), self.tr('A hyperlink button that navigates to a URI'),
HyperlinkButton('http://github.com', 'GitHub home page'), HyperlinkButton('http://github.com', self.tr('GitHub home page')),
'https://github.com/zhiyiYo/PyQt-Fluent-Widgets/blob/master/examples/button/demo.py' 'https://github.com/zhiyiYo/PyQt-Fluent-Widgets/blob/master/examples/button/demo.py'
) )
self.addExampleCard( self.addExampleCard(
self.tr('A 2-state CheckBox'), self.tr('A 2-state CheckBox'),
CheckBox('Two-state CheckBox'), CheckBox(self.tr('Two-state CheckBox')),
'https://github.com/zhiyiYo/PyQt-Fluent-Widgets/blob/master/examples/check_box/demo.py' 'https://github.com/zhiyiYo/PyQt-Fluent-Widgets/blob/master/examples/check_box/demo.py'
) )
checkBox = CheckBox('Three-state CheckBox') checkBox = CheckBox(self.tr('Three-state CheckBox'))
checkBox.setTristate(True) checkBox.setTristate(True)
self.addExampleCard( self.addExampleCard(
self.tr('A 3-state CheckBox'), self.tr('A 3-state CheckBox'),
...@@ -77,9 +77,9 @@ class BasicInputInterface(GalleryInterface): ...@@ -77,9 +77,9 @@ class BasicInputInterface(GalleryInterface):
radioLayout = QVBoxLayout(radioWidget) radioLayout = QVBoxLayout(radioWidget)
radioLayout.setContentsMargins(2, 0, 0, 0) radioLayout.setContentsMargins(2, 0, 0, 0)
radioLayout.setSpacing(15) radioLayout.setSpacing(15)
radioButton1 = RadioButton('Star Platinum', radioWidget) radioButton1 = RadioButton(self.tr('Star Platinum'), radioWidget)
radioButton2 = RadioButton('Crazy Diamond', radioWidget) radioButton2 = RadioButton(self.tr('Crazy Diamond'), radioWidget)
radioButton3 = RadioButton('Soft and Wet', radioWidget) radioButton3 = RadioButton(self.tr('Soft and Wet'), radioWidget)
buttonGroup = QButtonGroup(radioWidget) buttonGroup = QButtonGroup(radioWidget)
buttonGroup.addButton(radioButton1) buttonGroup.addButton(radioButton1)
buttonGroup.addButton(radioButton2) buttonGroup.addButton(radioButton2)
...@@ -104,10 +104,16 @@ class BasicInputInterface(GalleryInterface): ...@@ -104,10 +104,16 @@ class BasicInputInterface(GalleryInterface):
'https://github.com/zhiyiYo/PyQt-Fluent-Widgets/blob/master/examples/slider/demo.py' 'https://github.com/zhiyiYo/PyQt-Fluent-Widgets/blob/master/examples/slider/demo.py'
) )
self.switchButton = SwitchButton(self.tr('Off'))
self.switchButton.checkedChanged.connect(self.onSwitchCheckedChanged)
self.addExampleCard( self.addExampleCard(
self.tr('A simple switch button'), self.tr('A simple switch button'),
SwitchButton(self.tr('Off'), self), self.switchButton,
'https://github.com/zhiyiYo/PyQt-Fluent-Widgets/blob/master/examples/switch_button/demo.py' 'https://github.com/zhiyiYo/PyQt-Fluent-Widgets/blob/master/examples/switch_button/demo.py'
) )
def onSwitchCheckedChanged(self, isChecked):
if isChecked:
self.switchButton.setText(self.tr('On'))
else:
self.switchButton.setText(self.tr('Off'))
...@@ -52,7 +52,7 @@ class DialogInterface(GalleryInterface): ...@@ -52,7 +52,7 @@ class DialogInterface(GalleryInterface):
print('Cancel button is pressed') print('Cancel button is pressed')
def showMessageDialog(self): def showMessageDialog(self):
title = self.tr('This is a frameless message dialog') title = self.tr('This is a message dialog with mask')
content = self.tr( content = self.tr(
"If the content of the message box is veeeeeeeeeeeeeeeeeeeeeeeeeery long, it will automatically wrap like this.") "If the content of the message box is veeeeeeeeeeeeeeeeeeeeeeeeeery long, it will automatically wrap like this.")
w = MessageBox(title, content, self.window()) w = MessageBox(title, content, self.window())
......
...@@ -4,7 +4,7 @@ from PyQt5.QtGui import QDesktopServices ...@@ -4,7 +4,7 @@ from PyQt5.QtGui import QDesktopServices
from PyQt5.QtWidgets import QWidget, QLabel, QVBoxLayout, QHBoxLayout, QFrame from PyQt5.QtWidgets import QWidget, QLabel, QVBoxLayout, QHBoxLayout, QFrame
from qfluentwidgets import (ScrollArea, PushButton, ToolButton, FluentIcon, from qfluentwidgets import (ScrollArea, PushButton, ToolButton, FluentIcon,
isDarkTheme, IconWidget, Theme) isDarkTheme, IconWidget, Theme, ToolTipFilter)
from ..common.icon import Icon from ..common.icon import Icon
from ..common.config import cfg, FEEDBACK_URL, DOCUMENT_URL, EXAMPLE_URL from ..common.config import cfg, FEEDBACK_URL, DOCUMENT_URL, EXAMPLE_URL
...@@ -48,6 +48,11 @@ class ToolBar(QWidget): ...@@ -48,6 +48,11 @@ class ToolBar(QWidget):
self.buttonLayout.addWidget(self.feedbackButton, 0, Qt.AlignRight) self.buttonLayout.addWidget(self.feedbackButton, 0, Qt.AlignRight)
self.buttonLayout.setAlignment(Qt.AlignVCenter | Qt.AlignLeft) self.buttonLayout.setAlignment(Qt.AlignVCenter | Qt.AlignLeft)
self.themeButton.installEventFilter(ToolTipFilter(self.themeButton))
self.feedbackButton.installEventFilter(ToolTipFilter(self.feedbackButton))
self.themeButton.setToolTip(self.tr('Toggle theme'))
self.feedbackButton.setToolTip(self.tr('Send feedback'))
self.titleLabel.setObjectName('titleLabel') self.titleLabel.setObjectName('titleLabel')
self.subtitleLabel.setObjectName('subtitleLabel') self.subtitleLabel.setObjectName('subtitleLabel')
......
# coding: utf-8 # coding: utf-8
from PyQt5.QtCore import Qt, pyqtSignal from PyQt5.QtCore import Qt, pyqtSignal, QEasingCurve
from PyQt5.QtGui import QIcon from PyQt5.QtGui import QIcon
from PyQt5.QtWidgets import QApplication, QStackedWidget, QHBoxLayout, QFrame, QWidget from PyQt5.QtWidgets import QApplication, QHBoxLayout, QFrame, QWidget
from qfluentwidgets import (NavigationInterface, NavigationItemPostion, MessageBox, from qfluentwidgets import (NavigationInterface, NavigationItemPostion, MessageBox,
isDarkTheme) isDarkTheme, PopUpAniStackedWidget)
from qfluentwidgets import FluentIcon as FIF from qfluentwidgets import FluentIcon as FIF
from qframelesswindow import FramelessWindow from qframelesswindow import FramelessWindow
...@@ -29,7 +29,7 @@ class StackedWidget(QFrame): ...@@ -29,7 +29,7 @@ class StackedWidget(QFrame):
def __init__(self, parent=None): def __init__(self, parent=None):
super().__init__(parent=parent) super().__init__(parent=parent)
self.hBoxLayout = QHBoxLayout(self) self.hBoxLayout = QHBoxLayout(self)
self.view = QStackedWidget(self) self.view = PopUpAniStackedWidget(self)
self.hBoxLayout.setContentsMargins(0, 0, 0, 0) self.hBoxLayout.setContentsMargins(0, 0, 0, 0)
self.hBoxLayout.addWidget(self.view) self.hBoxLayout.addWidget(self.view)
...@@ -41,11 +41,14 @@ class StackedWidget(QFrame): ...@@ -41,11 +41,14 @@ class StackedWidget(QFrame):
""" add widget to view """ """ add widget to view """
self.view.addWidget(widget) self.view.addWidget(widget)
def setCurrentWidget(self, widget): def setCurrentWidget(self, widget, popOut=False):
self.view.setCurrentWidget(widget) if not popOut:
self.view.setCurrentWidget(widget, duration=300)
else:
self.view.setCurrentWidget(widget, True, False, 200, QEasingCurve.InQuad)
def setCurrentIndex(self, index): def setCurrentIndex(self, index, popOut=False):
self.view.setCurrentIndex(index) self.setCurrentWidget(self.view.widget(index), popOut)
class MainWindow(FramelessWindow): class MainWindow(FramelessWindow):
...@@ -122,49 +125,49 @@ class MainWindow(FramelessWindow): ...@@ -122,49 +125,49 @@ class MainWindow(FramelessWindow):
routeKey=self.basicInputInterface.objectName(), routeKey=self.basicInputInterface.objectName(),
icon=Icon.CHECKBOX, icon=Icon.CHECKBOX,
text=self.tr('Basic input'), text=self.tr('Basic input'),
onClick=lambda: self.switchTo(self.basicInputInterface), onClick=lambda t: self.switchTo(self.basicInputInterface, t),
position=NavigationItemPostion.SCROLL position=NavigationItemPostion.SCROLL
) )
self.navigationInterface.addItem( self.navigationInterface.addItem(
routeKey=self.dialogInterface.objectName(), routeKey=self.dialogInterface.objectName(),
icon=Icon.MESSAGE, icon=Icon.MESSAGE,
text=self.tr('Dialogs'), text=self.tr('Dialogs'),
onClick=lambda: self.switchTo(self.dialogInterface), onClick=lambda t: self.switchTo(self.dialogInterface, t),
position=NavigationItemPostion.SCROLL position=NavigationItemPostion.SCROLL
) )
self.navigationInterface.addItem( self.navigationInterface.addItem(
routeKey=self.layoutInterface.objectName(), routeKey=self.layoutInterface.objectName(),
icon=Icon.LAYOUT, icon=Icon.LAYOUT,
text=self.tr('Layout'), text=self.tr('Layout'),
onClick=lambda: self.switchTo(self.layoutInterface), onClick=lambda t: self.switchTo(self.layoutInterface, t),
position=NavigationItemPostion.SCROLL position=NavigationItemPostion.SCROLL
) )
self.navigationInterface.addItem( self.navigationInterface.addItem(
routeKey=self.menuInterface.objectName(), routeKey=self.menuInterface.objectName(),
icon=Icon.MENU, icon=Icon.MENU,
text=self.tr('Menus'), text=self.tr('Menus'),
onClick=lambda: self.switchTo(self.menuInterface), onClick=lambda t: self.switchTo(self.menuInterface, t),
position=NavigationItemPostion.SCROLL position=NavigationItemPostion.SCROLL
) )
self.navigationInterface.addItem( self.navigationInterface.addItem(
routeKey=self.materialInterface.objectName(), routeKey=self.materialInterface.objectName(),
icon=FIF.PALETTE, icon=FIF.PALETTE,
text=self.tr('Material'), text=self.tr('Material'),
onClick=lambda: self.switchTo(self.materialInterface), onClick=lambda t: self.switchTo(self.materialInterface, t),
position=NavigationItemPostion.SCROLL position=NavigationItemPostion.SCROLL
) )
self.navigationInterface.addItem( self.navigationInterface.addItem(
routeKey=self.scrollInterface.objectName(), routeKey=self.scrollInterface.objectName(),
icon=Icon.SCROLL, icon=Icon.SCROLL,
text=self.tr('Scrolling'), text=self.tr('Scrolling'),
onClick=lambda: self.switchTo(self.scrollInterface), onClick=lambda t: self.switchTo(self.scrollInterface, t),
position=NavigationItemPostion.SCROLL position=NavigationItemPostion.SCROLL
) )
self.navigationInterface.addItem( self.navigationInterface.addItem(
routeKey=self.statusInfoInterface.objectName(), routeKey=self.statusInfoInterface.objectName(),
icon=Icon.CHAT, icon=Icon.CHAT,
text=self.tr('Status & info'), text=self.tr('Status & info'),
onClick=lambda: self.switchTo(self.statusInfoInterface), onClick=lambda t: self.switchTo(self.statusInfoInterface, t),
position=NavigationItemPostion.SCROLL position=NavigationItemPostion.SCROLL
) )
...@@ -180,7 +183,7 @@ class MainWindow(FramelessWindow): ...@@ -180,7 +183,7 @@ class MainWindow(FramelessWindow):
routeKey=self.settingInterface.objectName(), routeKey=self.settingInterface.objectName(),
icon=FIF.SETTING, icon=FIF.SETTING,
text='Settings', text='Settings',
onClick=lambda: self.switchTo(self.settingInterface), onClick=lambda t: self.switchTo(self.settingInterface, t),
position=NavigationItemPostion.BOTTOM position=NavigationItemPostion.BOTTOM
) )
...@@ -213,8 +216,8 @@ class MainWindow(FramelessWindow): ...@@ -213,8 +216,8 @@ class MainWindow(FramelessWindow):
with open(f'app/resource/qss/{color}/main_window.qss', encoding='utf-8') as f: with open(f'app/resource/qss/{color}/main_window.qss', encoding='utf-8') as f:
self.setStyleSheet(f.read()) self.setStyleSheet(f.read())
def switchTo(self, widget): def switchTo(self, widget, triggerByUser=True):
self.stackWidget.setCurrentWidget(widget) self.stackWidget.setCurrentWidget(widget, not triggerByUser)
def resizeEvent(self, e): def resizeEvent(self, e):
self.titleBar.move(46, 0) self.titleBar.move(46, 0)
......
...@@ -5,6 +5,7 @@ from qfluentwidgets import FluentIcon as FIF ...@@ -5,6 +5,7 @@ from qfluentwidgets import FluentIcon as FIF
from .gallery_interface import GalleryInterface from .gallery_interface import GalleryInterface
from ..common.translator import Translator from ..common.translator import Translator
from ..common.config import cfg
class MaterialInterface(GalleryInterface): class MaterialInterface(GalleryInterface):
...@@ -13,18 +14,25 @@ class MaterialInterface(GalleryInterface): ...@@ -13,18 +14,25 @@ class MaterialInterface(GalleryInterface):
def __init__(self, parent=None): def __init__(self, parent=None):
t = Translator() t = Translator()
super().__init__( super().__init__(
title=t.menus, title=t.material,
subtitle='qfluentwidgets.components.widgets', subtitle='qfluentwidgets.components.widgets',
parent=parent parent=parent
) )
label = AcrylicLabel(15, QColor(105, 114, 168, 102)) self.label = AcrylicLabel(
label.setImage('app/resource/images/chidanta.jpg') cfg.get(cfg.blurRadius), QColor(105, 114, 168, 102))
label.setMaximumSize(787, 579) self.label.setImage('app/resource/images/chidanta.jpg')
label.setMinimumSize(197, 145) self.label.setMaximumSize(787, 579)
self.label.setMinimumSize(197, 145)
cfg.blurRadius.valueChanged.connect(self.onBlurRadiusChanged)
self.addExampleCard( self.addExampleCard(
self.tr('Acrylic label'), self.tr('Acrylic label'),
label, self.label,
'https://github.com/zhiyiYo/PyQt-Fluent-Widgets/blob/master/examples/acrylic_label/demo.py', 'https://github.com/zhiyiYo/PyQt-Fluent-Widgets/blob/master/examples/acrylic_label/demo.py',
stretch=1 stretch=1
) )
def onBlurRadiusChanged(self, radius: int):
self.label.blurRadius = radius
self.label.setImage('app/resource/images/chidanta.jpg')
...@@ -19,7 +19,7 @@ class MenuInterface(GalleryInterface): ...@@ -19,7 +19,7 @@ class MenuInterface(GalleryInterface):
parent=parent parent=parent
) )
button = PushButton('Show menu') button = PushButton(self.tr('Show menu'))
button.clicked.connect(lambda: self.createMenu( button.clicked.connect(lambda: self.createMenu(
button.mapToGlobal(QPoint()) + QPoint(button.width()+5, -100))) button.mapToGlobal(QPoint()) + QPoint(button.width()+5, -100)))
...@@ -33,35 +33,37 @@ class MenuInterface(GalleryInterface): ...@@ -33,35 +33,37 @@ class MenuInterface(GalleryInterface):
menu = RoundMenu(parent=self) menu = RoundMenu(parent=self)
# add actions # add actions
menu.addAction(QAction(FIF.COPY.icon(), 'Copy')) menu.addAction(QAction(FIF.COPY.icon(), self.tr('Copy')))
menu.addAction(QAction(FIF.CUT.icon(), 'Cut')) menu.addAction(QAction(FIF.CUT.icon(), self.tr('Cut')))
# add sub menu # add sub menu
submenu = RoundMenu("Add to", self) submenu = RoundMenu(self.tr("Add to"), self)
submenu.setIcon(FIF.ADD.icon()) submenu.setIcon(FIF.ADD.icon())
submenu.addActions([ submenu.addActions([
QAction(FIF.VIDEO.icon(), 'Video'), QAction(FIF.VIDEO.icon(), self.tr('Video')),
QAction(FIF.MUSIC.icon(), 'Music'), QAction(FIF.MUSIC.icon(), self.tr('Music')),
]) ])
menu.addMenu(submenu) menu.addMenu(submenu)
# add actions # add actions
menu.addActions([ menu.addActions([
QAction(FIF.PASTE.icon(), 'Paste'), QAction(FIF.PASTE.icon(), self.tr('Paste')),
QAction(FIF.CANCEL.icon(), 'Undo') QAction(FIF.CANCEL.icon(), self.tr('Undo'))
]) ])
# add separator # add separator
menu.addSeparator() menu.addSeparator()
menu.addAction(QAction(f'Select all')) menu.addAction(QAction(self.tr('Select all')))
# insert actions # insert actions
menu.insertAction( menu.insertAction(
menu.menuActions()[-1], QAction(FIF.SETTING.icon(), 'Settings')) menu.menuActions()[-1], QAction(FIF.SETTING.icon(), self.tr('Settings')))
menu.insertActions( menu.insertActions(
menu.menuActions()[-1], menu.menuActions()[-1],
[QAction(FIF.HELP.icon(), 'Help'), QAction( [
FIF.FEEDBACK.icon(), 'Feedback')] QAction(FIF.HELP.icon(), self.tr('Help')),
QAction(FIF.FEEDBACK.icon(), self.tr('Feedback'))
]
) )
# show menu # show menu
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
from PyQt5.QtCore import Qt, QEasingCurve from PyQt5.QtCore import Qt, QEasingCurve
from PyQt5.QtGui import QPixmap from PyQt5.QtGui import QPixmap
from PyQt5.QtWidgets import QWidget, QLabel from PyQt5.QtWidgets import QWidget, QLabel
from qfluentwidgets import ScrollArea, SmoothScrollArea from qfluentwidgets import ScrollArea, SmoothScrollArea, ToolTipFilter
from .gallery_interface import GalleryInterface from .gallery_interface import GalleryInterface
from ..common.translator import Translator from ..common.translator import Translator
...@@ -24,10 +24,13 @@ class ScrollInterface(GalleryInterface): ...@@ -24,10 +24,13 @@ class ScrollInterface(GalleryInterface):
label.setPixmap(QPixmap("app/resource/images/chidanta2.jpg").scaled( label.setPixmap(QPixmap("app/resource/images/chidanta2.jpg").scaled(
775, 1229, Qt.KeepAspectRatio, Qt.SmoothTransformation 775, 1229, Qt.KeepAspectRatio, Qt.SmoothTransformation
)) ))
label.installEventFilter(ToolTipFilter(label, showDelay=500))
label.setToolTip(self.tr('Chitanda Eru is too hot 🥵'))
label.setToolTipDuration(2000)
w.horizontalScrollBar().setValue(0) w.horizontalScrollBar().setValue(0)
w.setWidget(label) w.setWidget(label)
w.setFixedHeight(400) w.setFixedSize(780, 420)
w.setObjectName('imageViewer') w.setObjectName('imageViewer')
self.addExampleCard( self.addExampleCard(
......
...@@ -3,12 +3,13 @@ from qfluentwidgets import (SettingCardGroup, SwitchSettingCard, FolderListSetti ...@@ -3,12 +3,13 @@ from qfluentwidgets import (SettingCardGroup, SwitchSettingCard, FolderListSetti
OptionsSettingCard, PushSettingCard, OptionsSettingCard, PushSettingCard,
HyperlinkCard, PrimaryPushSettingCard, ScrollArea, HyperlinkCard, PrimaryPushSettingCard, ScrollArea,
ComboBoxSettingCard, ExpandLayout, Theme, ToastToolTip, CustomColorSettingCard, ComboBoxSettingCard, ExpandLayout, Theme, ToastToolTip, CustomColorSettingCard,
setTheme, setThemeColor) setTheme, setThemeColor, RangeSettingCard)
from qfluentwidgets import FluentIcon as FIF from qfluentwidgets import FluentIcon as FIF
from PyQt5.QtCore import Qt, pyqtSignal, QUrl, QStandardPaths from PyQt5.QtCore import Qt, pyqtSignal, QUrl, QStandardPaths
from PyQt5.QtGui import QDesktopServices from PyQt5.QtGui import QDesktopServices
from PyQt5.QtWidgets import QWidget, QLabel, QFileDialog from PyQt5.QtWidgets import QWidget, QLabel, QFileDialog
from ..common.icon import Icon
from ..common.config import cfg, HELP_URL, FEEDBACK_URL, AUTHOR, VERSION, YEAR from ..common.config import cfg, HELP_URL, FEEDBACK_URL, AUTHOR, VERSION, YEAR
...@@ -35,7 +36,8 @@ class SettingInterface(ScrollArea): ...@@ -35,7 +36,8 @@ class SettingInterface(ScrollArea):
self.musicFolderCard = FolderListSettingCard( self.musicFolderCard = FolderListSettingCard(
cfg.musicFolders, cfg.musicFolders,
self.tr("Local music library"), self.tr("Local music library"),
directory=QStandardPaths.writableLocation(QStandardPaths.MusicLocation), directory=QStandardPaths.writableLocation(
QStandardPaths.MusicLocation),
parent=self.musicInThisPCGroup parent=self.musicInThisPCGroup
) )
self.downloadFolderCard = PushSettingCard( self.downloadFolderCard = PushSettingCard(
...@@ -47,7 +49,8 @@ class SettingInterface(ScrollArea): ...@@ -47,7 +49,8 @@ class SettingInterface(ScrollArea):
) )
# personalization # personalization
self.personalGroup = SettingCardGroup(self.tr('Personalization'), self.scrollWidget) self.personalGroup = SettingCardGroup(
self.tr('Personalization'), self.scrollWidget)
self.themeCard = OptionsSettingCard( self.themeCard = OptionsSettingCard(
cfg.themeMode, cfg.themeMode,
FIF.BRUSH, FIF.BRUSH,
...@@ -59,7 +62,7 @@ class SettingInterface(ScrollArea): ...@@ -59,7 +62,7 @@ class SettingInterface(ScrollArea):
], ],
parent=self.personalGroup parent=self.personalGroup
) )
self.themeColorCard=CustomColorSettingCard( self.themeColorCard = CustomColorSettingCard(
cfg.themeColor, cfg.themeColor,
FIF.PALETTE, FIF.PALETTE,
self.tr('Theme color'), self.tr('Theme color'),
...@@ -86,8 +89,20 @@ class SettingInterface(ScrollArea): ...@@ -86,8 +89,20 @@ class SettingInterface(ScrollArea):
parent=self.personalGroup parent=self.personalGroup
) )
# material
self.materialGroup = SettingCardGroup(
self.tr('Material'), self.scrollWidget)
self.blurRadiusCard = RangeSettingCard(
cfg.blurRadius,
Icon.ALBUM,
self.tr('Acrylic blur radius'),
self.tr('The greater the radius, the more blurred the image'),
self.materialGroup
)
# update software # update software
self.updateSoftwareGroup = SettingCardGroup(self.tr("Software update"), self.scrollWidget) self.updateSoftwareGroup = SettingCardGroup(
self.tr("Software update"), self.scrollWidget)
self.updateOnStartUpCard = SwitchSettingCard( self.updateOnStartUpCard = SwitchSettingCard(
FIF.UPDATE, FIF.UPDATE,
self.tr('Check for updates when the application starts'), self.tr('Check for updates when the application starts'),
...@@ -103,7 +118,8 @@ class SettingInterface(ScrollArea): ...@@ -103,7 +118,8 @@ class SettingInterface(ScrollArea):
self.tr('Open help page'), self.tr('Open help page'),
FIF.HELP, FIF.HELP,
self.tr('Help'), self.tr('Help'),
self.tr('Discover new features and learn useful tips about PyQt-Fluent-Widgets'), self.tr(
'Discover new features and learn useful tips about PyQt-Fluent-Widgets'),
self.aboutGroup self.aboutGroup
) )
self.feedbackCard = PrimaryPushSettingCard( self.feedbackCard = PrimaryPushSettingCard(
...@@ -150,6 +166,8 @@ class SettingInterface(ScrollArea): ...@@ -150,6 +166,8 @@ class SettingInterface(ScrollArea):
self.personalGroup.addSettingCard(self.zoomCard) self.personalGroup.addSettingCard(self.zoomCard)
self.personalGroup.addSettingCard(self.languageCard) self.personalGroup.addSettingCard(self.languageCard)
self.materialGroup.addSettingCard(self.blurRadiusCard)
self.updateSoftwareGroup.addSettingCard(self.updateOnStartUpCard) self.updateSoftwareGroup.addSettingCard(self.updateOnStartUpCard)
self.aboutGroup.addSettingCard(self.helpCard) self.aboutGroup.addSettingCard(self.helpCard)
...@@ -161,6 +179,7 @@ class SettingInterface(ScrollArea): ...@@ -161,6 +179,7 @@ class SettingInterface(ScrollArea):
self.expandLayout.setContentsMargins(36, 10, 36, 0) self.expandLayout.setContentsMargins(36, 10, 36, 0)
self.expandLayout.addWidget(self.musicInThisPCGroup) self.expandLayout.addWidget(self.musicInThisPCGroup)
self.expandLayout.addWidget(self.personalGroup) self.expandLayout.addWidget(self.personalGroup)
self.expandLayout.addWidget(self.materialGroup)
self.expandLayout.addWidget(self.updateSoftwareGroup) self.expandLayout.addWidget(self.updateSoftwareGroup)
self.expandLayout.addWidget(self.aboutGroup) self.expandLayout.addWidget(self.aboutGroup)
......
...@@ -20,7 +20,7 @@ class StatusInfoInterface(GalleryInterface): ...@@ -20,7 +20,7 @@ class StatusInfoInterface(GalleryInterface):
) )
self.stateTooltip = None self.stateTooltip = None
button = PushButton('Show StateToolTip') button = PushButton(self.tr('Show StateToolTip'))
button.clicked.connect(self.onStateButtonClicked) button.clicked.connect(self.onStateButtonClicked)
self.addExampleCard( self.addExampleCard(
self.tr('State tool tip'), self.tr('State tool tip'),
...@@ -28,9 +28,9 @@ class StatusInfoInterface(GalleryInterface): ...@@ -28,9 +28,9 @@ class StatusInfoInterface(GalleryInterface):
'https://github.com/zhiyiYo/PyQt-Fluent-Widgets/blob/master/examples/status_tool_tip/demo.py' 'https://github.com/zhiyiYo/PyQt-Fluent-Widgets/blob/master/examples/status_tool_tip/demo.py'
) )
button = PushButton('Button with a simple ToolTip') button = PushButton(self.tr('Button with a simple ToolTip'))
button.installEventFilter(ToolTipFilter(button)) button.installEventFilter(ToolTipFilter(button))
button.setToolTip('Simple ToolTip') button.setToolTip(self.tr('Simple ToolTip'))
self.addExampleCard( self.addExampleCard(
self.tr('State tool tip'), self.tr('State tool tip'),
button, button,
...@@ -52,12 +52,12 @@ class StatusInfoInterface(GalleryInterface): ...@@ -52,12 +52,12 @@ class StatusInfoInterface(GalleryInterface):
def onStateButtonClicked(self): def onStateButtonClicked(self):
if self.stateTooltip: if self.stateTooltip:
self.stateTooltip.setContent('The model training is complete! 😆') self.stateTooltip.setContent(self.tr('The model training is complete!') +' 😆')
self.stateTooltip.setState(True) self.stateTooltip.setState(True)
self.stateTooltip = None self.stateTooltip = None
else: else:
self.stateTooltip = StateToolTip( self.stateTooltip = StateToolTip(
'Training model', 'Please wait patiently', self.window()) self.tr('Training model'), self.tr('Please wait patiently'), self.window())
self.sender().setText(self.tr('Hide state tool tip')) self.sender().setText(self.tr('Hide state tool tip'))
self.stateTooltip.move(self.stateTooltip.getSuitablePos()) self.stateTooltip.move(self.stateTooltip.getSuitablePos())
self.stateTooltip.show() self.stateTooltip.show()
...@@ -26,14 +26,18 @@ app.setAttribute(Qt.AA_DontCreateNativeWidgetSiblings) ...@@ -26,14 +26,18 @@ app.setAttribute(Qt.AA_DontCreateNativeWidgetSiblings)
# internationalization # internationalization
translator = QTranslator() translator = QTranslator()
galleryTranslator = QTranslator()
language = cfg.get(cfg.language) language = cfg.get(cfg.language)
if language == Language.AUTO: if language == Language.AUTO:
translator.load(QLocale.system(), "app/resource/i18n/qfluentwidgets_") translator.load(QLocale.system(), "app/resource/i18n/qfluentwidgets_")
galleryTranslator.load(QLocale.system(), "app/resource/i18n/gallery_")
elif language != Language.ENGLISH: elif language != Language.ENGLISH:
translator.load(f"app/resource/i18n/qfluentwidgets_{language.value}.qm") translator.load(f"app/resource/i18n/qfluentwidgets_{language.value}.qm")
galleryTranslator.load(f"app/resource/i18n/gallery_{language.value}.qm")
app.installTranslator(translator) app.installTranslator(translator)
app.installTranslator(galleryTranslator)
# create main window # create main window
w = MainWindow() w = MainWindow()
......
SOURCES += app/view/main_window/main_window.py \
app/view/setting_interface.py \
app/view/basic_input_interface.py \
app/view/dialog_interface.py \
app/view/menu_interface.py \
app/view/gallery_interface.py \
app/view/status_info_interface.py \
app/view/scroll_interface.py \
app/common/translator.py \
app/view/material_interface.py \
app/view/layout_interface.py \
TRANSLATIONS += app/resource/i18n/gallery_zh.ts \
app/resource/i18n/gallery_hk.ts
...@@ -398,9 +398,9 @@ class NavigationHistory(QObject): ...@@ -398,9 +398,9 @@ class NavigationHistory(QObject):
self.history.pop() self.history.pop()
if self.history: if self.history:
self.items[self.history[-1]].clicked.emit() self.items[self.history[-1]].clicked.emit(False)
else: else:
if self.defaultRouteKey is not None: if self.defaultRouteKey is not None:
self.items[self.defaultRouteKey].clicked.emit() self.items[self.defaultRouteKey].clicked.emit(False)
self.emptyChanged.emit(True) self.emptyChanged.emit(True)
...@@ -14,7 +14,7 @@ from ...common.icon import FluentIcon as FIF ...@@ -14,7 +14,7 @@ from ...common.icon import FluentIcon as FIF
class NavigationWidget(QWidget): class NavigationWidget(QWidget):
""" Navigation widget """ """ Navigation widget """
clicked = pyqtSignal() clicked = pyqtSignal(bool) # whether triggered by the user
EXPAND_WIDTH = 312 EXPAND_WIDTH = 312
def __init__(self, isSelectable: bool, parent=None): def __init__(self, isSelectable: bool, parent=None):
...@@ -42,7 +42,7 @@ class NavigationWidget(QWidget): ...@@ -42,7 +42,7 @@ class NavigationWidget(QWidget):
def mouseReleaseEvent(self, e): def mouseReleaseEvent(self, e):
self.isPressed = False self.isPressed = False
self.update() self.update()
self.clicked.emit() self.clicked.emit(True)
def setCompacted(self, isCompacted: bool): def setCompacted(self, isCompacted: bool):
""" set whether the widget is compacted """ """ set whether the widget is compacted """
......
...@@ -394,6 +394,6 @@ class ComboBoxSettingCard(SettingCard): ...@@ -394,6 +394,6 @@ class ComboBoxSettingCard(SettingCard):
def _onCurrentTextChanged(self, text): def _onCurrentTextChanged(self, text):
qconfig.set(self.configItem, self.textToOption[text]) qconfig.set(self.configItem, self.textToOption[text])
def setValue(self, text): def setValue(self, value):
self.comboBox.setCurrentText(text) self.comboBox.setCurrentText(self.optionToText[value])
qconfig.set(self.configItem, self.textToOption[text]) qconfig.set(self.configItem, value)
\ No newline at end of file \ No newline at end of file
...@@ -130,9 +130,6 @@ class AcrylicLabel(QLabel): ...@@ -130,9 +130,6 @@ class AcrylicLabel(QLabel):
def setImage(self, imagePath: str): def setImage(self, imagePath: str):
""" set the image to be blurred """ """ set the image to be blurred """
if imagePath == self.imagePath:
return
self.imagePath = imagePath self.imagePath = imagePath
self.blurThread.blur(imagePath, self.blurRadius, self.maxBlurSize) self.blurThread.blur(imagePath, self.blurRadius, self.maxBlurSize)
......
# coding:utf-8 # coding:utf-8
from typing import List from typing import List
from dataclasses import dataclass
from PyQt5.QtCore import (QAbstractAnimation, QEasingCurve, from PyQt5.QtCore import (QAbstractAnimation, QEasingCurve,
QParallelAnimationGroup, QPoint, QPropertyAnimation, QParallelAnimationGroup, QPoint, QPropertyAnimation,
...@@ -54,6 +55,15 @@ class OpacityAniStackedWidget(QStackedWidget): ...@@ -54,6 +55,15 @@ class OpacityAniStackedWidget(QStackedWidget):
super().setCurrentIndex(self.__nextIndex) super().setCurrentIndex(self.__nextIndex)
@dataclass
class PopUpAniInfo:
""" Pop up ani info """
widget: QWidget
deltaX: int
deltaY: int
ani: QPropertyAnimation
class PopUpAniStackedWidget(QStackedWidget): class PopUpAniStackedWidget(QStackedWidget):
""" Stacked widget with pop up animation """ """ Stacked widget with pop up animation """
...@@ -62,13 +72,11 @@ class PopUpAniStackedWidget(QStackedWidget): ...@@ -62,13 +72,11 @@ class PopUpAniStackedWidget(QStackedWidget):
def __init__(self, parent=None): def __init__(self, parent=None):
super().__init__(parent) super().__init__(parent)
self.__widgetAni_list = [] self.aniInfos = [] # type: List[PopUpAniInfo]
self.__nextIndex = None self._nextIndex = None
self.__currentAniGroup = None self._ani = None
self.__previousWidget = None
self.__previousIndex = 0
def addWidget(self, widget, deltaX: int = 0, deltaY: int = 22, isNeedOpacityAni=False): def addWidget(self, widget, deltaX=0, deltaY=76):
""" add widget to window """ add widget to window
Parameters Parameters
...@@ -81,25 +89,17 @@ class PopUpAniStackedWidget(QStackedWidget): ...@@ -81,25 +89,17 @@ class PopUpAniStackedWidget(QStackedWidget):
deltaY: int deltaY: int
the y-axis offset from the beginning to the end of animation the y-axis offset from the beginning to the end of animation
isNeedOpacityAni: bool
need fade in and fade out animation or not
""" """
super().addWidget(widget) super().addWidget(widget)
popUpAni = QPropertyAnimation(widget, b'pos') self.aniInfos.append(PopUpAniInfo(
aniGroup = QParallelAnimationGroup(self) widget=widget,
aniGroup.addAnimation(popUpAni) deltaX=deltaX,
self.__widgetAni_list.append({ deltaY=deltaY,
'widget': widget, ani=QPropertyAnimation(widget, b'pos'),
'deltaX': deltaX, ))
'deltaY': deltaY,
'aniGroup': aniGroup, def setCurrentIndex(self, index: int, needPopOut: bool = False, showNextWidgetDirectly: bool = True,
'popUpAni': popUpAni,
'isNeedOpacityAni': isNeedOpacityAni
})
def setCurrentIndex(self, index: int, isNeedPopOut: bool = False, isShowNextWidgetDirectly: bool = True,
duration: int = 250, easingCurve=QEasingCurve.OutQuad): duration: int = 250, easingCurve=QEasingCurve.OutQuad):
""" set current window to display """ set current window to display
...@@ -111,7 +111,7 @@ class PopUpAniStackedWidget(QStackedWidget): ...@@ -111,7 +111,7 @@ class PopUpAniStackedWidget(QStackedWidget):
isNeedPopOut: bool isNeedPopOut: bool
need pop up animation or not need pop up animation or not
isShowNextWidgetDirectly: bool showNextWidgetDirectly: bool
whether to show next widget directly when animation started whether to show next widget directly when animation started
duration: int duration: int
...@@ -126,66 +126,38 @@ class PopUpAniStackedWidget(QStackedWidget): ...@@ -126,66 +126,38 @@ class PopUpAniStackedWidget(QStackedWidget):
if index == self.currentIndex(): if index == self.currentIndex():
return return
if self.__currentAniGroup and self.__currentAniGroup.state() == QAbstractAnimation.Running: if self._ani and self._ani.state() == QAbstractAnimation.Running:
return return
# get the index of widget to be displayed # get the index of widget to be displayed
self.__nextIndex = index self._nextIndex = index
self.__previousIndex = self.currentIndex()
self.__previousWidget = self.currentWidget()
self.__isNeedPopOut = isNeedPopOut
# get animation # get animation
nextWidgetAni_dict = self.__widgetAni_list[index] nextAniInfo = self.aniInfos[index]
currentWidgetAni_dict = self.__widgetAni_list[self.currentIndex()] currentAniInfo = self.aniInfos[self.currentIndex()]
self.__currentWidget = self.currentWidget() # type:QWidget
self.__nextWidget = nextWidgetAni_dict['widget'] # type:QWidget currentWidget = self.currentWidget()
currentPopUpAni = currentWidgetAni_dict['popUpAni'] nextWidget = nextAniInfo.widget
nextPopUpAni = nextWidgetAni_dict['popUpAni'] ani = currentAniInfo.ani if needPopOut else nextAniInfo.ani
self.__isNextWidgetNeedOpAni = nextWidgetAni_dict['isNeedOpacityAni'] self._ani = ani
self.__isCurrentWidgetNeedOpAni = currentWidgetAni_dict['isNeedOpacityAni']
self.__currentAniGroup = currentWidgetAni_dict[ if needPopOut:
'aniGroup'] if isNeedPopOut else nextWidgetAni_dict['aniGroup'] # type:QParallelAnimationGroup deltaX, deltaY = currentAniInfo.deltaX, currentAniInfo.deltaY
pos = currentWidget.pos() + QPoint(deltaX, deltaY)
# set opacity animation self.__setAnimation(ani, currentWidget.pos(), pos, duration, easingCurve)
if self.__isNextWidgetNeedOpAni: nextWidget.setVisible(showNextWidgetDirectly)
nextOpacityEffect = QGraphicsOpacityEffect(self)
self.__nextOpacityAni = QPropertyAnimation(
nextOpacityEffect, b'opacity')
self.__nextWidget.setGraphicsEffect(nextOpacityEffect)
self.__currentAniGroup.addAnimation(self.__nextOpacityAni)
self.__setAnimation(self.__nextOpacityAni, 0, 1, duration)
if self.__isCurrentWidgetNeedOpAni:
currentOpacityEffect = QGraphicsOpacityEffect(self)
self.__currentOpacityAni = QPropertyAnimation(
currentOpacityEffect, b'opacity')
self.__currentWidget.setGraphicsEffect(currentOpacityEffect)
self.__currentAniGroup.addAnimation(self.__currentOpacityAni)
self.__setAnimation(self.__currentOpacityAni, 1, 0, duration)
if isNeedPopOut:
deltaX = currentWidgetAni_dict['deltaX']
deltaY = currentWidgetAni_dict['deltaY']
pos = self.__currentWidget.pos() + QPoint(deltaX, deltaY)
self.__setAnimation(
currentPopUpAni, self.__currentWidget.pos(), pos, duration, easingCurve)
self.__nextWidget.setVisible(isShowNextWidgetDirectly)
else: else:
deltaX = nextWidgetAni_dict['deltaX'] deltaX, deltaY = nextAniInfo.deltaX, nextAniInfo.deltaY
deltaY = nextWidgetAni_dict['deltaY'] pos = nextWidget.pos() + QPoint(deltaX, deltaY)
pos = self.__nextWidget.pos() + QPoint(deltaX, deltaY) self.__setAnimation(ani, pos, QPoint(nextWidget.x(), self.y()), duration, easingCurve)
self.__setAnimation(nextPopUpAni, pos,
QPoint(self.__nextWidget.x(), self.y()), duration, easingCurve)
super().setCurrentIndex(index) super().setCurrentIndex(index)
# start animation # start animation
self.__currentAniGroup.finished.connect(self.__aniFinishedSlot) ani.finished.connect(self.__onAniFinished)
self.__currentAniGroup.start() ani.start()
self.aniStart.emit() self.aniStart.emit()
def setCurrentWidget(self, widget, isNeedPopOut: bool = False, isShowNextWidgetDirectly: bool = True, def setCurrentWidget(self, widget, needPopOut: bool = False, showNextWidgetDirectly: bool = True,
duration: int = 250, easingCurve=QEasingCurve.OutQuad): duration: int = 250, easingCurve=QEasingCurve.OutQuad):
""" set currect widget """ set currect widget
...@@ -197,7 +169,7 @@ class PopUpAniStackedWidget(QStackedWidget): ...@@ -197,7 +169,7 @@ class PopUpAniStackedWidget(QStackedWidget):
isNeedPopOut: bool isNeedPopOut: bool
need pop up animation or not need pop up animation or not
isShowNextWidgetDirectly: bool showNextWidgetDirectly: bool
whether to show next widget directly when animation started whether to show next widget directly when animation started
duration: int duration: int
...@@ -206,34 +178,18 @@ class PopUpAniStackedWidget(QStackedWidget): ...@@ -206,34 +178,18 @@ class PopUpAniStackedWidget(QStackedWidget):
easingCurve: QEasingCurve easingCurve: QEasingCurve
the interpolation mode of animation the interpolation mode of animation
""" """
self.setCurrentIndex(self.indexOf( self.setCurrentIndex(
widget), isNeedPopOut, isShowNextWidgetDirectly, duration, easingCurve) self.indexOf(widget), needPopOut, showNextWidgetDirectly, duration, easingCurve)
def __setAnimation(self, ani: QPropertyAnimation, startValue, endValue, duration, easingCurve=QEasingCurve.Linear): def __setAnimation(self, ani, startValue, endValue, duration, easingCurve=QEasingCurve.Linear):
""" set the config of animation """ """ set the config of animation """
ani.setEasingCurve(easingCurve) ani.setEasingCurve(easingCurve)
ani.setStartValue(startValue) ani.setStartValue(startValue)
ani.setEndValue(endValue) ani.setEndValue(endValue)
ani.setDuration(duration) ani.setDuration(duration)
def __aniFinishedSlot(self): def __onAniFinished(self):
""" animation finished slot """ """ animation finished slot """
# cancel previously opacity effects to prevent conflicts with the opacity effects of widgets self._ani.disconnect()
if self.__isCurrentWidgetNeedOpAni: super().setCurrentIndex(self._nextIndex)
self.__currentWidget.setGraphicsEffect(None)
self.__currentAniGroup.removeAnimation(self.__currentOpacityAni)
if self.__isNextWidgetNeedOpAni:
self.__nextWidget.setGraphicsEffect(None)
self.__currentAniGroup.removeAnimation(self.__nextOpacityAni)
self.__currentAniGroup.disconnect()
super().setCurrentIndex(self.__nextIndex)
self.aniFinished.emit() self.aniFinished.emit()
@property
def previousWidget(self):
return self.__previousWidget
@property
def previousIndex(self):
return self.__previousIndex
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册