Commit e9cd930c authored by Stephan Kulow's avatar Stephan Kulow
Browse files

make it work at least somewhat

svn path=/trunk/KDE/kdebase/libkonq/; revision=538875
parent ad2a9af4
...@@ -58,7 +58,6 @@ KonqBgndDialog::KonqBgndDialog( QWidget* parent, ...@@ -58,7 +58,6 @@ KonqBgndDialog::KonqBgndDialog( QWidget* parent,
groupLayout->setAlignment( Qt::AlignTop ); groupLayout->setAlignment( Qt::AlignTop );
mainLayout->addWidget( m_buttonGroup ); mainLayout->addWidget( m_buttonGroup );
// color // color
m_radioColor = new QRadioButton( i18n("Co&lor:"), m_buttonGroup ); m_radioColor = new QRadioButton( i18n("Co&lor:"), m_buttonGroup );
groupLayout->addWidget( m_radioColor, 0, 0 ); groupLayout->addWidget( m_radioColor, 0, 0 );
...@@ -90,7 +89,6 @@ KonqBgndDialog::KonqBgndDialog( QWidget* parent, ...@@ -90,7 +89,6 @@ KonqBgndDialog::KonqBgndDialog( QWidget* parent,
// preview title // preview title
QHBoxLayout* hlay = new QHBoxLayout(); QHBoxLayout* hlay = new QHBoxLayout();
hlay->setParent( mainLayout );
hlay->setSpacing( KDialog::spacingHint() ); hlay->setSpacing( KDialog::spacingHint() );
//mainLayout->addLayout( hlay ); //mainLayout->addLayout( hlay );
QLabel* lbl = new QLabel( i18n("Preview"), page ); QLabel* lbl = new QLabel( i18n("Preview"), page );
...@@ -101,6 +99,8 @@ KonqBgndDialog::KonqBgndDialog( QWidget* parent, ...@@ -101,6 +99,8 @@ KonqBgndDialog::KonqBgndDialog( QWidget* parent,
frame->setFrameShadow( QFrame::Sunken ); frame->setFrameShadow( QFrame::Sunken );
hlay->addWidget( frame ); hlay->addWidget( frame );
mainLayout->addItem(hlay);
// preview frame // preview frame
m_preview = new QFrame( page ); m_preview = new QFrame( page );
m_preview->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ); m_preview->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding );
......
...@@ -305,6 +305,7 @@ void KonqIconViewWidget::slotOnItem( Q3IconViewItem *_item ) ...@@ -305,6 +305,7 @@ void KonqIconViewWidget::slotOnItem( Q3IconViewItem *_item )
{ {
delete d->m_movie; delete d->m_movie;
d->m_movie = KGlobal::iconLoader()->loadMovie( d->pActiveItem->mouseOverAnimation(), K3Icon::Desktop, d->pActiveItem->iconSize() ); d->m_movie = KGlobal::iconLoader()->loadMovie( d->pActiveItem->mouseOverAnimation(), K3Icon::Desktop, d->pActiveItem->iconSize() );
#if 0
if ( d->m_movie && d->m_movie->isValid() ) if ( d->m_movie && d->m_movie->isValid() )
{ {
// Fix alpha-channel - currently only if no background pixmap, // Fix alpha-channel - currently only if no background pixmap,
...@@ -330,6 +331,7 @@ void KonqIconViewWidget::slotOnItem( Q3IconViewItem *_item ) ...@@ -330,6 +331,7 @@ void KonqIconViewWidget::slotOnItem( Q3IconViewItem *_item )
// No movie available, remember it // No movie available, remember it
d->pActiveItem->setMouseOverAnimation( QString() ); d->pActiveItem->setMouseOverAnimation( QString() );
} }
#endif
} }
} // animations } // animations
// Only do the normal "mouseover" effect if no animation is in use // Only do the normal "mouseover" effect if no animation is in use
...@@ -921,6 +923,9 @@ void KonqIconViewWidget::drawBackground( QPainter *p, const QRect &r ) ...@@ -921,6 +923,9 @@ void KonqIconViewWidget::drawBackground( QPainter *p, const QRect &r )
void KonqIconViewWidget::drawBackground( QPainter *p, const QRect &r , const QPoint &pt) void KonqIconViewWidget::drawBackground( QPainter *p, const QRect &r , const QPoint &pt)
{ {
Q3IconView::drawBackground(p, r);
return;
#if 0
const QPixmap *pm = backgroundPixmap(); const QPixmap *pm = backgroundPixmap();
bool hasPixmap = pm && !pm->isNull(); bool hasPixmap = pm && !pm->isNull();
if ( !hasPixmap ) { if ( !hasPixmap ) {
...@@ -940,6 +945,7 @@ void KonqIconViewWidget::drawBackground( QPainter *p, const QRect &r , const QPo ...@@ -940,6 +945,7 @@ void KonqIconViewWidget::drawBackground( QPainter *p, const QRect &r , const QPo
int ay = (r.y() + contentsY() + topMargin()) % pm->height(); int ay = (r.y() + contentsY() + topMargin()) % pm->height();
p->drawTiledPixmap(rtgt, *pm, QPoint(ax, ay)); p->drawTiledPixmap(rtgt, *pm, QPoint(ax, ay));
} }
#endif
} }
Q3DragObject * KonqIconViewWidget::dragObject() Q3DragObject * KonqIconViewWidget::dragObject()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment