@@ -112,6 +112,14 @@ void Bracket::layout()
112
112
qreal h = (-y + h2) * 2 ;
113
113
bbox ().setRect (x, y, w, h);
114
114
}
115
+ else if (bracketType () == BRACKET_SIMPLE) {
116
+ qreal _spatium = spatium ();
117
+ qreal w = score ()->styleS (ST_bracketWidth).val () * _spatium * .5 ;
118
+ qreal x = -w;
119
+ w += 1 * spatium ();
120
+ qreal h = h2 * 2 ;
121
+ bbox ().setRect (x, 0.0 , w, h);
122
+ }
115
123
}
116
124
117
125
// ---------------------------------------------------------
@@ -143,6 +151,16 @@ void Bracket::draw(QPainter* painter) const
143
151
symbols[idx][brackettipsRightUp].draw (painter, mags, QPointF (x, y1));
144
152
symbols[idx][brackettipsRightDown].draw (painter, mags, QPointF (x, y2));
145
153
}
154
+ else if (bracketType () == BRACKET_SIMPLE) {
155
+ qreal h = 2 * h2;
156
+ qreal _spatium = spatium ();
157
+ qreal w = score ()->styleS (ST_staffLineWidth).val () * _spatium;
158
+ QPen pen (curColor (), w, Qt::SolidLine, Qt::SquareCap);
159
+ painter->setPen (pen);
160
+ painter->drawLine (QLineF (0.0 , 0.0 , 0.0 , h));
161
+ painter->drawLine (QLineF (0.0 , 0.0 , w + spatium () , 0.0 ));
162
+ painter->drawLine (QLineF (0.0 , h , w + spatium (), h));
163
+ }
146
164
}
147
165
148
166
// ---------------------------------------------------------
@@ -158,6 +176,9 @@ void Bracket::write(Xml& xml) const
158
176
case BRACKET_NORMAL:
159
177
xml.stag (" Bracket" );
160
178
break ;
179
+ case BRACKET_SIMPLE:
180
+ xml.stag (" Bracket type=\" Simple\" " );
181
+ break ;
161
182
case NO_BRACKET:
162
183
break ;
163
184
}
@@ -179,6 +200,8 @@ void Bracket::read(XmlReader& e)
179
200
setBracketType (BRACKET_NORMAL);
180
201
else if (t == " Akkolade" )
181
202
setBracketType (BRACKET_AKKOLADE);
203
+ else if (t == " Simple" )
204
+ setBracketType (BRACKET_SIMPLE);
182
205
else
183
206
qDebug (" unknown brace type <%s>" , qPrintable (t));
184
207
0 commit comments