summaryrefslogtreecommitdiff
authorzecke <zecke>2004-12-20 22:49:19 (UTC)
committer zecke <zecke>2004-12-20 22:49:19 (UTC)
commit3d9ea198ea8046d3f2c5b88efd721ffb00df2c22 (patch) (side-by-side diff)
tree14ae80693ed5faadd7d8a177f8a86ecefff476b6
parent21b825786deeb195fa73462f09fe70709aa5a628 (diff)
downloadopie-3d9ea198ea8046d3f2c5b88efd721ffb00df2c22.zip
opie-3d9ea198ea8046d3f2c5b88efd721ffb00df2c22.tar.gz
opie-3d9ea198ea8046d3f2c5b88efd721ffb00df2c22.tar.bz2
Patch from Hrw for 1493
"Launcher starts in one column mode" Set the QIconView to adjust its layout on resize
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/launcherview.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/launcher/launcherview.cpp b/core/launcher/launcherview.cpp
index 2783423..dc4c57f 100644
--- a/core/launcher/launcherview.cpp
+++ b/core/launcher/launcherview.cpp
@@ -641,97 +641,97 @@ void LauncherIconView::calculateGrid( ItemTextPos pos )
cols = viewerWidth/150;
setSpacing( 2 );
setGridX( (viewerWidth-(cols+1)*spacing())/cols );
setGridY( fontMetrics().height()+2 );
}
}
void LauncherIconView::styleChange( QStyle &old )
{
QIconView::styleChange( old );
calculateGrid( itemTextPos() );
}
void LauncherIconView::keyPressEvent(QKeyEvent* e)
{
ike = TRUE;
if ( e->key() == Key_F33 /* OK button */ || e->key() == Key_Space ) {
if ( (e->state() & ShiftButton) )
emit mouseButtonPressed(ShiftButton, currentItem(), QPoint() );
else
returnPressed(currentItem());
}
QIconView::keyPressEvent(e);
ike = FALSE;
}
//===========================================================================
// Implemantation of LauncherIconview end
//===========================================================================
//===========================================================================
LauncherView::LauncherView( QWidget* parent, const char* name, WFlags fl )
: QVBox( parent, name, fl )
{
catmb = 0;
icons = new LauncherIconView( this );
setFocusProxy(icons);
QPEApplication::setStylusOperation( icons->viewport(), QPEApplication::RightOnHold );
icons->setItemsMovable( FALSE );
icons->setAutoArrange( TRUE );
icons->setSorting( TRUE );
icons->setFrameStyle( QFrame::NoFrame );
icons->setMargin( 0 );
icons->setSelectionMode( QIconView::NoSelection );
icons->setBackgroundMode( PaletteBase );
- icons->setResizeMode( QIconView::Fixed );
+ icons->setResizeMode( QIconView::Adjust );
vmode = (ViewMode)-1;
setViewMode( Icon );
connect( icons, SIGNAL(mouseButtonClicked(int,QIconViewItem*,const QPoint&)),
SLOT(itemClicked(int,QIconViewItem*)) );
connect( icons, SIGNAL(selectionChanged()),
SLOT(selectionChanged()) );
connect( icons, SIGNAL(returnPressed(QIconViewItem*)),
SLOT(returnPressed(QIconViewItem*)) );
connect( icons, SIGNAL(mouseButtonPressed(int,QIconViewItem*,const QPoint&)),
SLOT(itemPressed(int,QIconViewItem*)) );
tools = 0;
setBackgroundType( Ruled, QString::null );
}
LauncherView::~LauncherView()
{
if ( bgCache && bgCache->contains( bgName ) )
(*bgCache)[bgName]->ref--;
}
bool LauncherView::bsy=FALSE;
void LauncherView::setBusy(bool on)
{
icons->setBusy(on);
}
void LauncherView::setBusyIndicatorType( const QString& type ) {
if ( type. lower ( ) == "animated" )
icons->setBusyIndicatorType( BIT_Animated ) ;
else
icons->setBusyIndicatorType( BIT_Normal ) ;
}
void LauncherView::hideIcons()
{
icons->hide();
}
void LauncherView::setToolsEnabled(bool y)
{
if ( !y != !tools ) {
if ( y ) {
tools = new QHBox(this);
// Type filter