From dd544be8dc5fa6eabbb280b286f9d70bb6c4ce40 Mon Sep 17 00:00:00 2001 From: santi Date: Thu, 14 Aug 2014 00:54:46 +0200 Subject: [PATCH] Cosmetic changes in GUI --- src/audiolayerwidget.cpp | 25 +++++++++++++------------ src/defines.h | 2 +- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/src/audiolayerwidget.cpp b/src/audiolayerwidget.cpp index f71e192..8cd1fad 100644 --- a/src/audiolayerwidget.cpp +++ b/src/audiolayerwidget.cpp @@ -37,7 +37,7 @@ AudioLayerWidget::AudioLayerWidget(QWidget *parent, QString name): m_folderLabel = new QLabel; m_folderLabel->setText(FOLDER_LABEL); m_folderValue = new QLabel; - m_folderValue->setMaximumWidth(200); + m_folderValue->setMaximumWidth(150); folderLoaded->addWidget(m_folderLabel); folderLoaded->addWidget(m_folderValue); layout->addLayout(folderLoaded); @@ -46,7 +46,7 @@ AudioLayerWidget::AudioLayerWidget(QWidget *parent, QString name): m_fileLabel = new QLabel; m_fileLabel->setText(FILE_LABEL); m_fileValue = new QLabel; - m_fileValue->setMaximumWidth(200); + m_fileValue->setMaximumWidth(150); fileLoaded->addWidget(m_fileLabel); fileLoaded->addWidget(m_fileValue); layout->addLayout(fileLoaded); @@ -63,16 +63,17 @@ AudioLayerWidget::AudioLayerWidget(QWidget *parent, QString name): volumeBox->addWidget(m_volumeSlider); layout->addLayout(volumeBox); - QHBoxLayout *progressTime = new QHBoxLayout; + QGridLayout *progressTime = new QGridLayout; m_progressTimeLabel = new QLabel; m_progressTimeLabel->setText(PROGRESS_TIME_LABEL); m_progressTime = new QTimeEdit; + m_progressTime->text(); m_progressTime->setDisplayFormat("h:mm:ss:zzz"); m_progressTime->setReadOnly(true); m_progressTime->setButtonSymbols(QAbstractSpinBox::NoButtons); - m_progressTime->setMaximumWidth(90); - progressTime->addWidget(m_progressTimeLabel); - progressTime->addWidget(m_progressTime); + m_progressTime->setMaximumWidth(80); + progressTime->addWidget(m_progressTimeLabel, 0 ,0); + progressTime->addWidget(m_progressTime,0 ,1); m_totalTimeLabel = new QLabel; m_totalTimeLabel->setText(TOTAL_TIME_LABEL); @@ -80,9 +81,9 @@ AudioLayerWidget::AudioLayerWidget(QWidget *parent, QString name): m_totalTimeValue->setDisplayFormat("h:mm:ss:zzz"); m_totalTimeValue->setReadOnly(true); m_totalTimeValue->setButtonSymbols(QAbstractSpinBox::NoButtons); - m_totalTimeValue->setMaximumWidth(90); - progressTime->addWidget(m_totalTimeLabel); - progressTime->addWidget(m_totalTimeValue); + m_totalTimeValue->setMaximumWidth(80); + progressTime->addWidget(m_totalTimeLabel,1 , 0); + progressTime->addWidget(m_totalTimeValue, 1 ,1); layout->addLayout(progressTime); QHBoxLayout *progressSlider = new QHBoxLayout; @@ -203,18 +204,18 @@ void AudioLayerWidget::watchDMXExpired() { m_progressSlider->setValue(progress); m_progressTime->setTime(QTime::fromMSecsSinceStartOfDay(progress)); m_statusValue->setText(PLAY_LABEL); - m_suspendResumeButton->setText(tr(PLAY_LABEL)); + m_suspendResumeButton->setText(tr(SUSPEND_LABEL)); break; case sf::SoundSource::Paused: m_statusValue->setText(PAUSE_LABEL); - m_suspendResumeButton->setText(tr(SUSPEND_LABEL)); + m_suspendResumeButton->setText(tr(RESUME_LABEL)); break; case sf::SoundSource::Stopped: // m_progressCounter->restart(); // m_progressMs = 0; m_progressTime->setTime(QTime::fromMSecsSinceStartOfDay(0)); m_statusValue->setText(STOP_LABEL); - m_suspendResumeButton->setText(tr(SUSPEND_LABEL)); + m_suspendResumeButton->setText(tr(RESUME_LABEL)); m_progressSlider->setValue(0); break; } diff --git a/src/defines.h b/src/defines.h index 4b84f5c..6698ebc 100644 --- a/src/defines.h +++ b/src/defines.h @@ -1,7 +1,7 @@ #ifndef DEFINES_H #define DEFINES_H -#define VERSION "Libre Media Server Audio 0.1.0" +#define VERSION "LibreMediaServer-Audio 0.1.0" #define COPYRIGHT "(C) 2014 Santi Norena libremediaserver@gmail.com" #define LICENSE "GPL 3 License. See LICENSE.txt and credits.txt for details"