summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/launcherview.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/core/launcher/launcherview.cpp b/core/launcher/launcherview.cpp
index 71e8753..e86f389 100644
--- a/core/launcher/launcherview.cpp
+++ b/core/launcher/launcherview.cpp
@@ -893,98 +893,100 @@ void LauncherView::setBackgroundType( BackgroundType t, const QString &val )
QObject *obj;
for ( QObjectListIt it( *list ); (obj=it.current()); ++it ) {
if ( obj->isWidgetType() ) {
QWidget *w = (QWidget*)obj;
w->setBackgroundPixmap( bg );
if ( bgName.isEmpty() ) {
// Solid Color
if ( val.isEmpty() )
w->setBackgroundColor( colorGroup().base() );
else
w->setBackgroundColor( val );
} else {
// Ruled or Image pixmap
w->setBackgroundOrigin( ParentOrigin );
}
}
}
delete list;
bgType = t;
icons->viewport()->update();
QTimer::singleShot( 1000, this, SLOT(flushBgCache()) );
}
void LauncherView::setTextColor( const QColor &tc )
{
textCol = tc;
QColorGroup cg = icons->colorGroup();
cg.setColor( QColorGroup::Text, tc );
icons->setPalette( QPalette(cg,cg,cg) );
icons->viewport()->update();
}
void LauncherView::setViewFont( const QFont &f )
{
icons->setFont( f );
icons->hideOrShowItems( FALSE );
}
void LauncherView::clearViewFont()
{
icons->unsetFont();
icons->hideOrShowItems( FALSE );
}
void LauncherView::resizeEvent(QResizeEvent *e)
{
+// qDebug("LauncherView resize event");
QVBox::resizeEvent( e );
- if ( e->size().width() != e->oldSize().width() )
+// commented out for launcherview and qt/e 2.3.8 problems, probably needs real fixing somewhere...
+// if ( e->size().width() != e->oldSize().width() )
sort();
}
void LauncherView::selectionChanged()
{
QIconViewItem* item = icons->currentItem();
if ( item && item->isSelected() ) {
AppLnk *appLnk = ((LauncherItem *)item)->appLnk();
if ( icons->inKeyEvent() ) // not for mouse press
emit clicked( appLnk );
item->setSelected(FALSE);
}
}
void LauncherView::returnPressed( QIconViewItem *item )
{
if ( item ) {
AppLnk *appLnk = ((LauncherItem *)item)->appLnk();
emit clicked( appLnk );
}
}
void LauncherView::itemClicked( int btn, QIconViewItem *item )
{
if ( item ) {
AppLnk *appLnk = ((LauncherItem *)item)->appLnk();
if ( btn == LeftButton ) {
// Make sure it's the item we execute that gets highlighted
icons->setCurrentItem( item );
emit clicked( appLnk );
}
item->setSelected(FALSE);
}
}
void LauncherView::itemPressed( int btn, QIconViewItem *item )
{
if ( item ) {
AppLnk *appLnk = ((LauncherItem *)item)->appLnk();
if ( btn == RightButton )
emit rightPressed( appLnk );
else if ( btn == ShiftButton )
emit rightPressed( appLnk );
item->setSelected(FALSE);
}
}
void LauncherView::removeAllItems()