Commit 70f89fef authored by Scott Wheeler's avatar Scott Wheeler

CVS_SILENT apparently some nitpicks that I had sitting around out of instinct

svn path=/trunk/kdemultimedia/juk/; revision=316181
parent 49a3693d
...@@ -135,6 +135,7 @@ void SystemTray::createPopup(bool addButtons) ...@@ -135,6 +135,7 @@ void SystemTray::createPopup(bool addButtons)
Tag *playingInfo = playingFile.tag(); Tag *playingInfo = playingFile.tag();
// If the action exists and it's checked, do our stuff // If the action exists and it's checked, do our stuff
if(action<KToggleAction>("togglePopups")->isChecked()) { if(action<KToggleAction>("togglePopups")->isChecked()) {
delete m_popup; delete m_popup;
...@@ -144,15 +145,19 @@ void SystemTray::createPopup(bool addButtons) ...@@ -144,15 +145,19 @@ void SystemTray::createPopup(bool addButtons)
box->setSpacing(15); // Add space between text and buttons box->setSpacing(15); // Add space between text and buttons
// See where to put the buttons // See where to put the buttons
bool onLeft = buttonsToLeft(); bool onLeft = buttonsToLeft();
QVBox *buttonBox; QVBox *buttonBox;
if(onLeft) { if(onLeft) {
// They go to the left because JuK is on that side // They go to the left because JuK is on that side
buttonBox = new QVBox(box); buttonBox = new QVBox(box);
buttonBox->setSpacing(3); buttonBox->setSpacing(3);
// Separator line // Separator line
QFrame *line = new QFrame(box); QFrame *line = new QFrame(box);
line->setFrameShape(QFrame::VLine); line->setFrameShape(QFrame::VLine);
} }
...@@ -163,6 +168,7 @@ void SystemTray::createPopup(bool addButtons) ...@@ -163,6 +168,7 @@ void SystemTray::createPopup(bool addButtons)
infoBox->setMargin(3); infoBox->setMargin(3);
// We need to add QLabels to replace any missing labels. // We need to add QLabels to replace any missing labels.
int numSpacers = 0; int numSpacers = 0;
QString titleStr = playingInfo->title(); QString titleStr = playingInfo->title();
...@@ -170,12 +176,14 @@ void SystemTray::createPopup(bool addButtons) ...@@ -170,12 +176,14 @@ void SystemTray::createPopup(bool addButtons)
title->setAlignment(AlignRight | AlignVCenter); title->setAlignment(AlignRight | AlignVCenter);
// Give the title a bold, bigger font to make it look better. // Give the title a bold, bigger font to make it look better.
QFont f = title->font(); QFont f = title->font();
f.setBold(true); f.setBold(true);
f.setPointSize(f.pointSize() + 4); f.setPointSize(f.pointSize() + 4);
title->setFont(f); title->setFont(f);
// Artist info // Artist info
QString artistStr = playingInfo->artist(); QString artistStr = playingInfo->artist();
QLabel *artist = 0; QLabel *artist = 0;
if(!artistStr.isEmpty()) { if(!artistStr.isEmpty()) {
...@@ -186,12 +194,14 @@ void SystemTray::createPopup(bool addButtons) ...@@ -186,12 +194,14 @@ void SystemTray::createPopup(bool addButtons)
++numSpacers; ++numSpacers;
// Album info // Album info
QString albumStr = playingInfo->album(); QString albumStr = playingInfo->album();
QLabel *album = 0; QLabel *album = 0;
if(!albumStr.isEmpty()) { if(!albumStr.isEmpty()) {
int year = playingInfo->year(); int year = playingInfo->year();
// See if there is a year. // See if there is a year.
if(year > 0) if(year > 0)
albumStr = i18n("%1 (%2)").arg(albumStr).arg(year); albumStr = i18n("%1 (%2)").arg(albumStr).arg(year);
...@@ -201,11 +211,11 @@ void SystemTray::createPopup(bool addButtons) ...@@ -201,11 +211,11 @@ void SystemTray::createPopup(bool addButtons)
else else
++numSpacers; ++numSpacers;
for( ; numSpacers != 0; --numSpacers) { for(; numSpacers != 0; --numSpacers) {
// Add an empty label. QSpacerItems weren't working for // Add an empty label. QSpacerItems weren't working for
// me for some reason. QBoxLayout->addSpacing() wasn't // me for some reason. QBoxLayout->addSpacing() wasn't
// either. mpyne :-( // either. mpyne :-(
(void) new QLabel(" ", infoBox); new QLabel(" ", infoBox);
} }
if(addButtons) { if(addButtons) {
...@@ -230,12 +240,15 @@ void SystemTray::createPopup(bool addButtons) ...@@ -230,12 +240,15 @@ void SystemTray::createPopup(bool addButtons)
// We don't want an autodelete popup. There are times when it will need // We don't want an autodelete popup. There are times when it will need
// to be hidden before the timeout. // to be hidden before the timeout.
m_popup->setAutoDelete(false); m_popup->setAutoDelete(false);
// We have to set the text of the labels after all of the // We have to set the text of the labels after all of the
// widgets have been added in order for the width to be calculated // widgets have been added in order for the width to be calculated
// correctly. // correctly.
title->setText(playingInfo->title()); title->setText(playingInfo->title());
if(artist) if(artist)
artist->setText(artistStr); artist->setText(artistStr);
if(album) if(album)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment