Compare commits

..

No commits in common. "da9f63eb248d8948fa5044f84eeb0648910329f2" and "d222cb640c2b9c1715391e3be61fba5c96abed87" have entirely different histories.

15 changed files with 19 additions and 29 deletions

View File

@ -177,6 +177,7 @@
<file>qml/window/SingleInstanceWindow.qml</file> <file>qml/window/SingleInstanceWindow.qml</file>
<file>qml/window/SingleTaskWindow.qml</file> <file>qml/window/SingleTaskWindow.qml</file>
<file>qml/window/StandardWindow.qml</file> <file>qml/window/StandardWindow.qml</file>
<file>res/image/bg_scenic.png</file>
<file>res/image/image_1.jpg</file> <file>res/image/image_1.jpg</file>
<file>qml/window/PageWindow.qml</file> <file>qml/window/PageWindow.qml</file>
<file>qml/page/T_StaggeredLayout.qml</file> <file>qml/page/T_StaggeredLayout.qml</file>
@ -208,6 +209,5 @@
<file>qml/global/GlobalModel.qml</file> <file>qml/global/GlobalModel.qml</file>
<file>qml/page/T_Sheet.qml</file> <file>qml/page/T_Sheet.qml</file>
<file>qml/page/T_GroupBox.qml</file> <file>qml/page/T_GroupBox.qml</file>
<file>res/image/bg_scenic.jpg</file>
</qresource> </qresource>
</RCC> </RCC>

View File

@ -53,7 +53,7 @@ FluScrollablePage{
Image { Image {
id:image id:image
asynchronous: true asynchronous: true
source: "qrc:/example/res/image/bg_scenic.jpg" source: "qrc:/example/res/image/bg_scenic.png"
anchors.fill: parent anchors.fill: parent
sourceSize: Qt.size(2*width,2*height) sourceSize: Qt.size(2*width,2*height)
} }

View File

@ -344,7 +344,7 @@ FluWindow {
id:callable id:callable
property bool silent: true property bool silent: true
onStart: { onStart: {
console.debug("start check update...") console.debug("satrt check update...")
} }
onFinish: { onFinish: {
console.debug("check update finish") console.debug("check update finish")

View File

@ -16,7 +16,7 @@ FluWindow {
onInitArgument: onInitArgument:
(arg)=>{ (arg)=>{
window.title = arg.title window.title = arg.title
loader.setSource(arg.url,{animationEnabled:false}) loader.setSource( arg.url,{animDisabled:true})
} }
FluLoader{ FluLoader{
id: loader id: loader

Binary file not shown.

Before

Width:  |  Height:  |  Size: 854 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 MiB

View File

@ -94,7 +94,7 @@ int main(int argc, char *argv[])
engine.load(url); engine.load(url);
const int exec = QGuiApplication::exec(); const int exec = QGuiApplication::exec();
if (exec == 931) { if (exec == 931) {
QProcess::startDetached(qApp->applicationFilePath(), qApp->arguments()); QProcess::startDetached(qApp->applicationFilePath(), QStringList());
} }
return exec; return exec;
} }

View File

@ -45,9 +45,6 @@ FluFrameless::FluFrameless(QQuickItem *parent)
} }
FluFrameless::~FluFrameless(){ FluFrameless::~FluFrameless(){
}
void FluFrameless::onDestruction(){
qApp->removeNativeEventFilter(this); qApp->removeNativeEventFilter(this);
} }
@ -145,6 +142,7 @@ bool FluFrameless::nativeEventFilter(const QByteArray &eventType, void *message,
}else{ }else{
offsetSize = 1; offsetSize = 1;
} }
_maximizeButton->setProperty("hover",false);
if(!isCompositionEnabled()){ if(!isCompositionEnabled()){
offsetSize = 0; offsetSize = 0;
} }
@ -154,7 +152,6 @@ bool FluFrameless::nativeEventFilter(const QByteArray &eventType, void *message,
clientRect->left = originalLeft + offsetSize; clientRect->left = originalLeft + offsetSize;
clientRect->right = originalRight - offsetSize; clientRect->right = originalRight - offsetSize;
} }
_setMaximizeHovered(false);
*result = WVR_REDRAW; *result = WVR_REDRAW;
return true; return true;
}else if(uMsg == WM_NCHITTEST){ }else if(uMsg == WM_NCHITTEST){
@ -162,10 +159,10 @@ bool FluFrameless::nativeEventFilter(const QByteArray &eventType, void *message,
if (*result == HTNOWHERE) { if (*result == HTNOWHERE) {
*result = HTZOOM; *result = HTZOOM;
} }
_setMaximizeHovered(true); _setMaximizeHoverd(true);
return true; return true;
} }
_setMaximizeHovered(false); _setMaximizeHoverd(false);
_setMaximizePressed(false); _setMaximizePressed(false);
*result = 0; *result = 0;
POINT nativeGlobalPos{GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam)}; POINT nativeGlobalPos{GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam)};
@ -344,7 +341,7 @@ void FluFrameless::_setMaximizePressed(bool val){
_maximizeButton->setProperty("down",val); _maximizeButton->setProperty("down",val);
} }
void FluFrameless::_setMaximizeHovered(bool val){ void FluFrameless::_setMaximizeHoverd(bool val){
_maximizeButton->setProperty("hover",val); _maximizeButton->setProperty("hover",val);
} }

View File

@ -36,7 +36,6 @@ public:
Q_INVOKABLE void showMinimized(); Q_INVOKABLE void showMinimized();
Q_INVOKABLE void showNormal(); Q_INVOKABLE void showNormal();
Q_INVOKABLE void setHitTestVisible(QQuickItem*); Q_INVOKABLE void setHitTestVisible(QQuickItem*);
Q_INVOKABLE void onDestruction();
protected: protected:
bool eventFilter(QObject *obj, QEvent *event) override; bool eventFilter(QObject *obj, QEvent *event) override;
private: private:
@ -49,7 +48,7 @@ private:
bool _hitAppBar(); bool _hitAppBar();
bool _hitMaximizeButton(); bool _hitMaximizeButton();
void _setMaximizePressed(bool val); void _setMaximizePressed(bool val);
void _setMaximizeHovered(bool val); void _setMaximizeHoverd(bool val);
private: private:
qint64 _current; qint64 _current;
int _edges = 0; int _edges = 0;

View File

@ -76,7 +76,7 @@ QObject* FluTreeModel::getRow(int row){
return _rows.at(row); return _rows.at(row);
} }
void FluTreeModel::checkRow(int row,bool checked){ void FluTreeModel::checkRow(int row,bool chekced){
auto itemData = _rows.at(row); auto itemData = _rows.at(row);
if(itemData->hasChildren()){ if(itemData->hasChildren()){
QList<FluNode*> stack = itemData->_children; QList<FluNode*> stack = itemData->_children;
@ -85,7 +85,7 @@ void FluTreeModel::checkRow(int row,bool checked){
auto item = stack.at(stack.count()-1); auto item = stack.at(stack.count()-1);
stack.pop_back(); stack.pop_back();
if(!item->hasChildren()){ if(!item->hasChildren()){
item->_checked = checked; item->_checked = chekced;
} }
QList<FluNode*> children = item->_children; QList<FluNode*> children = item->_children;
if(!children.isEmpty()){ if(!children.isEmpty()){
@ -96,10 +96,10 @@ void FluTreeModel::checkRow(int row,bool checked){
} }
} }
}else{ }else{
if(itemData->_checked == checked){ if(itemData->_checked == chekced){
return; return;
} }
itemData->_checked = checked; itemData->_checked = chekced;
} }
Q_EMIT layoutChanged(QList<QPersistentModelIndex>(),QAbstractItemModel::VerticalSortHint); Q_EMIT layoutChanged(QList<QPersistentModelIndex>(),QAbstractItemModel::VerticalSortHint);
QList<FluNode*> data; QList<FluNode*> data;
@ -201,7 +201,7 @@ void FluTreeModel::expand(int row){
insertRows(row+1,insertData); insertRows(row+1,insertData);
} }
void FluTreeModel::dragAndDrop(int dragIndex,int dropIndex,bool isDropTopArea){ void FluTreeModel::dragAnddrop(int dragIndex,int dropIndex,bool isDropTopArea){
if(dropIndex>_rows.count() || dropIndex<0){ if(dropIndex>_rows.count() || dropIndex<0){
return; return;
} }

View File

@ -102,10 +102,10 @@ public:
Q_INVOKABLE void setDataSource(QList<QMap<QString,QVariant>> data); Q_INVOKABLE void setDataSource(QList<QMap<QString,QVariant>> data);
Q_INVOKABLE void collapse(int row); Q_INVOKABLE void collapse(int row);
Q_INVOKABLE void expand(int row); Q_INVOKABLE void expand(int row);
Q_INVOKABLE void dragAndDrop(int dragIndex,int dropIndex,bool isDropTopArea); Q_INVOKABLE void dragAnddrop(int dragIndex,int dropIndex,bool isDropTopArea);
Q_INVOKABLE FluNode* getNode(int row); Q_INVOKABLE FluNode* getNode(int row);
Q_INVOKABLE void refreshNode(int row); Q_INVOKABLE void refreshNode(int row);
Q_INVOKABLE void checkRow(int row,bool checked); Q_INVOKABLE void checkRow(int row,bool chekced);
Q_INVOKABLE bool hitHasChildrenExpanded(int row); Q_INVOKABLE bool hitHasChildrenExpanded(int row);
Q_INVOKABLE void allExpand(); Q_INVOKABLE void allExpand();
Q_INVOKABLE void allCollapse(); Q_INVOKABLE void allCollapse();

View File

@ -224,7 +224,7 @@ Item {
onReleased: { onReleased: {
loader_container.sourceComponent = undefined loader_container.sourceComponent = undefined
if(d.dropIndex !== -1){ if(d.dropIndex !== -1){
tree_model.dragAndDrop(d.dragIndex,d.dropIndex,d.isDropTopArea) tree_model.dragAnddrop(d.dragIndex,d.dropIndex,d.isDropTopArea)
} }
d.dropIndex = -1 d.dropIndex = -1
d.dragIndex = -1 d.dragIndex = -1

View File

@ -103,9 +103,6 @@ Window {
frameless.setHitTestVisible(appBar.layoutMacosButtons) frameless.setHitTestVisible(appBar.layoutMacosButtons)
frameless.setHitTestVisible(appBar.layoutStandardbuttons) frameless.setHitTestVisible(appBar.layoutStandardbuttons)
} }
Component.onDestruction: {
frameless.onDestruction()
}
} }
Component{ Component{
id:com_background id:com_background

View File

@ -224,7 +224,7 @@ Item {
onReleased: { onReleased: {
loader_container.sourceComponent = undefined loader_container.sourceComponent = undefined
if(d.dropIndex !== -1){ if(d.dropIndex !== -1){
tree_model.dragAndDrop(d.dragIndex,d.dropIndex,d.isDropTopArea) tree_model.dragAnddrop(d.dragIndex,d.dropIndex,d.isDropTopArea)
} }
d.dropIndex = -1 d.dropIndex = -1
d.dragIndex = -1 d.dragIndex = -1

View File

@ -102,9 +102,6 @@ Window {
frameless.setHitTestVisible(appBar.layoutMacosButtons) frameless.setHitTestVisible(appBar.layoutMacosButtons)
frameless.setHitTestVisible(appBar.layoutStandardbuttons) frameless.setHitTestVisible(appBar.layoutStandardbuttons)
} }
Component.onDestruction: {
frameless.onDestruction()
}
} }
Component{ Component{
id:com_background id:com_background