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:
Tobias Doerffel
2008-09-08 12:47:11 +00:00
parent 98ddc0df71
commit da2fcf130a
71 changed files with 165 additions and 90 deletions

View File

@@ -1,5 +1,77 @@
2008-09-08 Tobias Doerffel <tobydox/at/users/dot/sourceforge/dot/net>
* buildtools/bin2res.cpp:
* plugins/bit_invader/logo.png:
* plugins/bit_invader/bit_invader.cpp:
* plugins/bit_invader/wavegraph.png:
* plugins/bit_invader/wavegraph3.png:
* plugins/bit_invader/artwork.png:
* plugins/lb302/artwork.png:
* plugins/papu/artwork.png:
* plugins/sf2_player/chorus_off.png:
* plugins/sf2_player/chorus_on.png:
* plugins/sf2_player/logo.png:
* plugins/sf2_player/sf2_player.cpp:
* plugins/sf2_player/fileselect_off.png:
* plugins/sf2_player/fileselect_on.png:
* plugins/sf2_player/reverb_off.png:
* plugins/sf2_player/patches_off.png:
* plugins/sf2_player/patches_on.png:
* plugins/sf2_player/artwork.png:
* plugins/sid/3off.png:
* plugins/sid/8580red.png:
* plugins/sid/trianglered.png:
* plugins/sid/logo.png:
* plugins/sid/bp.png:
* plugins/sid/6581.png:
* plugins/sid/8580.png:
* plugins/sid/syncred.png:
* plugins/sid/hp.png:
* plugins/sid/lp.png:
* plugins/sid/sync.png:
* plugins/sid/noise.png:
* plugins/sid/test.png:
* plugins/sid/pulsered.png:
* plugins/sid/filter.png:
* plugins/sid/sawred.png:
* plugins/sid/3offred.png:
* plugins/sid/pulse.png:
* plugins/sid/artwork.png:
* plugins/sid/saw.png:
* plugins/sid/bpred.png:
* plugins/sid/6581red.png:
* plugins/sid/ring.png:
* plugins/sid/hpred.png:
* plugins/sid/triangle.png:
* plugins/sid/lpred.png:
* plugins/sid/noisered.png:
* plugins/sid/testred.png:
* plugins/sid/filterred.png:
* plugins/sid/ringred.png:
* plugins/spectrum_analyzer/log_x_axis.png:
* plugins/spectrum_analyzer/log_y_axis.png:
* plugins/spectrum_analyzer/background.png:
* plugins/spectrum_analyzer/spectrum_background.png:
* plugins/spectrum_analyzer/spectrum_background_plain.png:
* plugins/vestige/vestige.cpp:
* plugins/vst_base/remote_vst_plugin.cpp:
* data/themes/default/groupbox_led_bg.png:
* include/aeffectx.h:
* include/effect_rack_view.h:
* include/group_box.h:
* include/gui_templates.h:
* src/core/piano.cpp:
* src/gui/fx_mixer_view.cpp:
* src/gui/plugin_browser.cpp:
* src/gui/widgets/effect_rack_view.cpp:
* src/gui/widgets/group_box.cpp:
* src/gui/widgets/instrument_function_views.cpp:
* src/gui/widgets/instrument_midi_io_view.cpp:
* src/gui/widgets/instrument_sound_shaping_view.cpp:
* src/gui/widgets/knob.cpp:
* src/gui/widgets/tab_widget.cpp:
UI finetuning / recompression of some PNG-files
* src/core/remote_plugin.cpp:
improved destruction

View File

@@ -1,7 +1,7 @@
/*
* bin2res.cpp - generate embedded resources from binary data (based on qembed)
*
* Copyright (c) 2005 Tobias Doerffel <tobydox/at/users.sourceforge.net>
* Copyright (c) 2005-2008 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
@@ -97,7 +97,7 @@ int main( int argc, char * * argv )
e->cname = convertFileNameToCIdentifier( e->name );
embedded_data.push_back( e );
std::string s;
std::cout << "const unsigned char " << e->cname <<
std::cout << "static const unsigned char " << e->cname <<
"_data[] = {";
embedData( data, fsize, std::cout );
std::cout << std::endl << "};" << std::endl << std::endl;
@@ -106,7 +106,7 @@ int main( int argc, char * * argv )
if( embedded_data.size() > 0 )
{
std::cout << "const unsigned char dummy_data[] ="
std::cout << "static const unsigned char dummy_data[] ="
"{ 0x00 };" << std::endl << std::endl;
embed * dummy = new embed;
dummy->size = 1;
@@ -116,7 +116,7 @@ int main( int argc, char * * argv )
std::cout << "#include <string.h>" << std::endl << std::endl;
std::cout << "#include \"embed.h\"" << std::endl << std::endl;
std::cout << "embed::descriptor embed_vec[] = {" << std::endl;
std::cout << "static embed::descriptor embed_vec[] = {" << std::endl;
/* << "{" << std::endl
<< " int size;" << std::endl
<< " const unsigned char * data;" <<

Binary file not shown.

Before

Width:  |  Height:  |  Size: 146 B

View File

@@ -96,6 +96,7 @@ int effEditGetRect = 13;
int effEditOpen = 14;
int effEditClose = 15;
int effEditIdle = 19;
int effEditTop = 20;
int effProcessEvents = 25;
int effGetEffectName = 45;
int effGetParameterProperties = 47; // missing

View File

@@ -31,7 +31,6 @@
#include "effect_chain.h"
#include "types.h"
class QPushButton;
class QScrollArea;
class QVBoxLayout;
@@ -46,7 +45,7 @@ public:
effectRackView( effectChain * _model, QWidget * _parent = NULL );
virtual ~effectRackView();
void clear( void );
void clearViews( void );
public slots:
@@ -79,8 +78,7 @@ private:
QVBoxLayout * m_mainLayout;
groupBox * m_effectsGroupBox;
QScrollArea * m_scrollArea;
QPushButton * m_addButton;
Uint32 m_lastY;
} ;

View File

@@ -1,7 +1,7 @@
/*
* group_box.h - LMMS-groupbox
*
* 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
*
@@ -53,8 +53,6 @@ protected:
private:
void updatePixmap( void );
static QPixmap * s_ledBg;
pixmapButton * m_led;
QString m_caption;

View File

@@ -1,7 +1,7 @@
/*
* gui_templates.h - GUI-specific templates
*
* 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
*
@@ -26,6 +26,8 @@
#ifndef _GUI_TEMPLATES_H
#define _GUI_TEMPLATES_H
#include "lmmsconfig.h"
#include <QtGui/QApplication>
#include <QtGui/QFont>
#include <QtGui/QDesktopWidget>
@@ -37,7 +39,7 @@
template<int SIZE>
inline QFont pointSize( QFont _f )
{
static const int DPI = 96;
static const float DPI = 96;
_f.setPointSizeF( (float) SIZE * DPI /
QApplication::desktop()->logicalDpiY() );
return( _f );
@@ -46,9 +48,14 @@ inline QFont pointSize( QFont _f )
inline QFont pointSizeF( QFont _f, float SIZE )
{
static const int DPI = 96;
static const float DPI = 96;
#ifdef LMMS_BUILD_WIN32
_f.setPointSizeF( (SIZE+0.5f) * DPI /
QApplication::desktop()->logicalDpiY() );
#else
_f.setPointSizeF( SIZE * DPI /
QApplication::desktop()->logicalDpiY() );
#endif
return( _f );
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 44 KiB

View File

@@ -342,7 +342,7 @@ bitInvaderView::bitInvaderView( instrument * _instrument,
pal = QPalette();
pal.setBrush( backgroundRole(),
PLUGIN_NAME::getIconPixmap("wavegraph3") );
PLUGIN_NAME::getIconPixmap("wavegraph") );
m_graph->setPalette( pal );

Binary file not shown.

Before

Width:  |  Height:  |  Size: 960 B

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 182 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 182 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 83 KiB

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 73 KiB

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 87 KiB

After

Width:  |  Height:  |  Size: 75 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 676 B

After

Width:  |  Height:  |  Size: 936 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 775 B

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 624 B

After

Width:  |  Height:  |  Size: 884 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 648 B

After

Width:  |  Height:  |  Size: 893 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@@ -51,9 +51,9 @@ extern "C"
plugin::descriptor sf2player_plugin_descriptor =
{
STRINGIFY_PLUGIN_NAME( PLUGIN_NAME ),
"Sf2Player",
"Sf2 Player",
QT_TRANSLATE_NOOP( "pluginBrowser",
"SoundFont synthesizer" ),
"Player for SoundFont files" ),
"Paul Giblock <drfaygo/at/gmail/dot/com>",
0x0100,
plugin::Instrument,

Binary file not shown.

Before

Width:  |  Height:  |  Size: 539 B

After

Width:  |  Height:  |  Size: 473 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 592 B

After

Width:  |  Height:  |  Size: 469 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 593 B

After

Width:  |  Height:  |  Size: 511 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 677 B

After

Width:  |  Height:  |  Size: 512 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 609 B

After

Width:  |  Height:  |  Size: 538 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 683 B

After

Width:  |  Height:  |  Size: 537 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 86 KiB

After

Width:  |  Height:  |  Size: 85 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 354 B

After

Width:  |  Height:  |  Size: 292 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 381 B

After

Width:  |  Height:  |  Size: 292 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 367 B

After

Width:  |  Height:  |  Size: 302 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 407 B

After

Width:  |  Height:  |  Size: 302 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 380 B

After

Width:  |  Height:  |  Size: 320 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 420 B

After

Width:  |  Height:  |  Size: 323 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 339 B

After

Width:  |  Height:  |  Size: 282 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 363 B

After

Width:  |  Height:  |  Size: 280 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 450 B

After

Width:  |  Height:  |  Size: 402 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 475 B

After

Width:  |  Height:  |  Size: 403 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 457 B

After

Width:  |  Height:  |  Size: 439 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 457 B

After

Width:  |  Height:  |  Size: 403 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 450 B

After

Width:  |  Height:  |  Size: 353 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 436 B

After

Width:  |  Height:  |  Size: 353 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 505 B

After

Width:  |  Height:  |  Size: 474 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 508 B

After

Width:  |  Height:  |  Size: 468 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 478 B

After

Width:  |  Height:  |  Size: 402 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 560 B

After

Width:  |  Height:  |  Size: 405 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 485 B

After

Width:  |  Height:  |  Size: 407 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 541 B

After

Width:  |  Height:  |  Size: 400 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 510 B

After

Width:  |  Height:  |  Size: 450 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 510 B

After

Width:  |  Height:  |  Size: 440 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 598 B

After

Width:  |  Height:  |  Size: 734 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 577 B

After

Width:  |  Height:  |  Size: 763 B

View File

@@ -294,8 +294,8 @@ vestigeInstrumentView::vestigeInstrumentView( instrument * _instrument,
"clicking on this button, a file-open-dialog appears "
"and you can select your file." ) );
m_toggleGUIButton = new QPushButton( tr( "Show/hide VST-GUI" ), this );
m_toggleGUIButton->setGeometry( 45, 150, 160, 24 );
m_toggleGUIButton = new QPushButton( tr( "Show/hide GUI" ), this );
m_toggleGUIButton->setGeometry( 20, 150, 200, 24 );
m_toggleGUIButton->setIcon( embed::getIconPixmap( "zoom" ) );
m_toggleGUIButton->setFont( pointSize<8>( m_toggleGUIButton->font() ) );
connect( m_toggleGUIButton, SIGNAL( clicked() ), this,
@@ -306,7 +306,7 @@ vestigeInstrumentView::vestigeInstrumentView( instrument * _instrument,
QPushButton * note_off_all_btn = new QPushButton( tr( "Turn off all "
"notes" ), this );
note_off_all_btn->setGeometry( 45, 180, 160, 24 );
note_off_all_btn->setGeometry( 20, 180, 200, 24 );
note_off_all_btn->setIcon( embed::getIconPixmap( "state_stop" ) );
note_off_all_btn->setFont( pointSize<8>( note_off_all_btn->font() ) );
connect( note_off_all_btn, SIGNAL( clicked() ), this,

View File

@@ -1013,10 +1013,6 @@ DWORD WINAPI remoteVstPlugin::guiEventLoop( LPVOID _param )
return( 1 );
}
ShowWindow( _this->m_window, SW_SHOWNORMAL );
_this->m_windowID = (Sint32) GetPropA( _this->m_window,
"__wine_x11_whole_window" );
#else
_this->m_windowID = 1; // arbitrary value on win32 to signal
// vstPlugin-class that we have an editor
@@ -1034,10 +1030,16 @@ DWORD WINAPI remoteVstPlugin::guiEventLoop( LPVOID _param )
_this->m_windowHeight = er->bottom - er->top;
SetWindowPos( _this->m_window, 0, 0, 0, _this->m_windowWidth + 8,
_this->m_windowHeight + 26, SWP_SHOWWINDOW );
_this->m_windowHeight + 26, SWP_NOMOVE | SWP_NOZORDER );
_this->m_plugin->dispatcher( _this->m_plugin, effEditTop, 0, 0,
NULL, 0 );
UpdateWindow( _this->m_window );
ShowWindow( _this->m_window, SW_SHOWNORMAL );
#ifdef LMMS_BUILD_LINUX
_this->m_windowID = (Sint32) GetPropA( _this->m_window,
"__wine_x11_whole_window" );
#endif
pthread_cond_signal( &_this->m_windowStatusChange );

View File

@@ -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 );
}

View File

@@ -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();
}
}

View File

@@ -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 );

View File

@@ -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();
}

View File

@@ -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 ) );

View File

@@ -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;

View File

@@ -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, "---" );

View File

@@ -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;

View File

@@ -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 );
}

View File

@@ -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 )