Compare commits

...

8 Commits

Author SHA1 Message Date
Jacopo De Simoi 440a91ee86 Use crosshairs instead of dots 5 years ago
Jacopo De Simoi 13bb9ad7f5 Draw dots closer together 5 years ago
Jacopo De Simoi e297f685c5 Pressure sensitivity from linear to exponential 5 years ago
Rémi Emonet 5dbd6f35f3 Linux build fix var name 5 years ago
Ulrich Huber 3b12856ea4
Merge pull request #2416 from xournalpp/revert-1808-master 5 years ago
Ulrich Huber 2e9e79e3e7 Revert "New icon app (#1808)" 5 years ago
rolandlo cf4000cf67 Fix scrolling bug after save 5 years ago
Luya Tshimbalanga c312a55be8
New icon app (#1808) 5 years ago
  1. 2
      readme/LinuxBuild.md
  2. 7
      src/control/jobs/BlockingJob.cpp
  3. 3
      src/gui/inputdevices/AbstractInputHandler.cpp
  4. 10
      src/view/background/DottedBackgroundPainter.cpp

@ -114,7 +114,7 @@ package and then use that with the `azure-pipelines/util/build_appimage.sh`
script.
```bash
cmake .. -DPACK_GENERATOR="TGZ"
cmake .. -DCPACK_GENERATOR="TGZ"
cmake --build . --target package
../azure-pipelines/util/build_appimage.sh
```

@ -2,6 +2,7 @@
#include "control/Control.h"
#include "control/xojfile/SaveHandler.h"
#include "gui/XournalView.h"
BlockingJob::BlockingJob(Control* control, const string& name): control(control) { control->block(name); }
@ -16,7 +17,11 @@ void BlockingJob::execute() {
auto BlockingJob::finished(Control* control) -> bool {
// "this" is not needed, "control" is in
// the closure, therefore no sync needed
Util::execInUiThread([=]() { control->unblock(); });
Util::execInUiThread([=]() {
control->unblock();
XournalView* xournal = control->getWindow()->getXournal();
gtk_widget_grab_focus(xournal->getWidget());
});
// do not call again
return false;

@ -7,6 +7,7 @@
#include "gui/XournalppCursor.h"
#include "InputContext.h"
#include <cmath>
AbstractInputHandler::AbstractInputHandler(InputContext* inputContext) { this->inputContext = inputContext; }
@ -75,7 +76,7 @@ auto AbstractInputHandler::getInputDataRelativeToCurrentPage(XojPageView* page,
pos.pressure = Point::NO_PRESSURE;
if (this->inputContext->getSettings()->isPressureSensitivity()) {
pos.pressure = event.pressure;
pos.pressure = 1-exp(- event.pressure/0.2);
}
pos.state = this->inputContext->getModifierState();

@ -8,8 +8,8 @@ DottedBackgroundPainter::~DottedBackgroundPainter() = default;
void DottedBackgroundPainter::resetConfig() {
this->foregroundColor1 = 0xBDBDBDU;
this->lineWidth = 1.5;
this->drawRaster1 = 14.17;
this->lineWidth = 1;
this->drawRaster1 = 10;
}
void DottedBackgroundPainter::paint() {
@ -26,8 +26,10 @@ void DottedBackgroundPainter::paintBackgroundDotted() {
auto pos = [dr1 = drawRaster1](int i) { return dr1 + i * dr1; };
for (int x = 0; pos(x) < width; ++x) {
for (int y = 0; pos(y) < height; ++y) {
cairo_move_to(cr, pos(x), pos(y));
cairo_line_to(cr, pos(x), pos(y));
cairo_move_to(cr, pos(x-lineWidth), pos(y));
cairo_line_to(cr, pos(x+lineWidth), pos(y));
cairo_move_to(cr, pos(x), pos(y-lineWidth));
cairo_line_to(cr, pos(x), pos(y+lineWidth));
}
}

Loading…
Cancel
Save