Newbie - Seeking to Contribute #957
Replies: 2 comments
-
I'm not sure if I'm understanding correctly what you're asking, but I'll try to answer: If you want to change the default value for something, it's likely that it is stored as a setting in a file to keep the value between sessions. If you're using flatpak, this file is kept in |
Beta Was this translation helpful? Give feedback.
-
There are a few things to note The lines you are refering to rnote/crates/rnote-engine/src/pens/pensconfig/eraserconfig.rs Lines 52 to 54 in e578ec5 only set the max and min value authorized for the eraser size. If you change the eraser size in rnote, you will see that you can only go as low as 1 and as high as 500. These lines seems to be the ones doing that rnote/crates/rnote-ui/src/penssidebar/eraserpage.rs Lines 127 to 129 in e578ec5 The default value is used for a default parameter (in the rnote/crates/rnote-ui/src/penssidebar/eraserpage.rs Lines 130 to 132 in e578ec5 Here the The values for the eraser are stored in the The values are set from these settings in these lines rnote/crates/rnote-ui/src/appwindow/appsettings.rs Lines 349 to 388 in e578ec5 There is additional logic here to make all of the ui work to change eraser size with the 3 first line setting the default values should nothing exist yet in the gschema file. rnote/crates/rnote-ui/src/strokewidthpicker/mod.rs Lines 93 to 132 in e578ec5 So your best bet is to find what is this Going back a little earlier in the calls that capture the input, you'd probably be able to change the values of the eraser size as they happen. Now what's left to see is how to calculate the velocity. I know that for pen inputs, there is a smoothing algorithm that should calculate the velocity somewhere but it's probably not activated for eraser inputs, maybe that could be an hint on where to look |
Beta Was this translation helpful? Give feedback.
-
As the title suggests, I'm somewhat new to contributions in general. However, I was looking at #790 because I'm having an issue with rnote seemingly holding on to settings from previous instances. Meaning, when I change the eraser sizes in lines 52-54 in the eraserconfig.rs file, it doesn't actually update anything when I rebuild the app. (it stays at whatever I updated it to) Of note, I am using flatpak and the VSCode extension.
If it matters at all:
System - Surface Pro 8
OS - Fedora Linux 39 (Workstation Edition)
Kernel - 6.6.6-1.surface.fc39.x86_64 (used https://github.com/linux-surface/linux-surface )
So what I'm wondering is that when I rebuild the flatpak, why is it carrying over the values rather than resetting them? I was looking to try to solve #819 as I figured that may be a good starter. But unless I update the minimum (line 52) value to something higher than what I set it at, then the value stays at whatever I left it at. The default value (line 54) doesn't seem to matter as it seems there's some sort of cache being stored. (of note, when I completely delete, repull and rebuild it does start at 12 like the default value shows)
I guess the real question to dig into: What is the "correct" workflow for this? (simply used https://github.com/flxzt/rnote/blob/main/BUILDING.md but apparently am still not doing it right or am missing something)
Beta Was this translation helpful? Give feedback.
All reactions