[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: playground/base/plasma/applets/rssnow
From: Christian Weilbach <christian () whiletaker ! homeip ! net>
Date: 2008-09-26 13:17:20
Message-ID: 1222435040.064134.30559.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 865044 by weilbach:
* Hardcode font color to white since the background ist hardcoded as well in background.svg to black.
* Adjust font size to scroller height.
* Allow free resizing.
M +3 -4 news.cpp
M +8 -4 single-feed.cpp
--- trunk/playground/base/plasma/applets/rssnow/news.cpp #865043:865044
@@ -48,6 +48,7 @@
setHasConfigurationInterface(true);
setBackgroundHints(DefaultBackground);
setAcceptDrops(true);
+ setAspectRatioMode( Plasma::IgnoreAspectRatio );
resize(300,300);
}
@@ -340,10 +341,8 @@
void News::constraintsEvent(Plasma::Constraints constraints)
{
kDebug() << "constrainsUpdated : " << constraints;
- if (constraints & Plasma::FormFactorConstraint) {
+// if (constraints & Plasma::FormFactorConstraint) {
if (formFactor() == Plasma::Horizontal) {
- m_logo = false;
- m_showdroptarget = false;
int minSize = (m_feedlist.size() * m_scrollerList.first()->minimumSize().height());
kDebug() << "minimum size to contain all scrollers: " << minSize;
if (geometry().height() < minSize) {
@@ -363,7 +362,7 @@
}
updateScrollers();
}
- }
+// }
}
QMap<QString, QString> News::akregatorFeeds()
--- trunk/playground/base/plasma/applets/rssnow/single-feed.cpp #865043:865044
@@ -72,9 +72,9 @@
p->setRenderHint(QPainter::Antialiasing);
QFont font = Plasma::Theme::defaultTheme()->font(Plasma::Theme::DefaultFont);
- font.setPointSize(font.pointSize() - 2); //because it looks prettier, but
- //we should probably fetch the
- //'small' font from the theme...
+ // FIXME: currently there is nothing else than DefaultFont for Theme
+ // so we calculate the size
+ font.setPixelSize(height/5);
//paint background
m_background->paint(p, 0, 0);
@@ -87,7 +87,11 @@
}
//draw title
- p->setPen(Plasma::Theme::defaultTheme()->color(Plasma::Theme::TextColor));
+ // FIXME: either remove since we use a hardcoded background
+ // or adjust the background color of the svg as well due to theme
+ // settings
+ // p->setPen(Plasma::Theme::defaultTheme()->color(Plasma::Theme::TextColor));
+ p->setPen(QColor("white"));
font.setBold(true);
p->setFont(font);
QString text;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic