Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename 'done' field of SplitterMoveEvent to 'finishedDragging' #4076

Merged
merged 1 commit into from
Feb 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/wingui/WinGui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2397,7 +2397,7 @@ LRESULT Splitter::WndProc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) {
ReleaseCapture();
SplitterMoveEvent arg;
arg.w = this;
arg.done = true;
arg.finishedDragging = true;
onSplitterMove(&arg);
HwndScheduleRepaint(hwnd);
return 0;
Expand All @@ -2411,7 +2411,7 @@ LRESULT Splitter::WndProc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) {
if (hwnd == GetCapture()) {
SplitterMoveEvent arg;
arg.w = this;
arg.done = false;
arg.finishedDragging = false;
onSplitterMove(&arg);
if (!arg.resizeAllowed) {
curId = IDC_NO;
Expand Down
4 changes: 2 additions & 2 deletions src/wingui/WinGui.h
Original file line number Diff line number Diff line change
Expand Up @@ -444,12 +444,12 @@ enum class SplitterType {

struct Splitter;

// called when user drags the splitter ('done' is false) and when drag is finished ('done' is
// called when user drags the splitter ('finishedDragging' is false) and when drag is finished ('finishedDragging' is
// true). the owner can constrain splitter by using current cursor
// position and setting resizeAllowed to false if it's not allowed to go there
struct SplitterMoveEvent {
Splitter* w = nullptr;
bool done = false; // TODO: rename to finishedDragging
bool finishedDragging = false;
// user can set to false to forbid resizing here
bool resizeAllowed = true;
};
Expand Down
Loading