diff --git a/0007-fix-setting-dialog-moveable.patch b/0007-fix-setting-dialog-moveable.patch new file mode 100644 index 0000000000000000000000000000000000000000..e24470a0f31e800a6fc6f4ac49e79ec64acf79c7 --- /dev/null +++ b/0007-fix-setting-dialog-moveable.patch @@ -0,0 +1,59 @@ +diff --git a/nfs-screen-recorder-0.4.2/src/page/SettingMenu.cpp b/nfs-screen-recorder-0.4.2/src/page/SettingMenu.cpp +index 8781ec3..b9e4b21 100644 +--- a/nfs-screen-recorder-0.4.2/src/page/SettingMenu.cpp ++++ b/nfs-screen-recorder-0.4.2/src/page/SettingMenu.cpp +@@ -204,7 +204,8 @@ SettingMenu::SettingMenu(MainPage *parent) : + + //通用配置信号槽函数 + // m_main_window = new MainPage(this); +- ++ this->installEventFilter(this); ++ m_pressed = false; + } + + +@@ -582,6 +583,26 @@ int SettingMenu::GetAudioCodecIndex() { + return audioindex; + } + ++bool SettingMenu::eventFilter(QObject *o, QEvent *e) ++{ ++ if(o == this) ++ { ++ QMouseEvent *mEvent = (QMouseEvent *)e; ++ if(e->type() == QEvent::MouseButtonPress) ++ { ++ m_pressed = true; ++ m_movePos = mEvent->globalPos(); ++ } ++ else if((e->type() == QEvent::MouseMove) && m_pressed) ++ { ++ QPoint offset = mEvent->globalPos() - m_movePos; ++ move(this->x() + offset.x(), this->y() + offset.y()); ++ m_movePos = mEvent->globalPos(); ++ } ++ } ++ ++} ++ + //void SettingMenu::UpdateSysTray() { + // if(m_systray_icon == NULL) + // return; +diff --git a/nfs-screen-recorder-0.4.2/src/page/SettingMenu.h b/nfs-screen-recorder-0.4.2/src/page/SettingMenu.h +index f297947..335123f 100644 +--- a/nfs-screen-recorder-0.4.2/src/page/SettingMenu.h ++++ b/nfs-screen-recorder-0.4.2/src/page/SettingMenu.h +@@ -147,6 +147,13 @@ public: + HotkeyCallback m_hotkey_start_pause; + int GetVideoCodecIndex(); + int GetAudioCodecIndex(); ++ ++protected: ++ bool eventFilter(QObject *o, QEvent *e); ++private: ++ QPoint m_movePos; ++ bool m_pressed; ++ + private: + MainPage *m_main_window; + static void LoadProfileSettingsCallback(QSettings* settings, void* userdata); diff --git a/nfs-screen-recorder.spec b/nfs-screen-recorder.spec index 4b7aff3e12905e9c68cf58ad57269b4b7c530bc2..ac2d1d1d19e3dbb3161ad111c15ba561bd7306c3 100644 --- a/nfs-screen-recorder.spec +++ b/nfs-screen-recorder.spec @@ -5,7 +5,7 @@ Name: nfs-screen-recorder Version: 0.4.2 -Release: 7%{?dist} +Release: 8%{?dist} License: GPLv3+ Summary: Powerful yet simple to use screenshot software Source0: %{name}-%{version}.tar.gz @@ -15,6 +15,7 @@ Patch2: 0003-shift-app-name-via-system-language.patch Patch3: 0004-update-readme.patch Patch4: 0005-fix-about-dialog-moveable.patch Patch5: 0006-fix-loginfo-dialog-moveable.patch +Patch6: 0007-fix-setting-dialog-moveable.patch BuildRequires: cmake >= 3.13.0 BuildRequires: gcc-c++ >= 7 @@ -119,6 +120,9 @@ make %changelog +* Wed Oct 18 2023 ruizhe - 0.4.2-8 +- Fix fix about dialog cannot move + * Wed Oct 18 2023 ruizhe - 0.4.2-7 - Fix fix loginfo dialog cannot move