mirror of
https://github.com/zhuzichu520/FluentUI.git
synced 2024-11-28 14:16:39 +08:00
Compare commits
No commits in common. "da9f63eb248d8948fa5044f84eeb0648910329f2" and "d222cb640c2b9c1715391e3be61fba5c96abed87" have entirely different histories.
da9f63eb24
...
d222cb640c
@ -177,6 +177,7 @@
|
||||
<file>qml/window/SingleInstanceWindow.qml</file>
|
||||
<file>qml/window/SingleTaskWindow.qml</file>
|
||||
<file>qml/window/StandardWindow.qml</file>
|
||||
<file>res/image/bg_scenic.png</file>
|
||||
<file>res/image/image_1.jpg</file>
|
||||
<file>qml/window/PageWindow.qml</file>
|
||||
<file>qml/page/T_StaggeredLayout.qml</file>
|
||||
@ -208,6 +209,5 @@
|
||||
<file>qml/global/GlobalModel.qml</file>
|
||||
<file>qml/page/T_Sheet.qml</file>
|
||||
<file>qml/page/T_GroupBox.qml</file>
|
||||
<file>res/image/bg_scenic.jpg</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
@ -53,7 +53,7 @@ FluScrollablePage{
|
||||
Image {
|
||||
id:image
|
||||
asynchronous: true
|
||||
source: "qrc:/example/res/image/bg_scenic.jpg"
|
||||
source: "qrc:/example/res/image/bg_scenic.png"
|
||||
anchors.fill: parent
|
||||
sourceSize: Qt.size(2*width,2*height)
|
||||
}
|
||||
|
@ -344,7 +344,7 @@ FluWindow {
|
||||
id:callable
|
||||
property bool silent: true
|
||||
onStart: {
|
||||
console.debug("start check update...")
|
||||
console.debug("satrt check update...")
|
||||
}
|
||||
onFinish: {
|
||||
console.debug("check update finish")
|
||||
|
@ -16,7 +16,7 @@ FluWindow {
|
||||
onInitArgument:
|
||||
(arg)=>{
|
||||
window.title = arg.title
|
||||
loader.setSource(arg.url,{animationEnabled:false})
|
||||
loader.setSource( arg.url,{animDisabled:true})
|
||||
}
|
||||
FluLoader{
|
||||
id: loader
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 854 KiB |
BIN
example/res/image/bg_scenic.png
Normal file
BIN
example/res/image/bg_scenic.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.1 MiB |
@ -94,7 +94,7 @@ int main(int argc, char *argv[])
|
||||
engine.load(url);
|
||||
const int exec = QGuiApplication::exec();
|
||||
if (exec == 931) {
|
||||
QProcess::startDetached(qApp->applicationFilePath(), qApp->arguments());
|
||||
QProcess::startDetached(qApp->applicationFilePath(), QStringList());
|
||||
}
|
||||
return exec;
|
||||
}
|
||||
|
@ -45,9 +45,6 @@ FluFrameless::FluFrameless(QQuickItem *parent)
|
||||
}
|
||||
|
||||
FluFrameless::~FluFrameless(){
|
||||
}
|
||||
|
||||
void FluFrameless::onDestruction(){
|
||||
qApp->removeNativeEventFilter(this);
|
||||
}
|
||||
|
||||
@ -145,6 +142,7 @@ bool FluFrameless::nativeEventFilter(const QByteArray &eventType, void *message,
|
||||
}else{
|
||||
offsetSize = 1;
|
||||
}
|
||||
_maximizeButton->setProperty("hover",false);
|
||||
if(!isCompositionEnabled()){
|
||||
offsetSize = 0;
|
||||
}
|
||||
@ -154,7 +152,6 @@ bool FluFrameless::nativeEventFilter(const QByteArray &eventType, void *message,
|
||||
clientRect->left = originalLeft + offsetSize;
|
||||
clientRect->right = originalRight - offsetSize;
|
||||
}
|
||||
_setMaximizeHovered(false);
|
||||
*result = WVR_REDRAW;
|
||||
return true;
|
||||
}else if(uMsg == WM_NCHITTEST){
|
||||
@ -162,10 +159,10 @@ bool FluFrameless::nativeEventFilter(const QByteArray &eventType, void *message,
|
||||
if (*result == HTNOWHERE) {
|
||||
*result = HTZOOM;
|
||||
}
|
||||
_setMaximizeHovered(true);
|
||||
_setMaximizeHoverd(true);
|
||||
return true;
|
||||
}
|
||||
_setMaximizeHovered(false);
|
||||
_setMaximizeHoverd(false);
|
||||
_setMaximizePressed(false);
|
||||
*result = 0;
|
||||
POINT nativeGlobalPos{GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam)};
|
||||
@ -344,7 +341,7 @@ void FluFrameless::_setMaximizePressed(bool val){
|
||||
_maximizeButton->setProperty("down",val);
|
||||
}
|
||||
|
||||
void FluFrameless::_setMaximizeHovered(bool val){
|
||||
void FluFrameless::_setMaximizeHoverd(bool val){
|
||||
_maximizeButton->setProperty("hover",val);
|
||||
}
|
||||
|
||||
|
@ -36,7 +36,6 @@ public:
|
||||
Q_INVOKABLE void showMinimized();
|
||||
Q_INVOKABLE void showNormal();
|
||||
Q_INVOKABLE void setHitTestVisible(QQuickItem*);
|
||||
Q_INVOKABLE void onDestruction();
|
||||
protected:
|
||||
bool eventFilter(QObject *obj, QEvent *event) override;
|
||||
private:
|
||||
@ -49,7 +48,7 @@ private:
|
||||
bool _hitAppBar();
|
||||
bool _hitMaximizeButton();
|
||||
void _setMaximizePressed(bool val);
|
||||
void _setMaximizeHovered(bool val);
|
||||
void _setMaximizeHoverd(bool val);
|
||||
private:
|
||||
qint64 _current;
|
||||
int _edges = 0;
|
||||
|
@ -76,7 +76,7 @@ QObject* FluTreeModel::getRow(int row){
|
||||
return _rows.at(row);
|
||||
}
|
||||
|
||||
void FluTreeModel::checkRow(int row,bool checked){
|
||||
void FluTreeModel::checkRow(int row,bool chekced){
|
||||
auto itemData = _rows.at(row);
|
||||
if(itemData->hasChildren()){
|
||||
QList<FluNode*> stack = itemData->_children;
|
||||
@ -85,7 +85,7 @@ void FluTreeModel::checkRow(int row,bool checked){
|
||||
auto item = stack.at(stack.count()-1);
|
||||
stack.pop_back();
|
||||
if(!item->hasChildren()){
|
||||
item->_checked = checked;
|
||||
item->_checked = chekced;
|
||||
}
|
||||
QList<FluNode*> children = item->_children;
|
||||
if(!children.isEmpty()){
|
||||
@ -96,10 +96,10 @@ void FluTreeModel::checkRow(int row,bool checked){
|
||||
}
|
||||
}
|
||||
}else{
|
||||
if(itemData->_checked == checked){
|
||||
if(itemData->_checked == chekced){
|
||||
return;
|
||||
}
|
||||
itemData->_checked = checked;
|
||||
itemData->_checked = chekced;
|
||||
}
|
||||
Q_EMIT layoutChanged(QList<QPersistentModelIndex>(),QAbstractItemModel::VerticalSortHint);
|
||||
QList<FluNode*> data;
|
||||
@ -201,7 +201,7 @@ void FluTreeModel::expand(int row){
|
||||
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){
|
||||
return;
|
||||
}
|
||||
|
@ -102,10 +102,10 @@ public:
|
||||
Q_INVOKABLE void setDataSource(QList<QMap<QString,QVariant>> data);
|
||||
Q_INVOKABLE void collapse(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 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 void allExpand();
|
||||
Q_INVOKABLE void allCollapse();
|
||||
|
@ -224,7 +224,7 @@ Item {
|
||||
onReleased: {
|
||||
loader_container.sourceComponent = undefined
|
||||
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.dragIndex = -1
|
||||
|
@ -103,9 +103,6 @@ Window {
|
||||
frameless.setHitTestVisible(appBar.layoutMacosButtons)
|
||||
frameless.setHitTestVisible(appBar.layoutStandardbuttons)
|
||||
}
|
||||
Component.onDestruction: {
|
||||
frameless.onDestruction()
|
||||
}
|
||||
}
|
||||
Component{
|
||||
id:com_background
|
||||
|
@ -224,7 +224,7 @@ Item {
|
||||
onReleased: {
|
||||
loader_container.sourceComponent = undefined
|
||||
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.dragIndex = -1
|
||||
|
@ -102,9 +102,6 @@ Window {
|
||||
frameless.setHitTestVisible(appBar.layoutMacosButtons)
|
||||
frameless.setHitTestVisible(appBar.layoutStandardbuttons)
|
||||
}
|
||||
Component.onDestruction: {
|
||||
frameless.onDestruction()
|
||||
}
|
||||
}
|
||||
Component{
|
||||
id:com_background
|
||||
|
Loading…
Reference in New Issue
Block a user