Refactor and enhance various components across the application

- Removed obsolete plans for stroke tuning, commit regression gate, and wxPlainSlider port.
- Updated scrollable panel functionality to include optional scrollbar visibility.
- Enhanced brush panel to filter brush styles by category for improved user experience.
- Adjusted canvas rendering logic to prevent UI freezes during active drawing.
- Modified stroke brush logic to allow single dab drawing at the current position when no movement occurs.
This commit is contained in:
2026-07-10 02:02:21 +03:00
parent 07a9b35208
commit 089ce00b49
34 changed files with 214 additions and 4226 deletions
+7 -1
View File
@@ -98,11 +98,17 @@ impl Engine {
if Self::is_specialized_style(tip.style) {
if let Some((lx, ly, lp)) = self.last_stroke_pos {
if let Some(layer) = self.document.get_layer_by_id_mut(layer_id) {
// If click without movement, draw a single dab at current position
let points_vec = if (lx - x).abs() < 0.001 && (ly - y).abs() < 0.001 {
vec![(x, y, pressure)]
} else {
vec![(lx, ly, lp), (x, y, pressure)]
};
draw_specialized_stroke(
&mut layer.pixels,
layer.width,
layer.height,
&[(lx, ly, lp), (x, y, pressure)],
&points_vec,
tip.style,
tip.size,
tip.hardness,