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

New canvas cursor and quick cursor implementation #1806

Merged
merged 25 commits into from
Mar 7, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
31ce667
Implement width cursor
MrStevns Nov 25, 2023
8d2de73
Make feather cursor adjust properly
MrStevns Dec 3, 2023
dc394cb
Invert feather values
MrStevns Dec 16, 2023
ca6f87e
Fix circle rendering becoming near invisible when width and feather a…
MrStevns Dec 17, 2023
4cec4b4
Cleanup cursor logic in strokeTool
MrStevns Dec 17, 2023
1779072
Remove tolerance quick cursor shortcut
MrStevns Jan 9, 2024
cb53144
Don't show feather circle when it's fixed size
MrStevns Jan 9, 2024
ebe30ee
Simplify cursor paint methods
MrStevns Jan 9, 2024
d533328
Merge branch 'master' into new-canvas-cursor-impl
MrStevns Jan 9, 2024
5c69f33
Fix CI Qt not compiling
MrStevns Jan 9, 2024
6c1cac3
Add missing license to CanvasCursorPainter
MrStevns Jan 9, 2024
24df0e6
Review changes
J5lx Feb 25, 2024
96151d7
Fix build failure on old MSVC versions
J5lx Feb 25, 2024
3ba49df
Review change: move quick cursor logic into stroke tool
MrStevns Feb 28, 2024
e4b6a01
Remove redundant neutral multiplication
MrStevns Feb 28, 2024
f139cf1
Fix cursor lingers on canvas
MrStevns Mar 2, 2024
5e09c2a
Migrate canvas cursor setting from dotted to canvas cursor
MrStevns Mar 2, 2024
138700a
Fix cursor would disappear if outside main window
MrStevns Mar 2, 2024
f0eca1e
Fix view updates would send signals to all stroke tools
MrStevns Mar 2, 2024
20ea7c6
Remove useFeather
MrStevns Mar 2, 2024
a070438
Keep internal config file key for canvas cursor setting
J5lx Mar 5, 2024
efbf77e
Fix canvas cursor artifacts when leaving ScribbleArea
J5lx Mar 5, 2024
f3c2754
Apply suggestion to return either current tool event or widget event
MrStevns Mar 6, 2024
31e64d9
Fix tool event handling
J5lx Mar 6, 2024
6a1405b
Bucket tool: remove quick sizing
MrStevns Mar 7, 2024
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
5 changes: 4 additions & 1 deletion core_lib/src/interface/scribblearea.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -383,12 +383,15 @@ void ScribbleArea::onObjectLoaded()

bool ScribbleArea::event(QEvent *event)
{
bool processed = false;
if (event->type() == QEvent::WindowDeactivate)
{
editor()->tools()->clearTemporaryTool();
processed = true;
}

return currentTool()->event(event) || QWidget::event(event);
processed = currentTool()->event(event) || processed;
return QWidget::event(event) || processed;
J5lx marked this conversation as resolved.
Show resolved Hide resolved
}

/************************************************************************/
Expand Down
1 change: 0 additions & 1 deletion core_lib/src/tool/basetool.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ class BaseTool : public QObject
virtual void pointerMoveEvent(PointerEvent*) = 0;
virtual void pointerReleaseEvent(PointerEvent*) = 0;
virtual void pointerDoubleClickEvent(PointerEvent*);
virtual bool event(QEvent* event) { return event->isAccepted(); }

// return true if handled
virtual bool keyPressEvent(QKeyEvent*) { return false; }
Expand Down
6 changes: 5 additions & 1 deletion core_lib/src/tool/stroketool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -208,10 +208,14 @@ bool StrokeTool::event(QEvent *event)
if (event->type() == QEvent::Leave && !isActive()) {
mCanvasCursorEnabled = false;
updateCanvasCursor();
QObject::event(event);
return true;
MrStevns marked this conversation as resolved.
Show resolved Hide resolved
} else if (event->type() == QEvent::Enter) {
mCanvasCursorEnabled = mEditor->preference()->isOn(SETTING::CANVAS_CURSOR);
QObject::event(event);
return true;
}
return event->isAccepted();
return QObject::event(event);
}

void StrokeTool::updateCanvasCursor()
Expand Down
Loading