diff --git a/ChangeLog b/ChangeLog index 539b2e78cf..3892f92623 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,77 @@ 2008-09-08 Tobias Doerffel + * 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 diff --git a/buildtools/bin2res.cpp b/buildtools/bin2res.cpp index 1a597c8e75..d1cdaf242c 100644 --- a/buildtools/bin2res.cpp +++ b/buildtools/bin2res.cpp @@ -1,7 +1,7 @@ /* * bin2res.cpp - generate embedded resources from binary data (based on qembed) * - * Copyright (c) 2005 Tobias Doerffel + * Copyright (c) 2005-2008 Tobias Doerffel * * 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 " << 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;" << diff --git a/data/themes/default/groupbox_led_bg.png b/data/themes/default/groupbox_led_bg.png deleted file mode 100644 index f7187364d8..0000000000 Binary files a/data/themes/default/groupbox_led_bg.png and /dev/null differ diff --git a/include/aeffectx.h b/include/aeffectx.h index 7b524a509a..a355217cce 100644 --- a/include/aeffectx.h +++ b/include/aeffectx.h @@ -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 diff --git a/include/effect_rack_view.h b/include/effect_rack_view.h index 90f4e24e15..deb3ebec76 100644 --- a/include/effect_rack_view.h +++ b/include/effect_rack_view.h @@ -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; } ; diff --git a/include/group_box.h b/include/group_box.h index 6b2146d916..40bbeac263 100644 --- a/include/group_box.h +++ b/include/group_box.h @@ -1,7 +1,7 @@ /* * group_box.h - LMMS-groupbox * - * Copyright (c) 2005-2007 Tobias Doerffel + * Copyright (c) 2005-2008 Tobias Doerffel * * 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; diff --git a/include/gui_templates.h b/include/gui_templates.h index 1bbda2cab9..a831e54229 100644 --- a/include/gui_templates.h +++ b/include/gui_templates.h @@ -1,7 +1,7 @@ /* * gui_templates.h - GUI-specific templates * - * Copyright (c) 2005-2007 Tobias Doerffel + * Copyright (c) 2005-2008 Tobias Doerffel * * 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 #include #include @@ -37,7 +39,7 @@ template 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 ); } diff --git a/plugins/bit_invader/artwork.png b/plugins/bit_invader/artwork.png index 5495ad7d0c..3938592ca9 100644 Binary files a/plugins/bit_invader/artwork.png and b/plugins/bit_invader/artwork.png differ diff --git a/plugins/bit_invader/bit_invader.cpp b/plugins/bit_invader/bit_invader.cpp index d79e44c58d..9522012b18 100644 --- a/plugins/bit_invader/bit_invader.cpp +++ b/plugins/bit_invader/bit_invader.cpp @@ -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 ); diff --git a/plugins/bit_invader/logo.png b/plugins/bit_invader/logo.png index a2f60f7bca..2e84cba5a1 100644 Binary files a/plugins/bit_invader/logo.png and b/plugins/bit_invader/logo.png differ diff --git a/plugins/bit_invader/wavegraph.png b/plugins/bit_invader/wavegraph.png index 750752ceae..2f29acbd73 100644 Binary files a/plugins/bit_invader/wavegraph.png and b/plugins/bit_invader/wavegraph.png differ diff --git a/plugins/bit_invader/wavegraph3.png b/plugins/bit_invader/wavegraph3.png deleted file mode 100644 index 2f29acbd73..0000000000 Binary files a/plugins/bit_invader/wavegraph3.png and /dev/null differ diff --git a/plugins/lb302/artwork.png b/plugins/lb302/artwork.png index c124bcd7c5..c06f348040 100644 Binary files a/plugins/lb302/artwork.png and b/plugins/lb302/artwork.png differ diff --git a/plugins/papu/artwork.png b/plugins/papu/artwork.png index e8e9c225a8..5181e15de3 100644 Binary files a/plugins/papu/artwork.png and b/plugins/papu/artwork.png differ diff --git a/plugins/sf2_player/artwork.png b/plugins/sf2_player/artwork.png index 0836d7905d..cd98120f8f 100644 Binary files a/plugins/sf2_player/artwork.png and b/plugins/sf2_player/artwork.png differ diff --git a/plugins/sf2_player/chorus_off.png b/plugins/sf2_player/chorus_off.png index 6735e67273..14e2414bdf 100644 Binary files a/plugins/sf2_player/chorus_off.png and b/plugins/sf2_player/chorus_off.png differ diff --git a/plugins/sf2_player/chorus_on.png b/plugins/sf2_player/chorus_on.png index 86aa425dba..181385043e 100644 Binary files a/plugins/sf2_player/chorus_on.png and b/plugins/sf2_player/chorus_on.png differ diff --git a/plugins/sf2_player/fileselect_off.png b/plugins/sf2_player/fileselect_off.png index ae5c3544c7..e95e10ba85 100644 Binary files a/plugins/sf2_player/fileselect_off.png and b/plugins/sf2_player/fileselect_off.png differ diff --git a/plugins/sf2_player/fileselect_on.png b/plugins/sf2_player/fileselect_on.png index ad73da5836..9f735ae960 100644 Binary files a/plugins/sf2_player/fileselect_on.png and b/plugins/sf2_player/fileselect_on.png differ diff --git a/plugins/sf2_player/logo.png b/plugins/sf2_player/logo.png index ab100f812e..1c900e8ff0 100644 Binary files a/plugins/sf2_player/logo.png and b/plugins/sf2_player/logo.png differ diff --git a/plugins/sf2_player/patches_off.png b/plugins/sf2_player/patches_off.png index 66533e6cf4..e77637bb44 100644 Binary files a/plugins/sf2_player/patches_off.png and b/plugins/sf2_player/patches_off.png differ diff --git a/plugins/sf2_player/patches_on.png b/plugins/sf2_player/patches_on.png index 63bc5ef467..349882abf5 100644 Binary files a/plugins/sf2_player/patches_on.png and b/plugins/sf2_player/patches_on.png differ diff --git a/plugins/sf2_player/reverb_off.png b/plugins/sf2_player/reverb_off.png index 286880801f..83478c51b0 100644 Binary files a/plugins/sf2_player/reverb_off.png and b/plugins/sf2_player/reverb_off.png differ diff --git a/plugins/sf2_player/sf2_player.cpp b/plugins/sf2_player/sf2_player.cpp index 846858ba55..b4ccebad47 100644 --- a/plugins/sf2_player/sf2_player.cpp +++ b/plugins/sf2_player/sf2_player.cpp @@ -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 ", 0x0100, plugin::Instrument, diff --git a/plugins/sid/3off.png b/plugins/sid/3off.png index da0e284e07..13cd12aee0 100644 Binary files a/plugins/sid/3off.png and b/plugins/sid/3off.png differ diff --git a/plugins/sid/3offred.png b/plugins/sid/3offred.png index 237a13ce0b..f19cdc1352 100644 Binary files a/plugins/sid/3offred.png and b/plugins/sid/3offred.png differ diff --git a/plugins/sid/6581.png b/plugins/sid/6581.png index ae96b5385a..3d27f18060 100644 Binary files a/plugins/sid/6581.png and b/plugins/sid/6581.png differ diff --git a/plugins/sid/6581red.png b/plugins/sid/6581red.png index e6063d00b3..293c2b2af5 100644 Binary files a/plugins/sid/6581red.png and b/plugins/sid/6581red.png differ diff --git a/plugins/sid/8580.png b/plugins/sid/8580.png index 0fa26ae9c3..26d7d96bb5 100644 Binary files a/plugins/sid/8580.png and b/plugins/sid/8580.png differ diff --git a/plugins/sid/8580red.png b/plugins/sid/8580red.png index 303a70cc60..72e89c51b8 100644 Binary files a/plugins/sid/8580red.png and b/plugins/sid/8580red.png differ diff --git a/plugins/sid/artwork.png b/plugins/sid/artwork.png index 23e4dae913..b5d758cd02 100644 Binary files a/plugins/sid/artwork.png and b/plugins/sid/artwork.png differ diff --git a/plugins/sid/bp.png b/plugins/sid/bp.png index bcad3c0a98..bb0e730ae3 100644 Binary files a/plugins/sid/bp.png and b/plugins/sid/bp.png differ diff --git a/plugins/sid/bpred.png b/plugins/sid/bpred.png index 8a977ef751..69f0f38d44 100644 Binary files a/plugins/sid/bpred.png and b/plugins/sid/bpred.png differ diff --git a/plugins/sid/filter.png b/plugins/sid/filter.png index 21a58e4aa4..0687c0582b 100644 Binary files a/plugins/sid/filter.png and b/plugins/sid/filter.png differ diff --git a/plugins/sid/filterred.png b/plugins/sid/filterred.png index 50ee6fae24..31c6f6e7e4 100644 Binary files a/plugins/sid/filterred.png and b/plugins/sid/filterred.png differ diff --git a/plugins/sid/hp.png b/plugins/sid/hp.png index 082dab535f..ebcbab4436 100644 Binary files a/plugins/sid/hp.png and b/plugins/sid/hp.png differ diff --git a/plugins/sid/hpred.png b/plugins/sid/hpred.png index 1053618dc8..abc47aa7eb 100644 Binary files a/plugins/sid/hpred.png and b/plugins/sid/hpred.png differ diff --git a/plugins/sid/logo.png b/plugins/sid/logo.png index e7687f9de0..6173fd67cc 100644 Binary files a/plugins/sid/logo.png and b/plugins/sid/logo.png differ diff --git a/plugins/sid/lp.png b/plugins/sid/lp.png index 0121406973..cec2f2748c 100644 Binary files a/plugins/sid/lp.png and b/plugins/sid/lp.png differ diff --git a/plugins/sid/lpred.png b/plugins/sid/lpred.png index 8365b9a9f4..99f3622714 100644 Binary files a/plugins/sid/lpred.png and b/plugins/sid/lpred.png differ diff --git a/plugins/sid/noise.png b/plugins/sid/noise.png index bceefd44bf..ccc8bad91d 100644 Binary files a/plugins/sid/noise.png and b/plugins/sid/noise.png differ diff --git a/plugins/sid/noisered.png b/plugins/sid/noisered.png index 2c26105754..873a2b1ab3 100644 Binary files a/plugins/sid/noisered.png and b/plugins/sid/noisered.png differ diff --git a/plugins/sid/pulse.png b/plugins/sid/pulse.png index a2dbe5935e..457bf0d9da 100644 Binary files a/plugins/sid/pulse.png and b/plugins/sid/pulse.png differ diff --git a/plugins/sid/pulsered.png b/plugins/sid/pulsered.png index 81940fd07c..4249a2b67b 100644 Binary files a/plugins/sid/pulsered.png and b/plugins/sid/pulsered.png differ diff --git a/plugins/sid/ring.png b/plugins/sid/ring.png index b81332e40b..d97c7eb409 100644 Binary files a/plugins/sid/ring.png and b/plugins/sid/ring.png differ diff --git a/plugins/sid/ringred.png b/plugins/sid/ringred.png index 21e9f25692..9030d7813a 100644 Binary files a/plugins/sid/ringred.png and b/plugins/sid/ringred.png differ diff --git a/plugins/sid/saw.png b/plugins/sid/saw.png index bd65d12603..6d8b8efb18 100644 Binary files a/plugins/sid/saw.png and b/plugins/sid/saw.png differ diff --git a/plugins/sid/sawred.png b/plugins/sid/sawred.png index fb57e98fcc..b13afde84a 100644 Binary files a/plugins/sid/sawred.png and b/plugins/sid/sawred.png differ diff --git a/plugins/sid/sync.png b/plugins/sid/sync.png index a8105db270..d19c71dc90 100644 Binary files a/plugins/sid/sync.png and b/plugins/sid/sync.png differ diff --git a/plugins/sid/syncred.png b/plugins/sid/syncred.png index 5e7ead1b59..00125f8712 100644 Binary files a/plugins/sid/syncred.png and b/plugins/sid/syncred.png differ diff --git a/plugins/sid/test.png b/plugins/sid/test.png index 2d433609e3..0e7306d97f 100644 Binary files a/plugins/sid/test.png and b/plugins/sid/test.png differ diff --git a/plugins/sid/testred.png b/plugins/sid/testred.png index cf5bc03e5e..fbaf4d1cc9 100644 Binary files a/plugins/sid/testred.png and b/plugins/sid/testred.png differ diff --git a/plugins/sid/triangle.png b/plugins/sid/triangle.png index 6539efe08a..a03406f2d6 100644 Binary files a/plugins/sid/triangle.png and b/plugins/sid/triangle.png differ diff --git a/plugins/sid/trianglered.png b/plugins/sid/trianglered.png index 06831e083d..f2f35c83f8 100644 Binary files a/plugins/sid/trianglered.png and b/plugins/sid/trianglered.png differ diff --git a/plugins/spectrum_analyzer/background.png b/plugins/spectrum_analyzer/background.png index a4cbb7fcd5..548b98a8c5 100644 Binary files a/plugins/spectrum_analyzer/background.png and b/plugins/spectrum_analyzer/background.png differ diff --git a/plugins/spectrum_analyzer/log_x_axis.png b/plugins/spectrum_analyzer/log_x_axis.png index f46d17ae47..97c5e729df 100644 Binary files a/plugins/spectrum_analyzer/log_x_axis.png and b/plugins/spectrum_analyzer/log_x_axis.png differ diff --git a/plugins/spectrum_analyzer/log_y_axis.png b/plugins/spectrum_analyzer/log_y_axis.png index 3fde415cdc..e20d27001f 100644 Binary files a/plugins/spectrum_analyzer/log_y_axis.png and b/plugins/spectrum_analyzer/log_y_axis.png differ diff --git a/plugins/spectrum_analyzer/spectrum_background.png b/plugins/spectrum_analyzer/spectrum_background.png index 18c9dc22ea..573954332e 100644 Binary files a/plugins/spectrum_analyzer/spectrum_background.png and b/plugins/spectrum_analyzer/spectrum_background.png differ diff --git a/plugins/spectrum_analyzer/spectrum_background_plain.png b/plugins/spectrum_analyzer/spectrum_background_plain.png index be471b0e81..7632dd5006 100644 Binary files a/plugins/spectrum_analyzer/spectrum_background_plain.png and b/plugins/spectrum_analyzer/spectrum_background_plain.png differ diff --git a/plugins/vestige/vestige.cpp b/plugins/vestige/vestige.cpp index af168a4bd6..48e10094ed 100644 --- a/plugins/vestige/vestige.cpp +++ b/plugins/vestige/vestige.cpp @@ -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, diff --git a/plugins/vst_base/remote_vst_plugin.cpp b/plugins/vst_base/remote_vst_plugin.cpp index 8146a597af..ecc3df2d6b 100644 --- a/plugins/vst_base/remote_vst_plugin.cpp +++ b/plugins/vst_base/remote_vst_plugin.cpp @@ -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 ); diff --git a/src/core/piano.cpp b/src/core/piano.cpp index 2887cf9726..298cf3516a 100644 --- a/src/core/piano.cpp +++ b/src/core/piano.cpp @@ -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 ); } diff --git a/src/gui/fx_mixer_view.cpp b/src/gui/fx_mixer_view.cpp index 46a9be18bc..971a359b9f 100644 --- a/src/gui/fx_mixer_view.cpp +++ b/src/gui/fx_mixer_view.cpp @@ -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(); } } diff --git a/src/gui/plugin_browser.cpp b/src/gui/plugin_browser.cpp index 402c479672..bff0a5e327 100644 --- a/src/gui/plugin_browser.cpp +++ b/src/gui/plugin_browser.cpp @@ -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 ); diff --git a/src/gui/widgets/effect_rack_view.cpp b/src/gui/widgets/effect_rack_view.cpp index 6480586273..12c5028fc4 100644 --- a/src/gui/widgets/effect_rack_view.cpp +++ b/src/gui/widgets/effect_rack_view.cpp @@ -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::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(); } diff --git a/src/gui/widgets/group_box.cpp b/src/gui/widgets/group_box.cpp index ec429ca443..b6c6b86a93 100644 --- a/src/gui/widgets/group_box.cpp +++ b/src/gui/widgets/group_box.cpp @@ -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 ) ); diff --git a/src/gui/widgets/instrument_function_views.cpp b/src/gui/widgets/instrument_function_views.cpp index 6df00764d3..64dc1cc4f6 100644 --- a/src/gui/widgets/instrument_function_views.cpp +++ b/src/gui/widgets/instrument_function_views.cpp @@ -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; diff --git a/src/gui/widgets/instrument_midi_io_view.cpp b/src/gui/widgets/instrument_midi_io_view.cpp index 56998cc31b..df69b2839c 100644 --- a/src/gui/widgets/instrument_midi_io_view.cpp +++ b/src/gui/widgets/instrument_midi_io_view.cpp @@ -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, "---" ); diff --git a/src/gui/widgets/instrument_sound_shaping_view.cpp b/src/gui/widgets/instrument_sound_shaping_view.cpp index ec6e99a8e7..f4acae5f98 100644 --- a/src/gui/widgets/instrument_sound_shaping_view.cpp +++ b/src/gui/widgets/instrument_sound_shaping_view.cpp @@ -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; diff --git a/src/gui/widgets/knob.cpp b/src/gui/widgets/knob.cpp index 653742e924..d1108f2fca 100644 --- a/src/gui/widgets/knob.cpp +++ b/src/gui/widgets/knob.cpp @@ -109,9 +109,9 @@ void knob::setLabel( const QString & _txt ) if( m_knobPixmap ) { setFixedSize( tMax( 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 ); } diff --git a/src/gui/widgets/tab_widget.cpp b/src/gui/widgets/tab_widget.cpp index fa6985c74a..a50e48a6f8 100644 --- a/src/gui/widgets/tab_widget.cpp +++ b/src/gui/widgets/tab_widget.cpp @@ -3,7 +3,7 @@ /* * tab_widget.cpp - tabwidget for LMMS * - * Copyright (c) 2005-2007 Tobias Doerffel + * Copyright (c) 2005-2008 Tobias Doerffel * * 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 )