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

List:       kde-commits
Subject:    kdebase/kcontrol/kdm
From:       Oswald Buddenhagen <ossi () kde ! org>
Date:       2003-11-18 0:22:40
[Download RAW message or body]

CVS commit by ossi: 

hmm, that urlrequester idea might be the way to go, but for now only
adjust the button size ...


  M +7 -6      kdm-appear.cpp   1.84


--- kdebase/kcontrol/kdm/kdm-appear.cpp  #1.83:1.84
@@ -32,4 +32,5 @@
 #include <qvalidator.h>
 #include <qstylefactory.h>
+#include <qstyle.h>
 
 #include <klocale.h>
@@ -166,6 +167,4 @@ KDMAppearanceWidget::KDMAppearanceWidget
   logobutton->setAcceptDrops(true);
   logobutton->installEventFilter(this); // for drag and drop
-  logobutton->setMinimumSize(24, 24);
-  logobutton->setMaximumSize(108, 108);
   connect(logobutton, SIGNAL(clicked()), SLOT(slotLogoButtonClicked()));
   hglay->addWidget(logoLabel, 1, 0);
@@ -388,10 +387,12 @@ bool KDMAppearanceWidget::setLogo(QStrin
                     locate("data", QString::fromLatin1("kdm/pics/kdelogo.png") ) :
                     logo;
-    QPixmap p(flogo);
+    QImage p(flogo);
     if (p.isNull())
         return false;
+    if (p.width() > 100 || p.height() > 100)
+        p = p.smoothScale(100, 100, QImage::ScaleMin);
     logobutton->setPixmap(p);
-    logobutton->adjustSize();
-//    resize(width(), height());
+    uint bd = style().pixelMetric( QStyle::PM_ButtonMargin ) * 2;
+    logobutton->setFixedSize(p.width() + bd, p.height() + bd);
     logopath = logo;
     return true;


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

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