improved overall appearence

git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@984 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
Tobias Doerffel
2008-05-18 13:39:25 +00:00
parent 9f71f3de29
commit dd1db7d2b7
7 changed files with 52 additions and 31 deletions

View File

@@ -1,5 +1,17 @@
2008-05-18 Tobias Doerffel <tobydox/at/users/dot/sourceforge/dot/net>
* include/bb_track.h:
* src/gui/widgets/combobox.cpp:
* src/gui/widgets/name_label.cpp:
* src/tracks/bb_track.cpp:
* src/tracks/pattern.cpp:
* data/themes/default/track_op_grip.png:
improved overall appearence
* src/core/track.cpp:
- disabled flipped painting of track-view-BG
- optimized changePosition()-method for much faster drawing
* src/gui/fx_mixer_view.cpp:
do not destroy FX-mixer-view when closing

Binary file not shown.

Before

Width:  |  Height:  |  Size: 180 B

After

Width:  |  Height:  |  Size: 186 B

View File

@@ -173,6 +173,11 @@ public:
virtual bool close( void );
const bbTrack * getBBTrack( void ) const
{
return( m_bbTrack );
}
public slots:
void clickedTrackLabel( void );

View File

@@ -172,8 +172,8 @@ void comboBox::paintEvent( QPaintEvent * _pe )
QColor shadow = palette().shadow().color();
QColor highlight = palette().highlight().color();
shadow.setAlpha(124);
highlight.setAlpha(124);
shadow.setAlpha( 124 );
highlight.setAlpha( 124 );
// button-separator
p.setPen( shadow );
@@ -215,10 +215,10 @@ void comboBox::paintEvent( QPaintEvent * _pe )
tx += pm.width() + 2;
}
p.setPen( QColor( 64, 64, 64 ) );
p.drawText( tx+1, p.fontMetrics().height()-1,
p.drawText( tx+1, p.fontMetrics().height()-2,
model()->currentText() );
p.setPen( QColor( 224, 224, 224 ) );
p.drawText( tx, p.fontMetrics().height()-2,
p.drawText( tx, p.fontMetrics().height()-3,
model()->currentText() );
}
}

View File

@@ -33,7 +33,7 @@
#include "name_label.h"
#include "rename_dialog.h"
#include "bb_editor.h"
#include "bb_track_container.h"
#include "bb_track.h"
#include "gui_templates.h"
#include "config_mgr.h"
@@ -173,7 +173,6 @@ void nameLabel::mousePressEvent( QMouseEvent * _me )
else
{
emit clicked();
QLabel::mousePressEvent( _me );
}
}
@@ -200,8 +199,9 @@ void nameLabel::mouseDoubleClickEvent( QMouseEvent * _me )
void nameLabel::paintEvent( QPaintEvent * )
{
QPainter p( this );
p.fillRect( rect(), palette().color( backgroundRole() ) );
p.setFont( pointSize<8>( p.font() ) );
p.fillRect( rect(),
parentWidget()->palette().color( backgroundRole() ) );
p.setFont( pointSize<9>( p.font() ) );
int x = 4;
if( m_pixmap.isNull() == FALSE )
@@ -216,19 +216,18 @@ void nameLabel::paintEvent( QPaintEvent * )
x += 4 + pm.width();
}
p.setPen( QColor( 16, 16, 16 ) );
p.drawText( x+1, height() / 2 + p.fontMetrics().height() / 2 - 3,
text() );
p.setPen( QColor( 0, 224, 0 ) );
#warning: TODO
/* bbTrack * bbt = bbTrack::findBBTrack(
p.setPen( QColor( 160, 160, 160 ) );
bbTrack * bbt = bbTrack::findBBTrack(
engine::getBBTrackContainer()->currentBB() );
if( bbt != NULL && bbt->getTrackSettingsWidget() ==
dynamic_cast<trackSettingsWidget *>( parentWidget() ) )
trackSettingsWidget * w = dynamic_cast<trackSettingsWidget *>( parentWidget() );
if( bbt != NULL && w != NULL )
{
p.setPen( QColor( 255, 255, 255 ) );
}*/
bbTrackView * bbtv = dynamic_cast<bbTrackView *>( w->parentWidget() );
if( bbtv != NULL && bbtv->getBBTrack() == bbt )
{
p.setPen( QColor( 255, 255, 255 ) );
}
}
p.drawText( x, height() / 2 + p.fontMetrics().height() / 2 - 4,
text() );

View File

@@ -597,6 +597,12 @@ void bbTrackView::clickedTrackLabel( void )
engine::getBBTrackContainer()->setCurrentBB(
bbTrack::numOfBBTrack( m_bbTrack ) );
engine::getBBEditor()->show();
foreach( bbTrackView * tv,
getTrackContainerView()->findChildren<bbTrackView *>() )
{
tv->m_trackLabel->update();
}
}

View File

@@ -940,7 +940,7 @@ void patternView::mousePressEvent( QMouseEvent * _me )
{
if( _me->button() == Qt::LeftButton &&
m_pat->m_patternType == pattern::BeatPattern &&
( fixedTCOs() || pixelsPerTact() >= 192 ||
( fixedTCOs() || pixelsPerTact() >= 96 ||
m_pat->m_steps != DEFAULT_STEPS_PER_TACT ) &&
_me->y() > height() - s_stepBtnOff->height() )
{
@@ -1067,17 +1067,11 @@ void patternView::paintEvent( QPaintEvent * )
lingrad.setColorAt( 0, c );
lingrad.setColorAt( 0.5, Qt::black );
lingrad.setColorAt( 1, c );
p.fillRect( QRect( 1, 1, width() - 2, height() - 2 ), lingrad );
p.setPen( QColor( 57, 69, 74 ) );
p.drawLine( 0, 0, width(), 0 );
p.drawLine( 0, 0, 0, height() );
p.setPen( QColor( 120, 130, 140 ) );
p.drawLine( 0, height() - 1, width() - 1, height() - 1 );
p.drawLine( width() - 1, 0, width() - 1, height() - 1 );
p.setBrush( lingrad );
p.setPen( QColor( 0, 0, 0 ) );
p.drawRect( 1, 1, width() - 2, height() - 2 );
//p.drawRect( 0, 0, width() - 1, height() - 1 );
p.drawRect( QRect( 0, 0, width() - 1, height() - 1 ) );
const float ppt = fixedTCOs() ?
( parentWidget()->width() - 2 * TCO_BORDER_WIDTH )
@@ -1230,7 +1224,12 @@ void patternView::paintEvent( QPaintEvent * )
{
p.setPen( QColor( 32, 240, 32 ) );
}
p.drawText( 2, p.fontMetrics().height() - 1, m_pat->name() );
if( m_pat->name() != m_pat->getInstrumentTrack()->name() )
{
p.drawText( 2, p.fontMetrics().height() - 1, m_pat->name() );
}
if( m_pat->muted() )
{
p.drawPixmap( 3, p.fontMetrics().height() + 1,