diff options
author | Tim E. Real <termtech@rogers.com> | 2010-12-29 08:13:23 +0000 |
---|---|---|
committer | Tim E. Real <termtech@rogers.com> | 2010-12-29 08:13:23 +0000 |
commit | 6507ce61ab90c6ecb9a68fdd57e8ed6743f6920e (patch) | |
tree | 4d749ebef0ebc4c56864c0f9d3a694cfee07d7f4 | |
parent | 6a5d00dea2201ac85d7bbae030cbc8abb8a97618 (diff) |
Fixed the 'no selected track' trackinfo background MusE logo display.
-rw-r--r-- | muse2/ChangeLog | 2 | ||||
-rw-r--r-- | muse2/muse/arranger/arranger.cpp | 9 | ||||
-rw-r--r-- | muse2/muse/icons.cpp | 10 | ||||
-rw-r--r-- | muse2/muse/icons.h | 3 | ||||
-rw-r--r-- | muse2/muse/widgets/mtrackinfo.cpp | 9 | ||||
-rw-r--r-- | muse2/xpm/midi_thru_off3.xpm | 23 | ||||
-rw-r--r-- | muse2/xpm/midi_thru_on3.xpm | 24 |
7 files changed, 63 insertions, 17 deletions
diff --git a/muse2/ChangeLog b/muse2/ChangeLog index 9a84de76..900ce3b5 100644 --- a/muse2/ChangeLog +++ b/muse2/ChangeLog @@ -4,6 +4,8 @@ - Commented out the comment placeholder text line in projectcreateimpl.cpp. It broke the compilation against Qt-4.7. (Orcan) - Fixed the shift modifier issue in renaming parts in the arranger. (Orcan) + - Fixed the 'no selected track' trackinfo background MusE logo display. (Tim) + It was a memory leak as well. Was a simple fix in Arranger::genTrackInfo(). 27.12.2010: - Added a first try at project creation dialog, we'll see how much territory it covers, intentionally it's only used upon creation of a project, later 'Save As' diff --git a/muse2/muse/arranger/arranger.cpp b/muse2/muse/arranger/arranger.cpp index 26809bbd..95196933 100644 --- a/muse2/muse/arranger/arranger.cpp +++ b/muse2/muse/arranger/arranger.cpp @@ -944,16 +944,13 @@ void Arranger::genTrackInfo(QWidget* parent) trackInfo = new WidgetStack(parent, "trackInfoStack"); noTrackInfo = new QWidget(trackInfo); + noTrackInfo->setAutoFillBackground(true); QPixmap *noInfoPix = new QPixmap(160, 1000); //muse_leftside_logo_xpm); const QPixmap *logo = new QPixmap(*museLeftSideLogo); noInfoPix->fill(noTrackInfo->palette().color(QPalette::Window) ); - // Orcan - check - //copyBlt(noInfoPix, 10, 0, logo, 0,0, logo->width(), logo->height()); - QPainter p; - p.begin(noInfoPix); - p.drawImage(10, 0, logo->toImage(), 0,0, logo->width(), logo->height()); + QPainter p(noInfoPix); + p.drawPixmap(10, 0, *logo, 0,0, logo->width(), logo->height()); - //noTrackInfo->setPaletteBackgroundPixmap(*noInfoPix); QPalette palette; palette.setBrush(noTrackInfo->backgroundRole(), QBrush(*noInfoPix)); noTrackInfo->setPalette(palette); diff --git a/muse2/muse/icons.cpp b/muse2/muse/icons.cpp index 41dfe1f2..198fcaf4 100644 --- a/muse2/muse/icons.cpp +++ b/muse2/muse/icons.cpp @@ -28,7 +28,8 @@ #include "xpm/midi_inputplugins_random_rhythm_generator.xpm" #include "xpm/midi_local_off.xpm" #include "xpm/midi_reset_instr.xpm" -#include "xpm/midi_connector_red_border.xpm" +#include "xpm/midi_thru_off3.xpm" +#include "xpm/midi_thru_on3.xpm" #include "xpm/settings_appearance_settings.xpm" #include "xpm/settings_configureshortcuts.xpm" #include "xpm/settings_follow_song.xpm" @@ -247,7 +248,8 @@ QPixmap* localoffSIcon; QPixmap* miditransformSIcon; QPixmap* midi_plugSIcon; QPixmap* miditransposeSIcon; -QPixmap* midiConnectorRedBorderIcon; +QPixmap* midiThruOnIcon; +QPixmap* midiThruOffIcon; QPixmap* mixerSIcon; QPixmap* mustangSIcon; QPixmap* resetSIcon; @@ -599,7 +601,9 @@ void initIcons() miditransformSIcon = new MPIXMAP(miditransformS_xpm, NULL); midi_plugSIcon = new MPIXMAP(midi_plugS_xpm, NULL); miditransposeSIcon = new MPIXMAP(miditransposeS_xpm, NULL); - midiConnectorRedBorderIcon = new MPIXMAP(midi_connector_red_border_xpm, NULL); + midiThruOnIcon = new MPIXMAP(midi_thru_on3_xpm, NULL); + midiThruOffIcon = new MPIXMAP(midi_thru_off3_xpm, NULL); + mixerSIcon = new MPIXMAP(mixerS_xpm, NULL); mustangSIcon = new MPIXMAP(mustangS_xpm, NULL); resetSIcon = new MPIXMAP(resetS_xpm, NULL); diff --git a/muse2/muse/icons.h b/muse2/muse/icons.h index a3e9ecfa..d45b1b5a 100644 --- a/muse2/muse/icons.h +++ b/muse2/muse/icons.h @@ -152,7 +152,8 @@ extern QPixmap* localoffSIcon; extern QPixmap* miditransformSIcon; extern QPixmap* midi_plugSIcon; extern QPixmap* miditransposeSIcon; -extern QPixmap* midiConnectorRedBorderIcon; +extern QPixmap* midiThruOnIcon; +extern QPixmap* midiThruOffIcon; extern QPixmap* mixerSIcon; extern QPixmap* mustangSIcon; extern QPixmap* resetSIcon; diff --git a/muse2/muse/widgets/mtrackinfo.cpp b/muse2/muse/widgets/mtrackinfo.cpp index 3c358765..af957dd2 100644 --- a/muse2/muse/widgets/mtrackinfo.cpp +++ b/muse2/muse/widgets/mtrackinfo.cpp @@ -68,14 +68,9 @@ MidiTrackInfo::MidiTrackInfo(QWidget* parent, Track* sel_track) : QWidget(parent iChanDetectLabel->setPixmap(*darkRedLedIcon); QIcon recEchoIconSet; - //recEchoIconSet.addPixmap(*recEchoIconOn, QIcon::Normal, QIcon::On); - //recEchoIconSet.addPixmap(*recEchoIconOff, QIcon::Normal, QIcon::Off); - recEchoIconSet.addPixmap(*midiConnectorRedBorderIcon, QIcon::Normal, QIcon::On); - recEchoIconSet.addPixmap(*edit_midiIcon, QIcon::Normal, QIcon::Off); + recEchoIconSet.addPixmap(*midiThruOnIcon, QIcon::Normal, QIcon::On); + recEchoIconSet.addPixmap(*midiThruOffIcon, QIcon::Normal, QIcon::Off); recEchoButton->setIcon(recEchoIconSet); - //recEchoButton->setIcon(QIcon(*edit_midiIcon)); - //recEchoButton->setIconSize(edit_midiIcon->size()); - // MusE-2: AlignCenter and WordBreak are set in the ui(3) file, but not supported by QLabel. Turn them on here. trackNameLabel->setAlignment(Qt::AlignCenter); diff --git a/muse2/xpm/midi_thru_off3.xpm b/muse2/xpm/midi_thru_off3.xpm new file mode 100644 index 00000000..8a95ea8a --- /dev/null +++ b/muse2/xpm/midi_thru_off3.xpm @@ -0,0 +1,23 @@ +/* XPM */ +static const char * midi_thru_off3_xpm[] = { +"18 18 2 1", +" c None", +". c #000000", +" ..... ", +" .. .. ", +" . .. . ", +" . .. . ", +" . .. .. . ", +" . .. .. . ", +". . ", +". . ", +". .. .. . ", +". .. .. . ", +". . ", +" . ..... . ", +" . ..... . ", +" . .. .. . ", +" . . ", +" .. .. ", +" ..... ", +" "}; diff --git a/muse2/xpm/midi_thru_on3.xpm b/muse2/xpm/midi_thru_on3.xpm new file mode 100644 index 00000000..69a5f29c --- /dev/null +++ b/muse2/xpm/midi_thru_on3.xpm @@ -0,0 +1,24 @@ +/* XPM */ +static const char * midi_thru_on3_xpm[] = { +"18 18 3 1", +" c None", +". c #000000", +"+ c #FF0000", +" ..... ", +" .. .. ", +" . .. . ", +" . .. . ", +" . .. .. . ", +" . .. .. . ", +". . ", +". . ", +". .. + .. . ", +". .. +++ .. . ", +". +++++ . ", +" . +++++++ . ", +" . +++ . ", +" . +++ . ", +" ++++ . ", +" ++++++++ .. ", +" +++++++ . ", +" "}; |