Merge pull request #905 from luco5826/master

Update eraser's cursor's size on zoom change
presentation
andreasb242 7 years ago committed by GitHub
commit dcdc9717c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      src/.vscode/c_cpp_properties.json
  2. 2
      src/gui/Cursor.cpp
  3. 3
      src/gui/XournalView.cpp

@ -6,7 +6,8 @@
"${workspaceFolder}/**",
"/usr/include/libglade-2.0",
"/usr/include/glib-2.0",
"/usr/include/gtk-2.0"
"/usr/include/gtk-2.0",
"/usr/include/gtk-3.0"
],
"defines": [],
"compilerPath": "/usr/bin/gcc",

@ -269,7 +269,7 @@ void Cursor::updateCursor()
GdkCursor* Cursor::getEraserCursor()
{
// Eraser's size follow a quadratic increment, so the cursor will do the same
double cursorSize = control->getToolHandler()->getThickness() * 7;
double cursorSize = control->getToolHandler()->getThickness() * 2 * control->getZoomControl()->getZoom();
cairo_surface_t* surface = cairo_image_surface_create(CAIRO_FORMAT_ARGB32,
cursorSize,

@ -638,6 +638,9 @@ void XournalView::zoomChanged()
control->getMetadataManager()->storeMetadata(file.str(), getCurrentPage(), getZoom());
// Updates the Eraser's cursor icon in order to make it as big as the erasing area
control->getCursor()->updateCursor();
this->control->getScheduler()->blockRerenderZoom();
}

Loading…
Cancel
Save