mirror of
https://github.com/aseprite/aseprite.git
synced 2025-03-29 19:20:09 +00:00
Add option to enable the Snap to Grid option for the brush preview (fix #4137)
This commit is contained in:
parent
edb2393690
commit
1311944667
@ -212,6 +212,7 @@
|
||||
<option id="cursor_color" type="app::Color" default="app::Color::fromMask()" />
|
||||
<option id="painting_cursor_type" type="PaintingCursorType" default="PaintingCursorType::CROSSHAIR_ON_SPRITE" />
|
||||
<option id="brush_preview" type="BrushPreview" default="BrushPreview::FULL" />
|
||||
<option id="snap_to_grid" type="bool" default="false" />
|
||||
</section>
|
||||
<section id="preview" text="Preview">
|
||||
<option id="play_once" type="bool" default="false" />
|
||||
|
@ -1701,6 +1701,7 @@ brush_preview_fullnedges = Full Preview and Edges
|
||||
cursor_color_type = Crosshair && Brush Edges Color:
|
||||
cursor_neg_bw = Negative Black and White
|
||||
cursor_specific_color = Specific Color
|
||||
snap_cursor_to_grid = Snap To Grid when the option is enabled
|
||||
bg_checkered = Checkered Background
|
||||
bg_size = Size:
|
||||
bg_custom_size = Custom
|
||||
|
@ -346,6 +346,9 @@
|
||||
|
||||
<boxfiller />
|
||||
<colorpicker id="cursor_color" rgba="true" />
|
||||
|
||||
<check text="@.snap_cursor_to_grid"
|
||||
pref="cursor.snap_to_grid" cell_hspan="2" />
|
||||
</grid>
|
||||
</vbox>
|
||||
|
||||
|
@ -176,7 +176,8 @@ void BrushPreview::show(const gfx::Point& screenPos)
|
||||
|
||||
// Get cursor position in the editor
|
||||
gfx::Point spritePos = m_editor->screenToEditor(screenPos);
|
||||
if (m_editor->docPref().grid.snap()) {
|
||||
if (pref.cursor.snapToGrid() &&
|
||||
m_editor->docPref().grid.snap()) {
|
||||
spritePos = snap_to_grid(m_editor->docPref().grid.bounds(),
|
||||
spritePos,
|
||||
PreferSnapTo::ClosestGridVertex) +
|
||||
|
Loading…
x
Reference in New Issue
Block a user