[PATCH] Text and button overlaping in systemtray's popup applet when notification from KPackageKitSmartIcon's update

2009-12-23 Thread zhangqiang
Hi,
When there are some updates,the kpackagekitSmartIcon will give a update
notification in systemtray.Now the buttons and text overlay in the
popupapplet.The reason is as following.Before showing the popup applet
the variable bodyHeight is small than expected because it didn't set the
textWidth when the popup applet contains image.The patch is in attachment.
--- kdebase-workspace-4.3.3/plasma/applets/systemtray/ui/notificationwidget.cpp	2009-12-23 13:37:30.422031262 +0800
+++ kdebase-workspace-4.3.3-new/plasma/applets/systemtray/ui/notificationwidget.cpp	2009-12-23 13:42:06.637952800 +0800
@@ -226,6 +226,7 @@
 qreal imageHeight = 0;
 if (!notification->image().isNull()) {
 imageHeight = notification->image().size().height();
+body->setTextWidth(q->preferredWidth() - notification->image().size().width() - 4);
 }
 
 extenderItem->showCloseButton();

___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


PATCH: kdelibs/plasma/containment.cpp ( The sequence o f applets in the panel is out of expected (bugsid:175026) )

2008-11-13 Thread zhangqiang
When I installed kde4,I found that the default sequence
of applets in the panel was different from usual.For example the pager
is in the left of the panel,but usually the launcher should be in the
left by default. When I open the file
/usr/share/kde-settings/kde-profile/default/share/config/plasma-appletsrc,I
found the default sequence of applets in this file is the same as
usual. At the same time I foundĀ  the topleft coordinate of every applet
is all (0,0) in the file
/usr/share/kde-settings/kde-profile/default/share/config/plasma-appletsrc.Why
is the showing result out of expected ? By looking at source code ,I
findĀ  the reason is that the sorting algorithm in the file
kdelibs/plasma/containment.cpp is not very good.Through modifying the
sort algorithm,the results are expected with the implementation of the
same.I think such changes after installation is in line with the general KDE usrer's habits.My patch is in the attachment.Thanks.The modified file containment.cpp is in file kdelibs/plasma/.


containment-qSort.patch
Description: Binary data
___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


PATCH for improve the panel action(bug num:177219)

2008-12-08 Thread zhangqiang
In order to help general users.I make a patch.I don't know whether it is needed
and suitable.That is, if the user deletes the last panel,give the tip "This is
the last panel! Make sure you know how to add it.",that is unlike the usual tip
"Do you really want to remove the panel ?" I do it in the containment, and my
patch attached. Thanks very much.



containment-h.patch
Description: Binary data


containment-cpp.patch
Description: Binary data
___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel