Skip to content

Commit

Permalink
mosaic bug fix on win 11
Browse files Browse the repository at this point in the history
  • Loading branch information
xland committed Jan 2, 2025
1 parent 53cfc13 commit 66477a0
Show file tree
Hide file tree
Showing 11 changed files with 15 additions and 306 deletions.
5 changes: 5 additions & 0 deletions App/Tray.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ Tray::Tray(const QJsonObject& obj, const QString& lang, QObject *parent) : QObje
about->raise();
});
}
else if (name == "start") {
connect(action, &QAction::triggered, []() {
App::start();
});
}
connect(action, &QAction::hovered, []() {
QGuiApplication::setOverrideCursor(Qt::ArrowCursor);
});
Expand Down
4 changes: 2 additions & 2 deletions App/Util.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#include <QMessageBox>
#include "Util.h"
#include "../Win/WinBox.h"
#include "../Lib/DWMCapture/DWMCapture.h"
#pragma comment(lib, "comctl32.lib")



QMouseEvent Util::createMouseEvent(const QEvent::Type& type, const Qt::MouseButton& btn)
{
Expand Down
5 changes: 5 additions & 0 deletions Config/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@
"tray": {
"iconPath": "Config/logo.ico",
"menu": [
{
"name": "start",
"zhcn": "截图",
"en": "Capture"
},
{
"name": "about",
"zhcn": "关于",
Expand Down
116 changes: 0 additions & 116 deletions Lib/DWMCapture/DWMCapture.cpp

This file was deleted.

31 changes: 0 additions & 31 deletions Lib/DWMCapture/DWMCapture.h

This file was deleted.

39 changes: 0 additions & 39 deletions Lib/DWMCapture/d3d_device.cpp

This file was deleted.

24 changes: 0 additions & 24 deletions Lib/DWMCapture/d3d_device.h

This file was deleted.

87 changes: 0 additions & 87 deletions Lib/DWMCapture/types.h

This file was deleted.

5 changes: 0 additions & 5 deletions ScreenCapture.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,6 @@
<ClCompile Include="App\About.cpp" />
<ClCompile Include="App\App.cpp" />
<ClCompile Include="App\NativeRect.cpp" />
<ClCompile Include="Lib\DWMCapture\d3d_device.cpp" />
<ClCompile Include="Lib\DWMCapture\DWMCapture.cpp" />
<ClCompile Include="Shape\ShapeArrow.cpp" />
<ClCompile Include="Shape\ShapeBase.cpp" />
<ClCompile Include="Shape\ShapeEllipse.cpp" />
Expand Down Expand Up @@ -170,9 +168,6 @@
<QtMoc Include="Shape\ShapeArrow.h" />
<ClInclude Include="App\NativeRect.h" />
<ClInclude Include="App\Res.h" />
<ClInclude Include="Lib\DWMCapture\d3d_device.h" />
<ClInclude Include="Lib\DWMCapture\DWMCapture.h" />
<ClInclude Include="Lib\DWMCapture\types.h" />
<ClInclude Include="Lib\spdlog\async.h" />
<ClInclude Include="Lib\spdlog\async_logger-inl.h" />
<ClInclude Include="Lib\spdlog\async_logger.h" />
Expand Down
4 changes: 2 additions & 2 deletions Win/WinPin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -175,9 +175,9 @@ void WinPin::mousePress(QMouseEvent* event)
}

void WinPin::mousePressRight(QMouseEvent* event)
{
{
auto flag = state == State::start;
HMENU hMenu = CreatePopupMenu();
auto flag = state == State::start;
AppendMenu(hMenu, flag ? MF_UNCHECKED : MF_CHECKED, 1001, menuItems["toolBar"].data());
AppendMenu(hMenu, MF_STRING, 1002, menuItems["quit"].data());
auto pos = event->pos();
Expand Down
1 change: 1 addition & 0 deletions todo.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
- release 托盘图标
- release 退出应用
- 鼠标滚轮放大钉图窗口
- Tray Menu用原生的


- 通过命令行截图
Expand Down

0 comments on commit 66477a0

Please sign in to comment.