aboutsummaryrefslogtreecommitdiff
path: root/plainqt
diff options
context:
space:
mode:
authorSergiy Dubovik <sergiy.dubovik@nokia.com>2010-06-15 09:23:16 +0300
committerSergiy Dubovik <sergiy.dubovik@nokia.com>2010-06-15 09:23:16 +0300
commitd8cb9ed0aadb3a8f1d51a7108840580c996ef07b (patch)
tree60cf766d24def035374e90a50d62d55c1a4da54c /plainqt
parent5bc0b26e30a46da1aadeaabb226b7a62c00ebf09 (diff)
Revert "Changes: Proper colors and pixmaps for navigation bar"
Actually I don't have problems with this commit, but it doesn't let me remove other commit which breaks build. This reverts commit 5bc0b26e30a46da1aadeaabb226b7a62c00ebf09.
Diffstat (limited to 'plainqt')
-rw-r--r--plainqt/style/qtmaemo6style.cpp2
-rw-r--r--plainqt/style/qtmaemo6titlebar.cpp23
-rw-r--r--plainqt/style/qtmaemo6titlebar.h5
3 files changed, 15 insertions, 15 deletions
diff --git a/plainqt/style/qtmaemo6style.cpp b/plainqt/style/qtmaemo6style.cpp
index 06d1edad..3b7edc05 100644
--- a/plainqt/style/qtmaemo6style.cpp
+++ b/plainqt/style/qtmaemo6style.cpp
@@ -996,7 +996,7 @@ void QtMaemo6Style::polish(QWidget *widget)
Q_UNUSED( menuStyle );
//TODO: use style and menuStyle once the properties inside work actually.
// This would also remove the magic numbers.
- //titleBar->setTitleColor( Qt::white );
+ titleBar->setTitleColor( Qt::white );
titleBar->setMargin( 10 );
titleBar->setItemSpacing( 20 );
titleBar->setFixedHeight( 70 );
diff --git a/plainqt/style/qtmaemo6titlebar.cpp b/plainqt/style/qtmaemo6titlebar.cpp
index 45bfa54a..a4c65881 100644
--- a/plainqt/style/qtmaemo6titlebar.cpp
+++ b/plainqt/style/qtmaemo6titlebar.cpp
@@ -34,7 +34,6 @@
#include <mapplicationmenubuttonstyle.h>
#include <mhomebuttonpanelstyle.h>
#include <mescapebuttonpanelstyle.h>
-#include <mlabelstyle.h>
#include <MScalableImage>
#include <MTheme>
#include <mnavigationbarstyle.h>
@@ -67,26 +66,14 @@ QtMaemo6TitleBar::QtMaemo6TitleBar(QWidget *parent) : QWidget(parent)
m_titleLabelMenuButton = new QtMaemo6ClickLabel(this);
m_titleLabelMenuButton->setObjectName("Qt_Maemo6_TitleBar_Menu");
-
const MApplicationMenuButtonStyle *iconStyle =
static_cast<const MApplicationMenuButtonStyle *>(QtMaemo6StylePrivate::mStyle(option.state,
"MApplicationMenuButtonStyle", "NavigationBarMenuButton"));
if (iconStyle) {
- if(!iconStyle->arrowIcon().isEmpty())
- m_titleLabelMenuButton->setPixmap(*MTheme::pixmapCopy(iconStyle->arrowIcon(), iconStyle->arrowIconSize()));
+ m_titleLabelMenuButton->setPixmap(*MTheme::pixmapCopy(iconStyle->arrowIcon(), iconStyle->arrowIconSize()));
}
connect(m_titleLabelMenuButton, SIGNAL(clicked()), this, SIGNAL(menuLabelClicked()));
- const MLabelStyle *menuButtonLabelStyle =
- static_cast<const MLabelStyle *>(QtMaemo6StylePrivate::mStyle(option.state,
- "MLabelStyle", "NavigationBarMenuButtonLabel"));
- if(menuButtonLabelStyle) {
- qCritical() << menuButtonLabelStyle->color();
- QPalette pal = m_titleLabel->palette();
- pal.setBrush(m_titleLabel->foregroundRole(), menuButtonLabelStyle->color());
- m_titleLabel->setPalette(pal);
- }
-
QSpacerItem *spacer = new QSpacerItem(0, 0);
if (iconStyle) {
spacer->changeSize(iconStyle->marginLeft(), 0);
@@ -126,6 +113,7 @@ QtMaemo6TitleBar::QtMaemo6TitleBar(QWidget *parent) : QWidget(parent)
Q_UNUSED( menuStyle );
//TODO: use style and menuStyle once the properties inside work actually.
// This would also remove the magic numbers.
+ setTitleColor( Qt::white );
setMargin( 10 );
setItemSpacing( 20 );
@@ -155,6 +143,13 @@ void QtMaemo6TitleBar::setTitle(const QString &title)
m_titleLabel->setText(title);
}
+void QtMaemo6TitleBar::setTitleColor(const QColor &color)
+{
+ QPalette pal;
+ pal.setColor( QPalette::Foreground, color );
+ m_titleLabel->setPalette( pal );
+}
+
void QtMaemo6TitleBar::setMargin(int margin)
{
m_titleBarLayout->setMargin( margin );
diff --git a/plainqt/style/qtmaemo6titlebar.h b/plainqt/style/qtmaemo6titlebar.h
index da04674a..5e324a60 100644
--- a/plainqt/style/qtmaemo6titlebar.h
+++ b/plainqt/style/qtmaemo6titlebar.h
@@ -70,6 +70,11 @@ public Q_SLOTS:
void setTitle(const QString &title);
/*!
+ * sets the color of the title
+ */
+ void setTitleColor(const QColor &color);
+
+ /*!
* sets the margin
*/
void setMargin(int spacing);