Skip to content

Commit 6095d6e

Browse files
committed
ui: thin line drawing
1 parent a9c8dd7 commit 6095d6e

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

plugins/string-machine/StringMachineUI.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,10 @@ void StringMachineUI::onDisplay()
145145
cairo_set_source_rgba8(cr, bgColor);
146146
cairo_paint(cr);
147147

148+
cairo_set_line_width(cr, 1.0);
149+
150+
cairo_set_source_rgba(cr, 0.0, 0.0, 0.0, 1.0);
151+
148152
const Label *group_labels[] = {
149153
&MainLayout::group_StringOsc_label,
150154
&MainLayout::group_StringFilters_label,
@@ -202,7 +206,7 @@ void StringMachineUI::onDisplay()
202206

203207
fe.drawInBox(cr, label->text, font, bounds, label->align);
204208

205-
RectF frame = label->bounds.to<double>();
209+
RectF frame = label->bounds.to<double>().off_by({0.5, 0.5});
206210
cairo_rounded_rectangle(cr, frame, 5.0);
207211
cairo_set_source_rgba(cr, 0.0, 0.0, 0.0, 1.0);
208212
cairo_stroke(cr);
@@ -219,7 +223,7 @@ void StringMachineUI::onDisplay()
219223

220224
fe.drawInBox(cr, label->text, font, bounds, label->align);
221225

222-
RectF frame = label->bounds.to<double>();
226+
RectF frame = label->bounds.to<double>().off_by({0.5, 0.5});
223227
cairo_rounded_rectangle(cr, frame, 5.0);
224228
cairo_set_source_rgba(cr, 0.0, 0.0, 0.0, 1.0);
225229
cairo_stroke(cr);

0 commit comments

Comments
 (0)