mirror of
https://github.com/zhuzichu520/FluentUI.git
synced 2025-07-06 10:45:26 +08:00
update
This commit is contained in:
@ -32,6 +32,7 @@ FluTheme::FluTheme(QObject *parent) : QObject{parent} {
|
||||
connect(&_watcher, &QFileSystemWatcher::fileChanged, this, [=](const QString &path){
|
||||
Q_EMIT desktopImagePathChanged();
|
||||
});
|
||||
connect(this, &FluTheme::blurBehindWindowEnabledChanged, this, [=] {checkUpdateDesktopImage();});
|
||||
startTimer(1000);
|
||||
}
|
||||
|
||||
@ -74,6 +75,9 @@ bool FluTheme::dark() const {
|
||||
}
|
||||
|
||||
void FluTheme::checkUpdateDesktopImage(){
|
||||
if(!_blurBehindWindowEnabled){
|
||||
return;
|
||||
}
|
||||
QThreadPool::globalInstance()->start([=]() {
|
||||
_mutex.lock();
|
||||
auto path = FluTools::getInstance()->getWallpaperFilePath();
|
||||
@ -90,7 +94,5 @@ void FluTheme::checkUpdateDesktopImage(){
|
||||
|
||||
void FluTheme::timerEvent(QTimerEvent *event)
|
||||
{
|
||||
if(_blurBehindWindowEnabled){
|
||||
checkUpdateDesktopImage();
|
||||
}
|
||||
checkUpdateDesktopImage();
|
||||
}
|
||||
|
@ -57,12 +57,12 @@ Item {
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
color: {
|
||||
if(item_mouse.pressed){
|
||||
return FluTheme.dark ? Qt.rgba(150/255,150/255,150/235,1) : Qt.rgba(134/255,134/255,134/235,1)
|
||||
return FluTheme.dark ? Qt.rgba(150/255,150/255,150/255,1) : Qt.rgba(134/255,134/255,134/255,1)
|
||||
}
|
||||
if(item_mouse.containsMouse){
|
||||
return FluTheme.dark ? Qt.rgba(204/255,204/255,204/235,1) : Qt.rgba(92/255,92/255,92/235,1)
|
||||
return FluTheme.dark ? Qt.rgba(204/255,204/255,204/255,1) : Qt.rgba(92/255,92/255,92/255,1)
|
||||
}
|
||||
return FluTheme.dark ? Qt.rgba(255/255,255/255,255/235,1) : Qt.rgba(26/255,26/255,26/235,1)
|
||||
return FluTheme.dark ? Qt.rgba(255/255,255/255,255/255,1) : Qt.rgba(26/255,26/255,26/255,1)
|
||||
}
|
||||
MouseArea{
|
||||
id:item_mouse
|
||||
|
@ -8,11 +8,11 @@ Item{
|
||||
id:control
|
||||
default property alias content: container.data
|
||||
property int statusMode: FluStatusLayoutType.Loading
|
||||
property string loadingText:"正在加载..."
|
||||
property string emptyText: "空空如也"
|
||||
property string errorText: "页面出错了.."
|
||||
property string errorButtonText: "重新加载"
|
||||
property color color: FluTheme.dark ? Window.active ? Qt.rgba(38/255,44/255,54/255,1) : Qt.rgba(39/255,39/255,39/255,1) : Qt.rgba(251/255,251/255,253/255,1)
|
||||
property string loadingText: qsTr("Loading...")
|
||||
property string emptyText: qsTr("Empty")
|
||||
property string errorText: qsTr("Error")
|
||||
property string errorButtonText: qsTr("Reload")
|
||||
property color color: Qt.rgba(0,0,0,0)
|
||||
signal errorClicked
|
||||
property Component loadingItem : com_loading
|
||||
property Component emptyItem : com_empty
|
||||
|
@ -57,12 +57,12 @@ Item {
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
color: {
|
||||
if(item_mouse.pressed){
|
||||
return FluTheme.dark ? Qt.rgba(150/255,150/255,150/235,1) : Qt.rgba(134/255,134/255,134/235,1)
|
||||
return FluTheme.dark ? Qt.rgba(150/255,150/255,150/255,1) : Qt.rgba(134/255,134/255,134/255,1)
|
||||
}
|
||||
if(item_mouse.containsMouse){
|
||||
return FluTheme.dark ? Qt.rgba(204/255,204/255,204/235,1) : Qt.rgba(92/255,92/255,92/235,1)
|
||||
return FluTheme.dark ? Qt.rgba(204/255,204/255,204/255,1) : Qt.rgba(92/255,92/255,92/255,1)
|
||||
}
|
||||
return FluTheme.dark ? Qt.rgba(255/255,255/255,255/235,1) : Qt.rgba(26/255,26/255,26/235,1)
|
||||
return FluTheme.dark ? Qt.rgba(255/255,255/255,255/255,1) : Qt.rgba(26/255,26/255,26/255,1)
|
||||
}
|
||||
MouseArea{
|
||||
id:item_mouse
|
||||
|
@ -7,11 +7,11 @@ Item{
|
||||
id:control
|
||||
default property alias content: container.data
|
||||
property int statusMode: FluStatusLayoutType.Loading
|
||||
property string loadingText:"正在加载..."
|
||||
property string emptyText: "空空如也"
|
||||
property string errorText: "页面出错了.."
|
||||
property string errorButtonText: "重新加载"
|
||||
property color color: FluTheme.dark ? Window.active ? Qt.rgba(38/255,44/255,54/255,1) : Qt.rgba(39/255,39/255,39/255,1) : Qt.rgba(251/255,251/255,253/255,1)
|
||||
property string loadingText: qsTr("Loading...")
|
||||
property string emptyText: qsTr("Empty")
|
||||
property string errorText: qsTr("Error")
|
||||
property string errorButtonText: qsTr("Reload")
|
||||
property color color: Qt.rgba(0,0,0,0)
|
||||
signal errorClicked
|
||||
property Component loadingItem : com_loading
|
||||
property Component emptyItem : com_empty
|
||||
|
@ -232,6 +232,33 @@
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>FluStatusLayout</name>
|
||||
<message>
|
||||
<location filename="Qt5/imports/FluentUI/Controls/FluStatusLayout.qml" line="11"/>
|
||||
<location filename="Qt6/imports/FluentUI/Controls/FluStatusLayout.qml" line="10"/>
|
||||
<source>Loading...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Qt5/imports/FluentUI/Controls/FluStatusLayout.qml" line="12"/>
|
||||
<location filename="Qt6/imports/FluentUI/Controls/FluStatusLayout.qml" line="11"/>
|
||||
<source>Empty</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Qt5/imports/FluentUI/Controls/FluStatusLayout.qml" line="13"/>
|
||||
<location filename="Qt6/imports/FluentUI/Controls/FluStatusLayout.qml" line="12"/>
|
||||
<source>Error</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Qt5/imports/FluentUI/Controls/FluStatusLayout.qml" line="14"/>
|
||||
<location filename="Qt6/imports/FluentUI/Controls/FluStatusLayout.qml" line="13"/>
|
||||
<source>Reload</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>FluTextBoxMenu</name>
|
||||
<message>
|
||||
|
@ -232,6 +232,33 @@
|
||||
<translation type="unfinished">重置</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>FluStatusLayout</name>
|
||||
<message>
|
||||
<location filename="Qt5/imports/FluentUI/Controls/FluStatusLayout.qml" line="11"/>
|
||||
<location filename="Qt6/imports/FluentUI/Controls/FluStatusLayout.qml" line="10"/>
|
||||
<source>Loading...</source>
|
||||
<translation type="unfinished">加载中...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Qt5/imports/FluentUI/Controls/FluStatusLayout.qml" line="12"/>
|
||||
<location filename="Qt6/imports/FluentUI/Controls/FluStatusLayout.qml" line="11"/>
|
||||
<source>Empty</source>
|
||||
<translation type="unfinished">空空如也</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Qt5/imports/FluentUI/Controls/FluStatusLayout.qml" line="13"/>
|
||||
<location filename="Qt6/imports/FluentUI/Controls/FluStatusLayout.qml" line="12"/>
|
||||
<source>Error</source>
|
||||
<translation type="unfinished">似乎出了点问题</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Qt5/imports/FluentUI/Controls/FluStatusLayout.qml" line="14"/>
|
||||
<location filename="Qt6/imports/FluentUI/Controls/FluStatusLayout.qml" line="13"/>
|
||||
<source>Reload</source>
|
||||
<translation type="unfinished">重新加载</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>FluTextBoxMenu</name>
|
||||
<message>
|
||||
|
Reference in New Issue
Block a user