summaryrefslogtreecommitdiff
authorharlekin <harlekin>2002-09-17 17:53:32 (UTC)
committer harlekin <harlekin>2002-09-17 17:53:32 (UTC)
commitd09947cc7ead59747feb10679ba6ba0a9db20a74 (patch) (side-by-side diff)
treee33a831e8002608817728bfe821650a2a45c56d7
parenta1b2f800f53715452f75153218e33fcd8907bbbf (diff)
downloadopie-d09947cc7ead59747feb10679ba6ba0a9db20a74.zip
opie-d09947cc7ead59747feb10679ba6ba0a9db20a74.tar.gz
opie-d09947cc7ead59747feb10679ba6ba0a9db20a74.tar.bz2
icons back to the to
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--core/pim/today/today.cpp20
1 files changed, 12 insertions, 8 deletions
diff --git a/core/pim/today/today.cpp b/core/pim/today/today.cpp
index 2095174..f052a9f 100644
--- a/core/pim/today/today.cpp
+++ b/core/pim/today/today.cpp
@@ -41,7 +41,7 @@ struct TodayPlugin {
QLibrary *library;
TodayPluginInterface *iface;
TodayPluginObject *guiPart;
- QHBox *guiBox;
+ QWidget *guiBox;
QString name;
bool active;
int pos;
@@ -63,8 +63,6 @@ Today::Today( QWidget* parent, const char* name, WFlags fl )
#endif
#endif
- // pluginLayout = 0l;
-
setOwnerField();
init();
loadPlugins();
@@ -165,11 +163,16 @@ void Today::loadPlugins() {
}
plugin.guiPart = plugin.iface->guiPart();
- plugin.guiBox = new QHBox( this );
+ // package the whole thing into a qwidget so it can be shown and hidden
+ plugin.guiBox = new QWidget( this );
+ QHBoxLayout *boxLayout = new QHBoxLayout( plugin.guiBox );
+
QPixmap plugPix;
plugPix.convertFromImage( Resource::loadImage( plugin.guiPart->pixmapNameWidget() ).smoothScale( 18, 18 ), 0 );
OClickableLabel* plugIcon = new OClickableLabel( plugin.guiBox );
plugIcon->setPixmap( plugPix );
+
+ // a scrollview for each plugin
QScrollView* sv = new QScrollView( plugin.guiBox );
QWidget *plugWidget = plugin.guiPart->widget( sv->viewport() );
sv->setMinimumHeight( plugin.guiPart->minHeight() );
@@ -179,10 +182,11 @@ void Today::loadPlugins() {
sv->setFrameShape( QFrame::NoFrame );
sv->addChild( plugWidget );
- //plugin.guiBox->addWidget( plugIcon, 0, AlignTop );
- //plugin.guiBox->addWidget( sv, 0, AlignTop );
- plugin.guiBox->setStretchFactor( plugIcon, 1 );
- plugin.guiBox->setStretchFactor( sv, 9 );
+ // make sure the icon is on the top alligned
+ boxLayout->addWidget( plugIcon, 0, AlignTop );
+ boxLayout->addWidget( sv, 0, AlignTop );
+ boxLayout->setStretchFactor( plugIcon, 1 );
+ boxLayout->setStretchFactor( sv, 9 );
layout->addWidget( plugin.guiBox );
pluginList.append( plugin );