X-Git-Url: https://vcs.maemo.org/git/?a=blobdiff_plain;f=src%2Fmainwindow.cpp;fp=src%2Fmainwindow.cpp;h=f612990ac88cec9a503c2ace16e16bdbde80f19d;hb=39082e623f96f562f491b91f9812ec0440e5d142;hp=c67561f7a45b9705d557fa92541a3b8dee9efa9b;hpb=ad3ee71d84230c4538a167939d5de3e9b41abd23;p=medard diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index c67561f..f612990 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -48,12 +48,10 @@ MainWindow::MainWindow(QGraphicsItem *parent) : MApplicationPage(parent) m_forecastInitialDateLabel = new MLabel(); m_forecastInitialDateLabel->setAlignment(Qt::AlignCenter); - m_forecastInitialDateLabel->setWordWrap(true); m_forecastInitialDateLabel->setEnabled(false); m_forecastDateLabel = new MLabel(); m_forecastDateLabel->setAlignment(Qt::AlignCenter); - m_forecastDateLabel->setWordWrap(true); m_downloadRetryButton = new MButton(tr("Download again")); m_downloadRetryButton->setPreferredWidth(220); @@ -135,17 +133,18 @@ void MainWindow::setupUi() setPannable(false); QGraphicsLinearLayout *mainLayout = new QGraphicsLinearLayout(Qt::Horizontal); - mainLayout->setSpacing(8); centralWidget()->setLayout(mainLayout); mainLayout->addItem(m_forecast); QGraphicsLinearLayout *layout = new QGraphicsLinearLayout(Qt::Vertical); + layout->setContentsMargins(4, 4, 4, 4); + layout->setSpacing(8); mainLayout->addItem(layout); layout->addItem(m_forecastTypeLabel); +/* layout->addItem(m_forecastInitialDateLabel); */ layout->addItem(m_forecastDateLabel); - layout->addItem(m_forecastInitialDateLabel); layout->addItem(m_downloadRetryButton); QGraphicsLinearLayout *dayNavigationBox = new QGraphicsLinearLayout(Qt::Horizontal); @@ -584,11 +583,11 @@ void MainWindow::forecastDomainChanged(QAction *action) void MainWindow::downloadedFinished(const QString &filename, const QDateTime &date) { m_forecast->setImage(filename); - m_forecastInitialDateLabel->setText(tr("Forecast from:\n") + + m_forecastInitialDateLabel->setText(tr("Forecast from:
") + m_downloader->forecastInitialDate().toString("dd.MM.yyyy, hh:mm")); /* upcase the first letter of name of day */ - QString temp = date.toString("dddd\ndd.MM.yyyy, hh:mm"); + QString temp = date.toString("dddd
dd.MM.yyyy, hh:mm"); m_forecastDateLabel->setText(temp.replace(0, 1, temp.at(0).toUpper())); showNavigationButtons();