mirror of
https://github.com/zhuzichu520/FluentUI.git
synced 2024-11-29 14:46:02 +08:00
Compare commits
No commits in common. "2ddb7e32902b36a60d5e4798b71e72cf31125904" and "bc4510077f04c1df8f1df64f1b3a2d2595312f3b" have entirely different histories.
2ddb7e3290
...
bc4510077f
@ -1930,6 +1930,26 @@ Some contents...</source>
|
|||||||
<source>StatusLayout</source>
|
<source>StatusLayout</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="qml/page/T_StatusLayout.qml" line="63"/>
|
||||||
|
<source>Loading...</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="qml/page/T_StatusLayout.qml" line="64"/>
|
||||||
|
<source>Empty</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="qml/page/T_StatusLayout.qml" line="65"/>
|
||||||
|
<source>The page went wrong...</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="qml/page/T_StatusLayout.qml" line="66"/>
|
||||||
|
<source>Reload</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>T_TabView</name>
|
<name>T_TabView</name>
|
||||||
|
@ -2053,20 +2053,24 @@ Some contents...</source>
|
|||||||
<translation type="unfinished">状态布局</translation>
|
<translation type="unfinished">状态布局</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
|
<location filename="qml/page/T_StatusLayout.qml" line="63"/>
|
||||||
<source>Loading...</source>
|
<source>Loading...</source>
|
||||||
<translation type="obsolete">正在加载...</translation>
|
<translation type="unfinished">正在加载...</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
|
<location filename="qml/page/T_StatusLayout.qml" line="64"/>
|
||||||
<source>Empty</source>
|
<source>Empty</source>
|
||||||
<translation type="obsolete">空空如也</translation>
|
<translation type="unfinished">空空如也</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
|
<location filename="qml/page/T_StatusLayout.qml" line="65"/>
|
||||||
<source>The page went wrong...</source>
|
<source>The page went wrong...</source>
|
||||||
<translation type="obsolete">页面出错了...</translation>
|
<translation type="unfinished">页面出错了...</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
|
<location filename="qml/page/T_StatusLayout.qml" line="66"/>
|
||||||
<source>Reload</source>
|
<source>Reload</source>
|
||||||
<translation type="obsolete">重新加载</translation>
|
<translation type="unfinished">重新加载</translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
|
@ -60,8 +60,12 @@ FluScrollablePage{
|
|||||||
FluStatusLayout{
|
FluStatusLayout{
|
||||||
id:status_view
|
id:status_view
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
loadingText: qsTr("Loading...")
|
||||||
|
emptyText: qsTr("Empty")
|
||||||
|
errorText: qsTr("The page went wrong...")
|
||||||
|
errorButtonText: qsTr("Reload")
|
||||||
onErrorClicked:{
|
onErrorClicked:{
|
||||||
status_view.statusMode = FluStatusLayoutType.Loading
|
showError("Click Reload")
|
||||||
}
|
}
|
||||||
Rectangle {
|
Rectangle {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
@ -20,7 +20,7 @@ FluWindowDialog {
|
|||||||
showError(message)
|
showError(message)
|
||||||
}
|
}
|
||||||
function onSuccess(path){
|
function onSuccess(path){
|
||||||
FluTools.showFileInFolder(path)
|
FluTools.showFileInFolder(path+"/CMakeLists.txt")
|
||||||
window.close()
|
window.close()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -97,5 +97,5 @@ void InitializrHelper::copyFile(const QString &source, const QString &dest) {
|
|||||||
copyFile(":/example/res/template/src/qml.qrc.in", projectDir.filePath("src/qml.qrc"));
|
copyFile(":/example/res/template/src/qml.qrc.in", projectDir.filePath("src/qml.qrc"));
|
||||||
copyFile(":/example/res/template/src/logo.ico.in", projectDir.filePath("src/logo.ico"));
|
copyFile(":/example/res/template/src/logo.ico.in", projectDir.filePath("src/logo.ico"));
|
||||||
copyFile(":/example/res/template/src/README.md.in", projectDir.filePath("src/README.md"));
|
copyFile(":/example/res/template/src/README.md.in", projectDir.filePath("src/README.md"));
|
||||||
return this->success(projectPath+"/CMakeLists.txt");
|
return this->success(projectPath);
|
||||||
}
|
}
|
||||||
|
@ -54,7 +54,7 @@ int main(int argc, char *argv[])
|
|||||||
QGuiApplication::setOrganizationName("ZhuZiChu");
|
QGuiApplication::setOrganizationName("ZhuZiChu");
|
||||||
QGuiApplication::setOrganizationDomain("https://zhuzichu520.github.io");
|
QGuiApplication::setOrganizationDomain("https://zhuzichu520.github.io");
|
||||||
QGuiApplication::setApplicationName("FluentUI");
|
QGuiApplication::setApplicationName("FluentUI");
|
||||||
QGuiApplication::setApplicationDisplayName("FluentUI Example");
|
QGuiApplication::setApplicationDisplayName("FluentUI Exmaple");
|
||||||
QGuiApplication::setApplicationVersion(APPLICATION_VERSION);
|
QGuiApplication::setApplicationVersion(APPLICATION_VERSION);
|
||||||
QGuiApplication::setQuitOnLastWindowClosed(false);
|
QGuiApplication::setQuitOnLastWindowClosed(false);
|
||||||
SettingsHelper::getInstance()->init(argv);
|
SettingsHelper::getInstance()->init(argv);
|
||||||
|
@ -32,7 +32,6 @@ FluTheme::FluTheme(QObject *parent) : QObject{parent} {
|
|||||||
connect(&_watcher, &QFileSystemWatcher::fileChanged, this, [=](const QString &path){
|
connect(&_watcher, &QFileSystemWatcher::fileChanged, this, [=](const QString &path){
|
||||||
Q_EMIT desktopImagePathChanged();
|
Q_EMIT desktopImagePathChanged();
|
||||||
});
|
});
|
||||||
connect(this, &FluTheme::blurBehindWindowEnabledChanged, this, [=] {checkUpdateDesktopImage();});
|
|
||||||
startTimer(1000);
|
startTimer(1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -75,9 +74,6 @@ bool FluTheme::dark() const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void FluTheme::checkUpdateDesktopImage(){
|
void FluTheme::checkUpdateDesktopImage(){
|
||||||
if(!_blurBehindWindowEnabled){
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
QThreadPool::globalInstance()->start([=]() {
|
QThreadPool::globalInstance()->start([=]() {
|
||||||
_mutex.lock();
|
_mutex.lock();
|
||||||
auto path = FluTools::getInstance()->getWallpaperFilePath();
|
auto path = FluTools::getInstance()->getWallpaperFilePath();
|
||||||
@ -94,5 +90,7 @@ void FluTheme::checkUpdateDesktopImage(){
|
|||||||
|
|
||||||
void FluTheme::timerEvent(QTimerEvent *event)
|
void FluTheme::timerEvent(QTimerEvent *event)
|
||||||
{
|
{
|
||||||
checkUpdateDesktopImage();
|
if(_blurBehindWindowEnabled){
|
||||||
|
checkUpdateDesktopImage();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -57,12 +57,12 @@ Item {
|
|||||||
Layout.alignment: Qt.AlignVCenter
|
Layout.alignment: Qt.AlignVCenter
|
||||||
color: {
|
color: {
|
||||||
if(item_mouse.pressed){
|
if(item_mouse.pressed){
|
||||||
return FluTheme.dark ? Qt.rgba(150/255,150/255,150/255,1) : Qt.rgba(134/255,134/255,134/255,1)
|
return FluTheme.dark ? Qt.rgba(150/255,150/255,150/235,1) : Qt.rgba(134/255,134/255,134/235,1)
|
||||||
}
|
}
|
||||||
if(item_mouse.containsMouse){
|
if(item_mouse.containsMouse){
|
||||||
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(204/255,204/255,204/235,1) : Qt.rgba(92/255,92/255,92/235,1)
|
||||||
}
|
}
|
||||||
return FluTheme.dark ? Qt.rgba(255/255,255/255,255/255,1) : Qt.rgba(26/255,26/255,26/255,1)
|
return FluTheme.dark ? Qt.rgba(255/255,255/255,255/235,1) : Qt.rgba(26/255,26/255,26/235,1)
|
||||||
}
|
}
|
||||||
MouseArea{
|
MouseArea{
|
||||||
id:item_mouse
|
id:item_mouse
|
||||||
|
@ -8,11 +8,11 @@ Item{
|
|||||||
id:control
|
id:control
|
||||||
default property alias content: container.data
|
default property alias content: container.data
|
||||||
property int statusMode: FluStatusLayoutType.Loading
|
property int statusMode: FluStatusLayoutType.Loading
|
||||||
property string loadingText: qsTr("Loading...")
|
property string loadingText:"正在加载..."
|
||||||
property string emptyText: qsTr("Empty")
|
property string emptyText: "空空如也"
|
||||||
property string errorText: qsTr("Error")
|
property string errorText: "页面出错了.."
|
||||||
property string errorButtonText: qsTr("Reload")
|
property string errorButtonText: "重新加载"
|
||||||
property color color: Qt.rgba(0,0,0,0)
|
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)
|
||||||
signal errorClicked
|
signal errorClicked
|
||||||
property Component loadingItem : com_loading
|
property Component loadingItem : com_loading
|
||||||
property Component emptyItem : com_empty
|
property Component emptyItem : com_empty
|
||||||
|
@ -57,12 +57,12 @@ Item {
|
|||||||
Layout.alignment: Qt.AlignVCenter
|
Layout.alignment: Qt.AlignVCenter
|
||||||
color: {
|
color: {
|
||||||
if(item_mouse.pressed){
|
if(item_mouse.pressed){
|
||||||
return FluTheme.dark ? Qt.rgba(150/255,150/255,150/255,1) : Qt.rgba(134/255,134/255,134/255,1)
|
return FluTheme.dark ? Qt.rgba(150/255,150/255,150/235,1) : Qt.rgba(134/255,134/255,134/235,1)
|
||||||
}
|
}
|
||||||
if(item_mouse.containsMouse){
|
if(item_mouse.containsMouse){
|
||||||
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(204/255,204/255,204/235,1) : Qt.rgba(92/255,92/255,92/235,1)
|
||||||
}
|
}
|
||||||
return FluTheme.dark ? Qt.rgba(255/255,255/255,255/255,1) : Qt.rgba(26/255,26/255,26/255,1)
|
return FluTheme.dark ? Qt.rgba(255/255,255/255,255/235,1) : Qt.rgba(26/255,26/255,26/235,1)
|
||||||
}
|
}
|
||||||
MouseArea{
|
MouseArea{
|
||||||
id:item_mouse
|
id:item_mouse
|
||||||
|
@ -7,11 +7,11 @@ Item{
|
|||||||
id:control
|
id:control
|
||||||
default property alias content: container.data
|
default property alias content: container.data
|
||||||
property int statusMode: FluStatusLayoutType.Loading
|
property int statusMode: FluStatusLayoutType.Loading
|
||||||
property string loadingText: qsTr("Loading...")
|
property string loadingText:"正在加载..."
|
||||||
property string emptyText: qsTr("Empty")
|
property string emptyText: "空空如也"
|
||||||
property string errorText: qsTr("Error")
|
property string errorText: "页面出错了.."
|
||||||
property string errorButtonText: qsTr("Reload")
|
property string errorButtonText: "重新加载"
|
||||||
property color color: Qt.rgba(0,0,0,0)
|
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)
|
||||||
signal errorClicked
|
signal errorClicked
|
||||||
property Component loadingItem : com_loading
|
property Component loadingItem : com_loading
|
||||||
property Component emptyItem : com_empty
|
property Component emptyItem : com_empty
|
||||||
|
@ -232,33 +232,6 @@
|
|||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</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>
|
<context>
|
||||||
<name>FluTextBoxMenu</name>
|
<name>FluTextBoxMenu</name>
|
||||||
<message>
|
<message>
|
||||||
|
@ -232,33 +232,6 @@
|
|||||||
<translation type="unfinished">重置</translation>
|
<translation type="unfinished">重置</translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</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>
|
<context>
|
||||||
<name>FluTextBoxMenu</name>
|
<name>FluTextBoxMenu</name>
|
||||||
<message>
|
<message>
|
||||||
|
Loading…
Reference in New Issue
Block a user