summaryrefslogtreecommitdiff
path: root/core
authorharlekin <harlekin>2002-02-23 22:47:25 (UTC)
committer harlekin <harlekin>2002-02-23 22:47:25 (UTC)
commitf1c800025cf759ca0d6257a42f548216d217b16b (patch) (side-by-side diff)
tree42aa7b339aad4b6dcfc6b17d4931febbb17b591d /core
parent9f9006e0257e3d4c5d66331a7d6061c8a5da164b (diff)
downloadopie-f1c800025cf759ca0d6257a42f548216d217b16b.zip
opie-f1c800025cf759ca0d6257a42f548216d217b16b.tar.gz
opie-f1c800025cf759ca0d6257a42f548216d217b16b.tar.bz2
make the two bottom menus the same height (the buttons)
Diffstat (limited to 'core') (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/launcherview.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/core/launcher/launcherview.cpp b/core/launcher/launcherview.cpp
index 0df949e..764f088 100644
--- a/core/launcher/launcherview.cpp
+++ b/core/launcher/launcherview.cpp
@@ -411,100 +411,102 @@ bool LauncherIconView::removeLink(const QString& linkfile)
}
return did;
}
LauncherView::LauncherView( QWidget* parent, const char* name, WFlags fl )
: QVBox( parent, name, fl )
{
icons = new LauncherIconView( this );
setFocusProxy(icons);
QPEApplication::setStylusOperation( icons->viewport(), QPEApplication::RightOnHold );
int dw = QApplication::desktop()->width();
icons->setItemsMovable( FALSE );
icons->setAutoArrange( TRUE );
icons->setSorting( TRUE );
icons->setGridX( (dw-13-style().scrollBarExtent().width())/3 ); // tweaked for 8pt+dw=176 and 10pt+dw=240
icons->setGridY( fontMetrics().height()*2+24 );
icons->setFrameStyle( QFrame::NoFrame );
icons->setSpacing( 4 );
icons->setMargin( 0 );
icons->setSelectionMode( QIconView::Multi );
icons->setBackgroundMode( PaletteBase );
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;
}
LauncherView::~LauncherView()
{
}
void LauncherView::setToolsEnabled(bool y)
{
if ( !y != !tools ) {
if ( y ) {
tools = new QHBox(this);
// Type filter
typemb = new MenuButton(tools);
typemb->setLabel(tr("Type: %1"));
-
+ typemb->setFixedHeight ( 20 );
+
// Category filter
catmb = new CategorySelect(tools);
-
+ catmb->setFixedHeight ( 20 );
+
updateTools();
tools->show();
} else {
delete tools;
tools = 0;
}
}
}
void LauncherView::updateTools()
{
disconnect( typemb, SIGNAL(selected(const QString&)),
this, SLOT(showType(const QString&)) );
disconnect( catmb, SIGNAL(signalSelected(int)),
this, SLOT(showCategory(int)) );
icons->updateCategoriesAndMimeTypes();
QString prev;
// Type filter
QStringList types;
types << tr("All");
types << "--";
types += icons->mimeTypes();
prev = typemb->currentText();
typemb->clear();
typemb->insertItems(types);
typemb->select(prev);
Categories cats( 0 );
cats.load( categoryFileName() );
QArray<int> vl( 0 );
catmb->setCategories( vl, "Document View", tr("Document View") );
catmb->setRemoveCategoryEdit( TRUE );
catmb->setAllCategories( TRUE );
connect(typemb, SIGNAL(selected(const QString&)), this, SLOT(showType(const QString&)));
connect(catmb, SIGNAL(signalSelected(int)), this, SLOT(showCategory(int)));
}
void LauncherView::sortBy(int s)
{
icons->setSortMethod((LauncherIconView::SortMethod)s);
}
void LauncherView::showType(const QString& t)
{