[PR #901] [MERGED] Allow to set different colors for clicks #1248

Closed
opened 2026-02-26 09:34:10 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/NickeManarin/ScreenToGif/pull/901
Author: @pawlos
Created: 5/22/2021
Status: Merged
Merged: 5/30/2021
Merged by: @NickeManarin

Base: feature/900-Different-colors-for-mouse-clicksHead: issue-900


📝 Commits (1)

  • 292d027 Allow to set different colors for clicks

📊 Changes

17 files changed (+192 additions, -70 deletions)

View changed files

📝 ScreenToGif/Controls/BaseScreenRecorder.cs (+1 -1)
📝 ScreenToGif/Model/FrameInfo.cs (+33 -13)
📝 ScreenToGif/Model/MouseClicksModel.cs (+28 -7)
📝 ScreenToGif/Resources/Localization/StringResources.en.xaml (+3 -0)
📝 ScreenToGif/Resources/Localization/StringResources.pl.xaml (+3 -0)
📝 ScreenToGif/Resources/Settings.xaml (+4 -2)
📝 ScreenToGif/ScreenToGif.csproj (+1 -0)
📝 ScreenToGif/Settings/UserSettings.cs (+13 -1)
📝 ScreenToGif/UserControls/MouseClicksPanel.xaml (+14 -6)
📝 ScreenToGif/Util/ActionStack.cs (+22 -22)
📝 ScreenToGif/Util/ClipBoard.cs (+3 -3)
ScreenToGif/Util/MouseButtonType.cs (+10 -0)
📝 ScreenToGif/Util/Other.cs (+2 -2)
📝 ScreenToGif/Windows/Editor.xaml (+17 -8)
📝 ScreenToGif/Windows/Editor.xaml.cs (+24 -3)
📝 ScreenToGif/Windows/NewRecorder.xaml.cs (+7 -1)
📝 ScreenToGif/Windows/Recorder.xaml.cs (+7 -1)

📄 Description

Loading old projects after this change will mark all the clicks as done by left mouse button, as previously no info was stored in the project file about mouse button type.
From this change the project will contain info about the button and different mouse clicks will be correctly represented.

There was some issue with migrating from old to new project format as there's not much control over the serialization/deserialization and in order not to lose clicks when importing from old format, some information had to be kept in the FrameInfo class. Saving in new format and loading in older version of application 9before this change) will result in Clicks being lost but the loading does not throw any exception..

Did testing of this new code and did not encountered any issues but please let me know if something if off.

Closes #900


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/NickeManarin/ScreenToGif/pull/901 **Author:** [@pawlos](https://github.com/pawlos) **Created:** 5/22/2021 **Status:** ✅ Merged **Merged:** 5/30/2021 **Merged by:** [@NickeManarin](https://github.com/NickeManarin) **Base:** `feature/900-Different-colors-for-mouse-clicks` ← **Head:** `issue-900` --- ### 📝 Commits (1) - [`292d027`](https://github.com/NickeManarin/ScreenToGif/commit/292d027d28288d96f78a606edc06cd52d738b4ec) Allow to set different colors for clicks ### 📊 Changes **17 files changed** (+192 additions, -70 deletions) <details> <summary>View changed files</summary> 📝 `ScreenToGif/Controls/BaseScreenRecorder.cs` (+1 -1) 📝 `ScreenToGif/Model/FrameInfo.cs` (+33 -13) 📝 `ScreenToGif/Model/MouseClicksModel.cs` (+28 -7) 📝 `ScreenToGif/Resources/Localization/StringResources.en.xaml` (+3 -0) 📝 `ScreenToGif/Resources/Localization/StringResources.pl.xaml` (+3 -0) 📝 `ScreenToGif/Resources/Settings.xaml` (+4 -2) 📝 `ScreenToGif/ScreenToGif.csproj` (+1 -0) 📝 `ScreenToGif/Settings/UserSettings.cs` (+13 -1) 📝 `ScreenToGif/UserControls/MouseClicksPanel.xaml` (+14 -6) 📝 `ScreenToGif/Util/ActionStack.cs` (+22 -22) 📝 `ScreenToGif/Util/ClipBoard.cs` (+3 -3) ➕ `ScreenToGif/Util/MouseButtonType.cs` (+10 -0) 📝 `ScreenToGif/Util/Other.cs` (+2 -2) 📝 `ScreenToGif/Windows/Editor.xaml` (+17 -8) 📝 `ScreenToGif/Windows/Editor.xaml.cs` (+24 -3) 📝 `ScreenToGif/Windows/NewRecorder.xaml.cs` (+7 -1) 📝 `ScreenToGif/Windows/Recorder.xaml.cs` (+7 -1) </details> ### 📄 Description Loading old projects after this change will mark all the clicks as done by left mouse button, as previously no info was stored in the project file about mouse button type. From this change the project will contain info about the button and different mouse clicks will be correctly represented. There was some issue with migrating from old to new project format as there's not much control over the serialization/deserialization and in order not to lose clicks when importing from old format, some information had to be kept in the `FrameInfo` class. Saving in new format and loading in older version of application 9before this change) will result in Clicks being lost but the loading does not throw any exception.. Did testing of this new code and did not encountered any issues but please let me know if something if off. Closes #900 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-26 09:34:10 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ScreenToGif#1248
No description provided.