Skip to content

Commit 1906255

Browse files
committed
Added fill property
1 parent 78d36f0 commit 1906255

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

include/lsp-plug.in/tk/widgets/specific/AudioEnvelope.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ namespace lsp
5454
prop::Boolean sHold; // Enable hold time point
5555
prop::Boolean sBreak; // Enable slope time point
5656
prop::Boolean sQuadPoint; // Use quad point instead of circle
57+
prop::Boolean sFill; // Use fill color for drawing
5758
prop::Boolean sInvertMouseVScroll; // Invert mouse vertical scroll
5859

5960
prop::Integer sLineWidth; // Line width
@@ -140,6 +141,7 @@ namespace lsp
140141
prop::Boolean sHold; // Enable hold time point
141142
prop::Boolean sBreak; // Enable slope time point
142143
prop::Boolean sQuadPoint; // Use quad point instead of circle
144+
prop::Boolean sFill; // Use fill color for drawing
143145
prop::Boolean sInvertMouseVScroll; // Invert mouse vertical scroll
144146

145147
prop::Integer sLineWidth; // Line width
@@ -215,6 +217,7 @@ namespace lsp
215217
LSP_TK_PROPERTY(Boolean, hold_enabled, &sHold);
216218
LSP_TK_PROPERTY(Boolean, break_enabled, &sBreak);
217219
LSP_TK_PROPERTY(Boolean, quad_point, &sQuadPoint);
220+
LSP_TK_PROPERTY(Boolean, fill, &sFill);
218221
LSP_TK_PROPERTY(Boolean, invert_mouse_vscroll, &sInvertMouseVScroll)
219222

220223
LSP_TK_PROPERTY(Integer, line_width, &sLineWidth);

src/main/widgets/specific/AudioEnvelope.cpp

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ namespace lsp
5151
sHold.bind("hold.enabled", this);
5252
sBreak.bind("break.enabled", this);
5353
sQuadPoint.bind("point.quadratic", this);
54+
sFill.bind("fill", this);
55+
sInvertMouseVScroll.bind("mouse.vscroll.invert", this);
5456

5557
sLineWidth.bind("line.width", this);
5658
sLineColor.bind("line.color", this);
@@ -87,6 +89,8 @@ namespace lsp
8789
sHold.set(false);
8890
sBreak.set(false);
8991
sQuadPoint.set(false);
92+
sFill.set(true);
93+
sInvertMouseVScroll.set(false);
9094

9195
sLineWidth.set(1);
9296
sLineColor.set_rgb24(0xffff00);
@@ -129,6 +133,8 @@ namespace lsp
129133
sHold(&sProperties),
130134
sBreak(&sProperties),
131135
sQuadPoint(&sProperties),
136+
sFill(&sProperties),
137+
sInvertMouseVScroll(&sProperties),
132138
sLineWidth(&sProperties),
133139
sLineColor(&sProperties),
134140
sFillColor(&sProperties),
@@ -257,6 +263,8 @@ namespace lsp
257263
sHold.bind("hold.enabled", &sStyle);
258264
sBreak.bind("break.enabled", &sStyle);
259265
sQuadPoint.bind("point.quadratic", &sStyle);
266+
sFill.bind("fill", &sStyle);
267+
sInvertMouseVScroll.bind("mouse.vscroll.invert", &sStyle);
260268

261269
sLineWidth.bind("line.width", &sStyle);
262270
sLineColor.bind("line.color", &sStyle);
@@ -316,7 +324,7 @@ namespace lsp
316324
query_draw();
317325
}
318326

319-
if (prop->is(sQuadPoint))
327+
if (prop->one_of(sQuadPoint, sFill))
320328
query_draw();
321329

322330
if (prop->one_of(sLineWidth, sLineColor, sFillColor, sPointSize, sPointColor, sPointHoverColor,

0 commit comments

Comments
 (0)