"Show Only Icons" tasks in Panel Task Manager
Michael Zanetti
michael_zanetti at gmx.net
Tue Apr 14 11:10:29 CEST 2009
Hi panel devs,
I have written a patch against 4.2 that does exactly this. I'm using it since
a month now. I wrote it because STasks and FancyTasks where either too buggy
or have other things I don't like.
So here it is... If you think this is useful I could port it to trunk and
commit it. You decide.
Cheers,
Michael
On Monday 13 April 2009 02:53:54 Mario Palomo wrote:
> Hi,
>
> I use a narrow vertical Panel and the text of the items in the Task
> Manager are not very useful to me (only 2 or 3 characters), but I see
> a *small* icon and the 2 or 3 characters I don't need. I think is
> better to see only a *big* icon for every task, so I have touch a
> little the file 'abstracttaskitem.cpp', and if I've configured the
> Grouping Strategy to ManualGrouping, I don't show the text: only a big
> icon (I've used the option to Grouping Strategy because I use this
> option too, and the other KDE4 user in the system don't have this
> option and have a horizontal Panel). I am happy with the result.
>
> I think that the developers of the Tasks applet could include a "Show
> only icons" option for me and others (some users of the Panel in
> horizontal position may want this option too: I've discover in
> screenshots that Windows 7 show the tasks only with icons). If you
> want to see the modifications made to the code by a non-KDE4 developer
> that see the code for the first time, here is :-)
>
> Index: abstracttaskitem.cpp
> ===================================================================
> --- abstracttaskitem.cpp (revision 951443)
> +++ abstracttaskitem.cpp (working copy)
> @@ -493,6 +493,8 @@
> painter->drawPixmap(iconRect(bounds).topLeft(), result);
> }
>
> +if ( m_applet->groupManager().groupingStrategy()
> + != TaskManager::GroupManager::ManualGrouping) { //By Mario
> painter->setPen(QPen(textColor(), 1.0));
>
> QRect rect = textRect(bounds).toRect();
> @@ -527,6 +529,7 @@
> painter->drawText(rect, Qt::AlignCenter,
> QString::number(groupItem->memberList().count()));
> }
> }
> +}//By Mario
> }
>
> QTextOption AbstractTaskItem::textOption() const
> @@ -766,7 +769,10 @@
> QRectF bounds(b);
> const int right = bounds.right();
> //leave enough space for the text. useful in vertical panel
> +if ( m_applet->groupManager().groupingStrategy()
> + != TaskManager::GroupManager::ManualGrouping) { //By Mario
> bounds.setWidth(qMax(bounds.width() / 3,
> qMin(minimumSize().height(), bounds.width())));
> +}//By Mario
>
> //restore right position if the layout is RTL
> if (QApplication::layoutDirection() == Qt::RightToLeft) {
>
>
> I hope you have in mind my suggestion. Greetings,
>
> Mario
> _______________________________________________
> Plasma-devel mailing list
> Plasma-devel at kde.org
> https://mail.kde.org/mailman/listinfo/plasma-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: panel_only_icons.patch
Type: text/x-patch
Size: 29624 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/plasma-devel/attachments/20090414/4904eddf/attachment-0001.patch
More information about the Plasma-devel
mailing list