Make text rendering consistent for TrackContentObjectViews

Add the method paintTextLabel to TrackContentObjectView. This methods
implements the painting of a given text on a given painter. The new
implementation does not draw any text label in case the trimmed text
becomes empty.

Use the method paintTextLabel to paint the text for automation patterns,
BB patterns and instrument patterns.

Adjust the style sheet of the classic and default theme by moving the
font definition from PatternView into TrackContentObjectView so that it
can be used by all inheriting classes.
This commit is contained in:
Michael Gregorius
2017-07-16 16:10:42 +02:00
parent bcdb5ecb5a
commit a23e344886
7 changed files with 35 additions and 62 deletions

View File

@@ -615,13 +615,14 @@ TrackContentObjectView {
qproperty-textColor: rgb( 255, 255, 255 );
qproperty-textShadowColor: rgb( 0, 0, 0 );
qproperty-gradient: true; /* boolean property, set true to have a gradient */
font-size: 11px;
}
/* instrument pattern */
PatternView {
background-color: rgb( 119, 199, 216 );
color: rgb( 187, 227, 236 );
font-size: 11px;
}
/* sample track pattern */

View File

@@ -622,13 +622,14 @@ TrackContentObjectView {
qproperty-textColor: #fff;
qproperty-textShadowColor: rgb(0,0,0,200);
qproperty-gradient: false; /* boolean property, set true to have a gradient */
font-size: 11px;
}
/* instrument pattern */
PatternView {
background-color: #21A14F;
color: rgba(255,255,255,220);
font-size: 11px;
}
/* sample track pattern */