Skip to content

Commit

Permalink
ci test
Browse files Browse the repository at this point in the history
  • Loading branch information
kaniol-lck committed May 22, 2024
1 parent 30b582b commit e2dbff7
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 11 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ jobs:
cp C:/msys64/${{ matrix.mingw_arch }}/bin/libcrypto-3${{ matrix.x64_suffix }}.dll deploy/
cp C:/msys64/${{ matrix.mingw_arch }}/bin/libssl-3${{ matrix.x64_suffix }}.dll deploy/
cp C:/msys64/${{ matrix.mingw_arch }}/bin/libaria2-0.dll deploy/
cp C:/msys64/${{ matrix.mingw_arch }}/bin/libbz2-1.dll deploy/
cp C:/msys64/${{ matrix.mingw_arch }}/bin/libiconv-2.dll deploy/
cp C:/msys64/${{ matrix.mingw_arch }}/bin/liblzma-5.dll deploy/
cp C:/msys64/${{ matrix.mingw_arch }}/bin/libintl-8.dll deploy/
Expand Down Expand Up @@ -245,7 +246,7 @@ jobs:
path: ${{github.workspace}}/package/ModManager*-Installer.exe
- uses: actions/upload-artifact@v2
with:
name: ModManager${{ matrix.x64_suffix }}-packed
name: ModManager${{ matrix.x64_suffix }}-win-packed
path: deploy/*
- name: Upload Release
if: startsWith(github.event.ref, 'refs/tags/')
Expand Down
6 changes: 6 additions & 0 deletions modmanager.pro
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,9 @@ unix {
}
INCLUDEPATH += \
/usr/include/QuaZip-Qt5-1.4/quazip \
/usr/include/QuaZip-Qt5-1.3/quazip \
/usr/include/QuaZip-Qt5-1.2/quazip \
/usr/include/QuaZip-Qt5-1.1/quazip \
/usr/include/quazip \
/usr/include/quazip5
}
Expand All @@ -430,6 +433,9 @@ unix {
}
INCLUDEPATH += \
/usr/include/QuaZip-Qt6-1.4/quazip \
/usr/include/QuaZip-Qt6-1.3/quazip \
/usr/include/QuaZip-Qt6-1.2/quazip \
/usr/include/QuaZip-Qt6-1.1/quazip \
/usr/include/quazip \
/usr/include/quazip6
}
Expand Down
19 changes: 9 additions & 10 deletions src/ui/framelesswrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ FramelessWrapper::FramelessWrapper(QWidget *parent, QWidget *widget, WindowsTitl

auto w = new QWidget(this);
auto layout = new QVBoxLayout;
// layout->setMargin(0);
layout->setMargin(0);
layout->setSpacing(0);
layout->addWidget(titleBar_);
layout->addWidget(widget);
Expand Down Expand Up @@ -91,7 +91,12 @@ bool FramelessWrapper::nativeEvent(const QByteArray &eventType, void *message, l
return true;
}
case WM_NCHITTEST:{
auto mousePos = mapFromGlobal(QPoint(GET_X_LPARAM(msg->lParam), GET_Y_LPARAM(msg->lParam)));
//support highdpi
double dpr = this->devicePixelRatioF();
long x = GET_X_LPARAM(msg->lParam);
long y = GET_Y_LPARAM(msg->lParam);

auto mousePos = mapFromGlobal(QPoint(x/dpr,y/dpr));
bool left = mousePos.x() < boundaryWidth;
bool right = mousePos.x() > width() - boundaryWidth;
bool top = mousePos.y() < boundaryWidth;
Expand All @@ -114,14 +119,8 @@ bool FramelessWrapper::nativeEvent(const QByteArray &eventType, void *message, l
*result = HTBOTTOM;
if(*result) return true;

//support highdpi
double dpr = this->devicePixelRatioF();
long x = GET_X_LPARAM(msg->lParam);
long y = GET_Y_LPARAM(msg->lParam);
QPoint pos = titleBar_->mapFromGlobal(QPoint(x/dpr,y/dpr));

if (!titleBar_->rect().contains(pos)) return false;
return titleBar_->hitTest(pos, result);
if (!titleBar_->rect().contains(mousePos)) return false;
return titleBar_->hitTest(mousePos, result);
}
case WM_GETMINMAXINFO: {
if (::IsZoomed(msg->hwnd)) {
Expand Down

0 comments on commit e2dbff7

Please sign in to comment.