Compare commits
No commits in common. "d397b88892ecee300548721340a258fc70c47f3f" and "fde1b5ff3afd4dcc8a4cf1dbdb6fb39d7b23a633" have entirely different histories.
d397b88892
...
fde1b5ff3a
|
@ -407,7 +407,7 @@ FluContentPage{
|
|||
text: "Download File"
|
||||
onClicked: {
|
||||
folder_dialog.showDialog(function(path){
|
||||
FluNetwork.get("http://vjs.zencdn.net/v/oceans.mp4")
|
||||
FluNetwork.get("http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4")
|
||||
.toDownload(path)
|
||||
.bind(root)
|
||||
.go(callable_download_file)
|
||||
|
@ -421,7 +421,7 @@ FluContentPage{
|
|||
text: "Breakpoint Download File"
|
||||
onClicked: {
|
||||
folder_dialog.showDialog(function(path){
|
||||
FluNetwork.get("http://vjs.zencdn.net/v/oceans.mp4")
|
||||
FluNetwork.get("http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4")
|
||||
.toDownload(path,true)
|
||||
.bind(root)
|
||||
.go(callable_breakpoint_download_file)
|
||||
|
@ -521,7 +521,7 @@ FluContentPage{
|
|||
property var onSelectListener
|
||||
id: folder_dialog
|
||||
folder: StandardPaths.standardLocations(StandardPaths.DownloadLocation)[0]
|
||||
currentFile: StandardPaths.standardLocations(StandardPaths.DownloadLocation)[0]+"/oceans.mp4"
|
||||
currentFile: StandardPaths.standardLocations(StandardPaths.DownloadLocation)[0]+"/big_buck_bunny.mp4"
|
||||
fileMode: FileDialog.SaveFile
|
||||
onAccepted: {
|
||||
folder_dialog.onSelectListener(FluTools.toLocalPath(folder_dialog.currentFile))
|
||||
|
|
|
@ -408,7 +408,7 @@ FluContentPage{
|
|||
text: "Download File"
|
||||
onClicked: {
|
||||
folder_dialog.showDialog(function(path){
|
||||
FluNetwork.get("http://vjs.zencdn.net/v/oceans.mp4")
|
||||
FluNetwork.get("http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4")
|
||||
.toDownload(path)
|
||||
.bind(root)
|
||||
.go(callable_download_file)
|
||||
|
@ -422,7 +422,7 @@ FluContentPage{
|
|||
text: "Breakpoint Download File"
|
||||
onClicked: {
|
||||
folder_dialog.showDialog(function(path){
|
||||
FluNetwork.get("http://vjs.zencdn.net/v/oceans.mp4")
|
||||
FluNetwork.get("http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4")
|
||||
.toDownload(path,true)
|
||||
.bind(root)
|
||||
.go(callable_breakpoint_download_file)
|
||||
|
@ -522,7 +522,7 @@ FluContentPage{
|
|||
property var onSelectListener
|
||||
id: folder_dialog
|
||||
folder: StandardPaths.standardLocations(StandardPaths.DownloadLocation)[0]
|
||||
currentFile: StandardPaths.standardLocations(StandardPaths.DownloadLocation)[0]+"/oceans.mp4"
|
||||
currentFile: StandardPaths.standardLocations(StandardPaths.DownloadLocation)[0]+"/big_buck_bunny.mp4"
|
||||
fileMode: FileDialog.SaveFile
|
||||
onAccepted: {
|
||||
folder_dialog.onSelectListener(FluTools.toLocalPath(folder_dialog.currentFile))
|
||||
|
|
|
@ -16,6 +16,15 @@ static inline QByteArray qtNativeEventType()
|
|||
return result;
|
||||
}
|
||||
|
||||
static inline bool isTaskbarAutoHide() {
|
||||
APPBARDATA appBarData;
|
||||
memset(&appBarData, 0, sizeof(appBarData));
|
||||
appBarData.cbSize = sizeof(appBarData);
|
||||
appBarData.hWnd = FindWindowW(L"Shell_TrayWnd", NULL);
|
||||
LPARAM lParam = SHAppBarMessage(ABM_GETSTATE, &appBarData);
|
||||
return lParam & ABS_AUTOHIDE;
|
||||
}
|
||||
|
||||
static inline QColor getAccentColor(){
|
||||
typedef HRESULT (WINAPI* DwmGetColorizationColorPtr)(DWORD* pcrColorization,BOOL* pfOpaqueBlend);
|
||||
HMODULE module = LoadLibraryW(L"dwmapi.dll");
|
||||
|
@ -117,6 +126,9 @@ bool FramelessEventFilter::nativeEventFilter(const QByteArray &eventType, void *
|
|||
bool isMax = IsZoomed(hwnd);
|
||||
if(isMax){
|
||||
_helper->setOriginalPos(QPoint(originalLeft,originalTop));
|
||||
if(isTaskbarAutoHide()){
|
||||
clientRect->bottom -= 1;
|
||||
}
|
||||
offsetTop = 0;
|
||||
}else{
|
||||
_helper->setOriginalPos({});
|
||||
|
@ -136,8 +148,7 @@ bool FramelessEventFilter::nativeEventFilter(const QByteArray &eventType, void *
|
|||
}
|
||||
return true;
|
||||
}
|
||||
*result = HTCLIENT;
|
||||
return true;
|
||||
return false;
|
||||
}else if(uMsg == WM_NCLBUTTONDBLCLK || uMsg == WM_NCLBUTTONDOWN){
|
||||
if(FluTools::getInstance()->isWindows11OrGreater() && _helper->hoverMaxBtn() && _helper->resizeable()){
|
||||
QMouseEvent event = QMouseEvent(QEvent::MouseButtonPress, QPoint(), QPoint(), Qt::LeftButton, Qt::LeftButton, Qt::NoModifier);
|
||||
|
|
|
@ -162,7 +162,7 @@ QString NetworkParams::buildCacheKey(){
|
|||
|
||||
void NetworkParams::go(NetworkCallable* callable){
|
||||
QJSValueList data;
|
||||
data<<qjsEngine(callable)->newQObject(this);
|
||||
data<<qjsEngine(FluNetwork::getInstance())->newQObject(this);
|
||||
FluNetwork::getInstance()->_interceptor.call(data);
|
||||
if(_downloadParam){
|
||||
FluNetwork::getInstance()->handleDownload(this,callable);
|
||||
|
@ -364,18 +364,6 @@ void FluNetwork::handleDownload(NetworkParams* params,NetworkCallable* c){
|
|||
}
|
||||
});
|
||||
loop.exec();
|
||||
int httpStatus = reply->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt();
|
||||
if(httpStatus == 200){
|
||||
if(!callable.isNull()){
|
||||
callable->success(destPath);
|
||||
}
|
||||
printRequestEndLog(request,params,reply,destPath);
|
||||
}else{
|
||||
if(!callable.isNull()){
|
||||
callable->error(httpStatus,reply->errorString(),destPath);
|
||||
}
|
||||
printRequestEndLog(request,params,reply,destPath);
|
||||
}
|
||||
if(conn_destoryed){
|
||||
disconnect(conn_destoryed);
|
||||
}
|
||||
|
|
|
@ -70,7 +70,7 @@ Button {
|
|||
color: FluTheme.primaryColor
|
||||
anchors.bottom: parent.bottom
|
||||
Behavior on height{
|
||||
enabled: control.progress !== 0
|
||||
enabled: control.progress === 1
|
||||
SequentialAnimation {
|
||||
PauseAnimation {
|
||||
duration: FluTheme.enableAnimation ? 167 : 0
|
||||
|
|
|
@ -71,7 +71,7 @@ Button {
|
|||
color: FluTheme.primaryColor
|
||||
anchors.bottom: parent.bottom
|
||||
Behavior on height{
|
||||
enabled: control.progress !== 0
|
||||
enabled: control.progress === 1
|
||||
SequentialAnimation {
|
||||
PauseAnimation {
|
||||
duration: FluTheme.enableAnimation ? 167 : 0
|
||||
|
|
Loading…
Reference in New Issue