UI finetuning / recompression of some PNG-files
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1589 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
@@ -805,29 +805,33 @@ void pianoView::paintEvent( QPaintEvent * )
|
||||
|
||||
// draw blue bar above the actual keyboard (there will be the labels
|
||||
// for all C's)
|
||||
p.fillRect( QRect( 0, 1, width(), PIANO_BASE-2 ),
|
||||
QColor( 0x00, 0x00, 0xFF ) );
|
||||
QLinearGradient g( 0, 0, 0, PIANO_BASE-3 );
|
||||
g.setColorAt( 0, Qt::black );
|
||||
g.setColorAt( 0.1, QColor( 96, 96, 96 ) );
|
||||
g.setColorAt( 1, Qt::black );
|
||||
p.fillRect( QRect( 0, 1, width(), PIANO_BASE-2 ), g );
|
||||
|
||||
// draw stuff above the actual keyboard
|
||||
p.setPen( QColor( 0x00, 0x00, 0x00 ) );
|
||||
p.setPen( Qt::black );
|
||||
p.drawLine( 0, 0, width(), 0 );
|
||||
p.drawLine( 0, PIANO_BASE-1, width(), PIANO_BASE-1 );
|
||||
|
||||
p.setPen( QColor ( 0xFF, 0xFF, 0xFF ) );
|
||||
p.setPen( Qt::white );
|
||||
|
||||
const int base_key = ( m_piano != NULL ) ?
|
||||
m_piano->m_instrumentTrack->baseNoteModel()->value() : 0;
|
||||
g.setColorAt( 0, QColor( 0, 96, 0 ) );
|
||||
g.setColorAt( 0.1, QColor( 64, 255, 64 ) );
|
||||
g.setColorAt( 1, QColor( 0, 96, 0 ) );
|
||||
if( KEY_ORDER[base_key % KeysPerOctave] == WhiteKey )
|
||||
{
|
||||
p.fillRect( QRect( getKeyX( base_key ), 1, PW_WHITE_KEY_WIDTH-1,
|
||||
PIANO_BASE-2 ),
|
||||
QColor( 0xFF, 0xBB, 0x00 ) );
|
||||
PIANO_BASE-2 ), g );
|
||||
}
|
||||
else
|
||||
{
|
||||
p.fillRect( QRect( getKeyX( base_key ) + 1, 1,
|
||||
PW_BLACK_KEY_WIDTH - 1, PIANO_BASE - 2 ),
|
||||
QColor( 0xFF, 0xBB, 0x00 ) );
|
||||
PW_BLACK_KEY_WIDTH - 1, PIANO_BASE - 2 ), g );
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -303,7 +303,7 @@ void fxMixerView::clear( void )
|
||||
{
|
||||
for( int i = 0; i <= NumFxChannels; ++i )
|
||||
{
|
||||
m_fxChannelViews[i].m_rackView->clear();
|
||||
m_fxChannelViews[i].m_rackView->clearViews();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ pluginBrowser::pluginBrowser( QWidget * _parent ) :
|
||||
sideBarWidget( tr( "Instrument plugins" ),
|
||||
embed::getIconPixmap( "plugins" ), _parent )
|
||||
{
|
||||
setWindowTitle( tr( "Plugin browser" ) );
|
||||
setWindowTitle( tr( "Instrument browser" ) );
|
||||
m_view = new QWidget( contentParent() );
|
||||
//m_view->setFrameShape( QFrame::NoFrame );
|
||||
|
||||
@@ -52,14 +52,13 @@ pluginBrowser::pluginBrowser( QWidget * _parent ) :
|
||||
|
||||
QVBoxLayout * view_layout = new QVBoxLayout( m_view );
|
||||
view_layout->setMargin( 5 );
|
||||
view_layout->setSpacing( 10 );
|
||||
view_layout->setSpacing( 5 );
|
||||
|
||||
|
||||
QLabel * hint = new QLabel( tr( "You can drag an instrument-plugin "
|
||||
QLabel * hint = new QLabel( tr( "Drag an instrument "
|
||||
"into either the Song-Editor, the "
|
||||
"Beat+Bassline Editor or just into a "
|
||||
"channel-window or on the "
|
||||
"corresponding channel-button." ),
|
||||
"Beat+Bassline Editor or into an "
|
||||
"existing instrument track." ),
|
||||
m_view );
|
||||
hint->setFont( pointSize<8>( hint->font() ) );
|
||||
hint->setWordWrap( TRUE );
|
||||
|
||||
@@ -45,7 +45,7 @@ effectRackView::effectRackView( effectChain * _model, QWidget * _parent ) :
|
||||
setFixedSize( 250, 250 );
|
||||
|
||||
m_effectsGroupBox = new groupBox( tr( "EFFECTS CHAIN" ), this );
|
||||
m_effectsGroupBox->setGeometry( 2, 2, 242, 244 );
|
||||
m_effectsGroupBox->setGeometry( 4, 5, 242, 240 );
|
||||
|
||||
m_scrollArea = new QScrollArea( m_effectsGroupBox );
|
||||
m_scrollArea->setFixedSize( 230, 184 );
|
||||
@@ -53,11 +53,10 @@ effectRackView::effectRackView( effectChain * _model, QWidget * _parent ) :
|
||||
m_scrollArea->setPalette( QApplication::palette( m_scrollArea ) );
|
||||
m_scrollArea->move( 6, 22 );
|
||||
|
||||
m_addButton = new QPushButton( m_effectsGroupBox );
|
||||
m_addButton->setText( tr( "Add" ) );
|
||||
m_addButton->move( 75, 210 );
|
||||
connect( m_addButton, SIGNAL( clicked( void ) ),
|
||||
this, SLOT( addEffect( void ) ) );
|
||||
QPushButton * addButton = new QPushButton( m_effectsGroupBox );
|
||||
addButton->setText( tr( "Add effect" ) );
|
||||
addButton->move( 8, 210 );
|
||||
connect( addButton, SIGNAL( clicked() ), this, SLOT( addEffect() ) );
|
||||
|
||||
QWidget * w = new QWidget;
|
||||
m_scrollArea->setWidget( w );
|
||||
@@ -71,14 +70,14 @@ effectRackView::effectRackView( effectChain * _model, QWidget * _parent ) :
|
||||
|
||||
effectRackView::~effectRackView()
|
||||
{
|
||||
clear();
|
||||
clearViews();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void effectRackView::clear( void )
|
||||
void effectRackView::clearViews( void )
|
||||
{
|
||||
for( QVector<effectView *>::iterator it = m_effectViews.begin();
|
||||
it != m_effectViews.end(); ++it )
|
||||
@@ -245,7 +244,7 @@ void effectRackView::addEffect( void )
|
||||
|
||||
void effectRackView::modelChanged( void )
|
||||
{
|
||||
clear();
|
||||
clearViews();
|
||||
m_effectsGroupBox->setModel( &fxChain()->m_enabledModel );
|
||||
update();
|
||||
}
|
||||
|
||||
@@ -41,25 +41,17 @@
|
||||
#include "gui_templates.h"
|
||||
|
||||
|
||||
QPixmap * groupBox::s_ledBg = NULL;
|
||||
|
||||
|
||||
groupBox::groupBox( const QString & _caption, QWidget * _parent ) :
|
||||
QWidget( _parent ),
|
||||
boolModelView( NULL, this ),
|
||||
m_caption( _caption )
|
||||
{
|
||||
if( s_ledBg == NULL )
|
||||
{
|
||||
s_ledBg = new QPixmap( embed::getIconPixmap(
|
||||
"groupbox_led_bg" ) );
|
||||
}
|
||||
|
||||
updatePixmap();
|
||||
|
||||
m_led = new pixmapButton( this, _caption );
|
||||
m_led->setCheckable( TRUE );
|
||||
m_led->move( 2, 3 );
|
||||
m_led->move( 3, 3 );
|
||||
m_led->setActiveGraphic( embed::getIconPixmap( "led_green" ) );
|
||||
m_led->setInactiveGraphic( embed::getIconPixmap( "led_off" ) );
|
||||
|
||||
@@ -108,35 +100,35 @@ void groupBox::resizeEvent( QResizeEvent * _ev )
|
||||
|
||||
void groupBox::updatePixmap( void )
|
||||
{
|
||||
const int c = 0;
|
||||
QColor bg_color = QApplication::palette().color( QPalette::Active,
|
||||
QPalette::Background );
|
||||
QPixmap pm( size() );
|
||||
pm.fill( bg_color.dark( 132 ) );
|
||||
pm.fill( bg_color/*.dark( 132 )*/ );
|
||||
|
||||
QPainter p( &pm );
|
||||
|
||||
// outer rect
|
||||
p.setPen( bg_color.dark( 200 ) );
|
||||
p.drawRect( 0, 0, width() - 1 + c, height() - 1 + c );
|
||||
p.setPen( bg_color.dark( 150 ) );
|
||||
p.drawRect( 0, 0, width() - 1, height() - 1 );
|
||||
|
||||
// brighter line at bottom/right
|
||||
p.setPen( bg_color.light( 125 ) );
|
||||
p.setPen( bg_color.light( 150 ) );
|
||||
p.drawLine( width() - 1, 0, width() - 1, height() - 1 );
|
||||
p.drawLine( 0, height() - 1, width() - 1, height() - 1 );
|
||||
|
||||
// draw our led-pixmap
|
||||
p.drawPixmap( 2, 2, *s_ledBg );
|
||||
|
||||
// draw groupbox-titlebar
|
||||
p.fillRect( 2, 2, width() - 4, 9, bg_color.dark( 300 ) );
|
||||
QLinearGradient g( 0, 0, 0, 9 );
|
||||
g.setColorAt( 0, bg_color.darker( 250 ) );
|
||||
g.setColorAt( 0.1, bg_color.lighter( 120 ) );
|
||||
g.setColorAt( 1, bg_color.darker( 250 ) );
|
||||
p.fillRect( 2, 2, width() - 4, 9, g );
|
||||
|
||||
// draw line below titlebar
|
||||
p.setPen( bg_color.dark( 400 ) );
|
||||
p.drawLine( 2 + s_ledBg->width(), 11, width() - 3, 11 );
|
||||
p.drawLine( 1, 11, width() - 3, 11 );
|
||||
|
||||
// black inner rect
|
||||
p.drawRect( 1, 1, width() - 3 + c, height() - 3 + c );
|
||||
p.drawRect( 1, 1, width() - 3, height() - 3 );
|
||||
|
||||
|
||||
//p.setPen( QColor( 255, 255, 255 ) );
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
|
||||
const int CHORDS_GROUPBOX_X = 4;
|
||||
const int CHORDS_GROUPBOX_Y = 5;
|
||||
const int CHORDS_GROUPBOX_WIDTH = 238;
|
||||
const int CHORDS_GROUPBOX_WIDTH = 242;
|
||||
const int CHORDS_GROUPBOX_HEIGHT = 65;
|
||||
const int ARP_GROUPBOX_X = CHORDS_GROUPBOX_X;
|
||||
const int ARP_GROUPBOX_Y = 10 + CHORDS_GROUPBOX_Y + CHORDS_GROUPBOX_HEIGHT;
|
||||
|
||||
@@ -50,7 +50,7 @@ instrumentMidiIOView::instrumentMidiIOView( QWidget * _parent ) :
|
||||
m_setupTabWidget = new tabWidget(
|
||||
tr( "MIDI SETUP FOR THIS INSTRUMENT" ),
|
||||
this );
|
||||
m_setupTabWidget->setGeometry( 4, 5, 238, 200 );
|
||||
m_setupTabWidget->setGeometry( 4, 5, 242, 200 );
|
||||
|
||||
m_inputChannelSpinBox = new lcdSpinBox( 3, m_setupTabWidget );
|
||||
m_inputChannelSpinBox->addTextForValue( 0, "---" );
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
|
||||
const int TARGETS_TABWIDGET_X = 4;
|
||||
const int TARGETS_TABWIDGET_Y = 5;
|
||||
const int TARGETS_TABWIDGET_WIDTH = 238;
|
||||
const int TARGETS_TABWIDGET_WIDTH = 242;
|
||||
const int TARGETS_TABWIDGET_HEIGTH = 175;
|
||||
|
||||
const int FILTER_GROUPBOX_X = TARGETS_TABWIDGET_X;
|
||||
|
||||
@@ -109,9 +109,9 @@ void knob::setLabel( const QString & _txt )
|
||||
if( m_knobPixmap )
|
||||
{
|
||||
setFixedSize( tMax<int>( m_knobPixmap->width(),
|
||||
QFontMetrics( pointSize<6>( font()
|
||||
) ).width( m_label ) ),
|
||||
m_knobPixmap->height() + 10 );
|
||||
QFontMetrics( pointSizeF( font(), 6
|
||||
) ).width( m_label ) ),
|
||||
m_knobPixmap->height() + 10 );
|
||||
}
|
||||
update();
|
||||
}
|
||||
@@ -516,7 +516,7 @@ void knob::paintEvent( QPaintEvent * _me )
|
||||
drawKnob( &p );
|
||||
if( !m_label.isEmpty() )
|
||||
{
|
||||
p.setFont( pointSize<6>( p.font() ) );
|
||||
p.setFont( pointSizeF( p.font(), 6 ) );
|
||||
/* p.setPen( QColor( 64, 64, 64 ) );
|
||||
p.drawText( width() / 2 -
|
||||
p.fontMetrics().width( m_label ) / 2 + 1,
|
||||
@@ -619,11 +619,11 @@ QString knob::displayValue( void ) const
|
||||
if( isVolumeKnob() &&
|
||||
configManager::inst()->value( "app", "displaydbv" ).toInt() )
|
||||
{
|
||||
return( m_description + QString( " %1 dBV" ).arg(
|
||||
20.0 * log10( model()->value() / 100.0 ),
|
||||
3, 'f', 2 ) );
|
||||
return( m_description.trimmed() + QString( " %1 dBV" ).
|
||||
arg( 20.0 * log10( model()->value() / 100.0 ),
|
||||
3, 'f', 2 ) );
|
||||
}
|
||||
return( m_description + QString( " %1" ).
|
||||
return( m_description.trimmed() + QString( " %1" ).
|
||||
arg( model()->value() ) + m_unit );
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
/*
|
||||
* tab_widget.cpp - tabwidget for LMMS
|
||||
*
|
||||
* Copyright (c) 2005-2007 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2005-2008 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -46,7 +46,7 @@ tabWidget::tabWidget( const QString & _caption, QWidget * _parent ) :
|
||||
setAutoFillBackground( TRUE );
|
||||
QColor bg_color = QApplication::palette().color( QPalette::Active,
|
||||
QPalette::Background ).
|
||||
dark( 132 );
|
||||
darker( 132 );
|
||||
QPalette pal = palette();
|
||||
pal.setColor( QPalette::Background, bg_color );
|
||||
setPalette( pal );
|
||||
@@ -151,23 +151,26 @@ void tabWidget::paintEvent( QPaintEvent * _pe )
|
||||
|
||||
QColor bg_color = QApplication::palette().color( QPalette::Active,
|
||||
QPalette::Background );
|
||||
p.fillRect( 0, 0, width() - 1, height() - 1, bg_color.dark( 132 ) );
|
||||
QLinearGradient g( 0, 0, 0, 10 );
|
||||
g.setColorAt( 0, bg_color.darker( 250 ) );
|
||||
g.setColorAt( 0.1, bg_color.lighter( 120 ) );
|
||||
g.setColorAt( 1, bg_color.darker( 250 ) );
|
||||
p.fillRect( 0, 0, width() - 1, height() - 1, bg_color );
|
||||
|
||||
const int c = 0;
|
||||
bool big_tab_captions = ( m_caption == "" );
|
||||
int add = big_tab_captions ? 1 : 0;
|
||||
|
||||
p.setPen( bg_color.dark( 200 ) );
|
||||
p.drawRect( 0, 0, width() - 1 + c, height() - 1 + c );
|
||||
p.setPen( bg_color.darker( 150 ) );
|
||||
p.drawRect( 0, 0, width() - 1, height() - 1 );
|
||||
|
||||
p.setPen( bg_color.light( 125 ) );
|
||||
p.setPen( bg_color.light( 150 ) );
|
||||
p.drawLine( width() - 1, 0, width() - 1, height() - 1 );
|
||||
p.drawLine( 0, height() - 1, width() - 1, height() - 1 );
|
||||
|
||||
p.setPen( QColor( 0, 0, 0 ) );
|
||||
p.drawRect( 1, 1, width() - 3 + c, height() - 3 + c );
|
||||
p.drawRect( 1, 1, width() - 3, height() - 3 );
|
||||
|
||||
p.fillRect( 2, 2, width() - 4, 9 + add, bg_color.dark( 300 ) );
|
||||
p.fillRect( 2, 2, width() - 4, 9 + add, g );
|
||||
p.drawLine( 2, 11 + add, width() - 3, 11 + add );
|
||||
|
||||
if( !big_tab_captions )
|
||||
|
||||
Reference in New Issue
Block a user