[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdebase/kicker/applets/taskbar
From:       Aaron J. Seigo <aseigo () kde ! org>
Date:       2005-03-01 23:44:53
Message-ID: 20050301234453.46A99148A2 () office ! kde ! org
[Download RAW message or body]

CVS commit by aseigo: 

make this work a bit better. still maxes out at 200px .... but at least
that's a bit more sane

will backport for 3.4.1

BUG:100605
BUG:87883


  M +1 -1      Makefile.am   1.12
  M +21 -7     taskbarapplet.cpp   1.40


--- kdebase/kicker/applets/taskbar/Makefile.am  #1.11:1.12
@@ -7,5 +7,5 @@
 taskbar_panelapplet_la_METASOURCES = AUTO
 taskbar_panelapplet_la_LDFLAGS = -module $(KDE_PLUGIN) $(all_libraries)
-taskbar_panelapplet_la_LIBADD = $(LIB_KDEUI) ../../taskbar/libtaskbar.la
+taskbar_panelapplet_la_LIBADD = $(LIB_KDEUI) ../../taskbar/libtaskbar.la ../../share/libkickermain.la
 
 noinst_HEADERS = taskbarapplet.h

--- kdebase/kicker/applets/taskbar/taskbarapplet.cpp  #1.39:1.40
@@ -29,4 +29,6 @@ CONNECTION WITH THE SOFTWARE OR THE USE 
 #include <kdebug.h>
 
+#include "global.h"
+
 #include "taskbarcontainer.h"
 
@@ -38,4 +40,5 @@ extern "C"
     KDE_EXPORT KPanelApplet* init( QWidget *parent, const QString& configFile )
     {
+        // FIXME: what about two taskbars? perhaps this should be inserted just once
         KGlobal::locale()->insertCatalogue( "ktaskbarapplet" );
         int options = 0;
@@ -62,15 +65,26 @@ TaskbarApplet::TaskbarApplet( const QStr
 TaskbarApplet::~TaskbarApplet()
 {
+    // FIXME: what about TWO taskbars?
     KGlobal::locale()->removeCatalogue( "ktaskbarapplet" );
 }
 
-int TaskbarApplet::widthForHeight( int ) const
+int TaskbarApplet::widthForHeight(int h) const
 {
-    return 200;
+    // FIXME KDE4: when either TaskBarContainer or Applet smartens us
+    //             simplify this
+    KPanelExtension::Position d = orientation() == Qt::Horizontal ?
+                                  KPanelExtension::Top :
+                                  KPanelExtension::Left;
+    return container->sizeHint(d, QSize(200, h)).width();
 }
 
-int TaskbarApplet::heightForWidth( int ) const
+int TaskbarApplet::heightForWidth(int w) const
 {
-    return 50;
+    // FIXME KDE4: when either TaskBarContainer or Applet smartens us
+    //             simplify this
+    KPanelExtension::Position d = orientation() == Qt::Horizontal ?
+                                  KPanelExtension::Top :
+                                  KPanelExtension::Left;
+    return container->sizeHint(d, QSize(w, 200)).height();
 }
 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic