Take the brush pressure off option into account
This commit is contained in:
parent
4c14c3dc57
commit
f214ba12f0
2 changed files with 5 additions and 3 deletions
|
|
@ -81,7 +81,7 @@ void BrushTool::input_mouse_button_on_canvas_callback(const InputManager::MouseB
|
|||
if(button.button == InputManager::MouseButton::LEFT) {
|
||||
auto& toolConfig = drawP.world.main.toolConfig;
|
||||
if(button.down && drawP.layerMan.is_a_layer_being_edited() && !objInfoBeingEdited && !drawP.world.main.g.gui.cursor_obstructed()) {
|
||||
if(button.deviceType == InputManager::MouseDeviceType::PEN) {
|
||||
if(button.deviceType == InputManager::MouseDeviceType::PEN && drawP.world.main.conf.tabletOptions.pressureAffectsBrushWidth) {
|
||||
penWidth = drawP.world.main.input.pen.pressure;
|
||||
if(penWidth != 0.0f) {
|
||||
float brushMinSize = drawP.world.main.conf.tabletOptions.brushMinimumSize;
|
||||
|
|
@ -177,7 +177,7 @@ void BrushTool::input_mouse_motion_callback(const InputManager::MouseMotionCallb
|
|||
}
|
||||
|
||||
void BrushTool::input_pen_axis_callback(const InputManager::PenAxisCallbackArgs& axis) {
|
||||
if(axis.axis == SDL_PEN_AXIS_PRESSURE) {
|
||||
if(axis.axis == SDL_PEN_AXIS_PRESSURE && drawP.world.main.conf.tabletOptions.pressureAffectsBrushWidth) {
|
||||
penWidth = axis.value;
|
||||
if(penWidth != 0.0f) {
|
||||
float brushMinSize = drawP.world.main.conf.tabletOptions.brushMinimumSize;
|
||||
|
|
|
|||
|
|
@ -1711,7 +1711,9 @@ void Toolbar::general_settings_inner_gui() {
|
|||
}
|
||||
case GSETTINGS_DEBUG: {
|
||||
general_scroll_area("debug settings menu", [&] {
|
||||
checkbox_boolean_field(gui, "use mobile UI", "Use mobile UI (requires restart)", &main.conf.mobileUI);
|
||||
#ifndef __EMSCRIPTEN__
|
||||
checkbox_boolean_field(gui, "use mobile UI", "Use mobile UI (requires restart)", &main.conf.mobileUI);
|
||||
#endif
|
||||
input_scalars_field(gui, "jump transition easing", "Jump easing", &main.conf.jumpTransitionEasing, 4, -10.0f, 10.0f, { .decimalPrecision = 2 });
|
||||
input_scalar_field<int>(gui, "image load max threads", "Maximum image loading threads", &ImageResourceDisplay::IMAGE_LOAD_THREAD_COUNT_MAX, 1, 10000);
|
||||
text_label_light(gui, "Cache related settings");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue