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

List:       kde-commits
Subject:    KDE/kdeplasma-addons/applets/leavenote
From:       Marco Martin <notmart () gmail ! com>
Date:       2008-11-21 14:31:20
Message-ID: 1227277880.778379.19616.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 887301 by mart:

various fixes, warnings--
unscrew config dialog,
be gentle in panels


 M  +12 -4     leavenote.cpp  


--- trunk/KDE/kdeplasma-addons/applets/leavenote/leavenote.cpp #887300:887301
@@ -55,7 +55,7 @@
     // this will get us the standard applet background, for free!
     setBackgroundHints(NoBackground);
     resize(340, 250);
-    setMinimumSize(300, 200); // replace with correct numbers
+    //setMinimumSize(300, 200); // replace with correct numbers
 }
 
 LeaveNote::~LeaveNote()
@@ -78,8 +78,9 @@
     mLabel->setStyleSheet("color: black");
     mTextEdit = new Plasma::TextEdit(this);
     mTextEdit->setMinimumSize(QSize(0, 0));
+    mTextEdit->nativeWidget()->setFrameShape(QFrame::NoFrame);
+    mTextEdit->nativeWidget()->viewport()->setAutoFillBackground(false);
     mTextEdit->nativeWidget()->setAcceptRichText(false);
-    mTextEdit->nativeWidget()->viewport()->setAutoFillBackground(false);
     connect(mTextEdit, SIGNAL(textChanged()), SLOT(slotLimitMessageLength()));
 
     mSendButton = new Plasma::PushButton(this);
@@ -117,13 +118,19 @@
                                     .08*geometry().width(),
                                     .08*geometry().height());
     }
+    if (constraints & Plasma::FormFactorConstraint) {
+        if (formFactor() == Plasma::Horizontal) {
+            mLayout->setOrientation(Qt::Horizontal);
+        } else {
+            mLayout->setOrientation(Qt::Vertical);
+        }
+    }
 }
 
 void LeaveNote::createConfigurationInterface(KConfigDialog *dialog)
 {
     QWidget *widget = new QWidget();
     ui.setupUi(widget);
-    dialog->setMainWidget(widget);
 
     KConfigGroup cg = config();
     ui.useKNotesCheckBox->setChecked(cg.readEntry("useKNotes", true));
@@ -150,8 +157,9 @@
     QDBusReply<QString>reply = knotesDBusTest.call("Introspect");
 
     bool valid = reply.isValid();
-    if (!valid)
+    if (!valid) {
         kDebug() << "KNotes DBus interface test error: " << reply.error();
+    }
 
     return valid;
 }
[prev in list] [next in list] [prev in thread] [next in thread] 

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