projects
/
medard
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
ad3ee71
)
Fixed label wraping.
author
Roman Moravčík
<roman.moravcik@gmail.com>
Mon, 6 Aug 2012 19:14:48 +0000
(21:14 +0200)
committer
Roman Moravčík
<roman.moravcik@gmail.com>
Mon, 6 Aug 2012 19:14:48 +0000
(21:14 +0200)
src/mainwindow.cpp
patch
|
blob
|
history
diff --git
a/src/mainwindow.cpp
b/src/mainwindow.cpp
index
c67561f
..
f612990
100644
(file)
--- 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 = 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_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);
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);
setPannable(false);
QGraphicsLinearLayout *mainLayout = new QGraphicsLinearLayout(Qt::Horizontal);
- mainLayout->setSpacing(8);
centralWidget()->setLayout(mainLayout);
mainLayout->addItem(m_forecast);
QGraphicsLinearLayout *layout = new QGraphicsLinearLayout(Qt::Vertical);
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);
mainLayout->addItem(layout);
layout->addItem(m_forecastTypeLabel);
+/* layout->addItem(m_forecastInitialDateLabel); */
layout->addItem(m_forecastDateLabel);
layout->addItem(m_forecastDateLabel);
- layout->addItem(m_forecastInitialDateLabel);
layout->addItem(m_downloadRetryButton);
QGraphicsLinearLayout *dayNavigationBox = new QGraphicsLinearLayout(Qt::Horizontal);
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);
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:<br>") +
m_downloader->forecastInitialDate().toString("dd.MM.yyyy, hh:mm"));
/* upcase the first letter of name of day */
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<br>dd.MM.yyyy, hh:mm");
m_forecastDateLabel->setText(temp.replace(0, 1, temp.at(0).toUpper()));
showNavigationButtons();
m_forecastDateLabel->setText(temp.replace(0, 1, temp.at(0).toUpper()));
showNavigationButtons();