mirror of
https://github.com/LMMS/lmms.git
synced 2026-05-17 19:24:52 -04:00
Make BB-tracks themeable
- This allows defining a default colour for BB-track patterns in the CSS - The default colour is used for all bb-patterns which don't have a custom colour set by the user: in other words, the colour of a pattern can be any rgb-value OR "style colour" - By default, all created bb-patterns use the style colour - You can also reset colourized patterns to use style colour again - Backwards compatibility: old projects will be loaded so that any pattern using either of the old default colours will be converted to use style colour TODO: add a settings option that can disable custom colours (ie. always use style colour), and/or an option to reset all patterns in a project to style colour. This is needed, since themes can now change the song editor background, which can lead to unfortunate colour combinations with custom colours...
This commit is contained in:
@@ -683,18 +683,6 @@ void DataFile::upgrade()
|
||||
|
||||
}
|
||||
|
||||
// new default colour for B&B tracks
|
||||
QDomNodeList list = elementsByTagName( "bbtco" );
|
||||
for( int i = 0; !list.item( i ).isNull(); ++i )
|
||||
{
|
||||
QDomElement el = list.item( i ).toElement();
|
||||
unsigned int rgb = el.attribute( "color" ).toUInt();
|
||||
if( rgb == qRgb( 64, 128, 255 ) )
|
||||
{
|
||||
el.setAttribute( "color", bbTCO::defaultColor() );
|
||||
}
|
||||
}
|
||||
|
||||
// Time-signature
|
||||
if ( !m_head.hasAttribute( "timesig_numerator" ) )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user