summaryrefslogtreecommitdiff
path: root/noncore/graphics/drawpad/thumbnailview.cpp
Side-by-side diff
Diffstat (limited to 'noncore/graphics/drawpad/thumbnailview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/graphics/drawpad/thumbnailview.cpp22
1 files changed, 15 insertions, 7 deletions
diff --git a/noncore/graphics/drawpad/thumbnailview.cpp b/noncore/graphics/drawpad/thumbnailview.cpp
index 1ccf484..d190ffe 100644
--- a/noncore/graphics/drawpad/thumbnailview.cpp
+++ b/noncore/graphics/drawpad/thumbnailview.cpp
@@ -9,26 +9,27 @@
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#include "thumbnailview.h"
#include "drawpad.h"
#include "drawpadcanvas.h"
#include "newpagedialog.h"
#include "page.h"
+#include <opie2/oresource.h>
+
#include <qpe/config.h>
-#include <qpe/resource.h>
#include <qpe/timestring.h>
#include <qapplication.h>
#include <qlayout.h>
#include <qmessagebox.h>
#include <qtoolbutton.h>
#include <qwhatsthis.h>
#define THUMBNAIL_SIZE 48
PageListBoxItem::PageListBoxItem(Page* page, QListBox* parent)
: QListBoxItem(parent)
@@ -230,50 +231,57 @@ Page* PageListBox::selected() const
}
ThumbnailView::ThumbnailView(DrawPad* drawPad, DrawPadCanvas* drawPadCanvas, QWidget* parent, const char* name)
: QWidget(parent, name, Qt::WType_Modal | Qt::WType_TopLevel | Qt::WStyle_ContextHelp)
{
inLoop = false;
m_pDrawPad = drawPad;
m_pDrawPadCanvas = drawPadCanvas;
setCaption(tr("DrawPad - Thumbnail View"));
+ bool useBigIcon = qApp->desktop()->size().width() > 330;
+
QToolButton* newPageButton = new QToolButton(this);
- newPageButton->setIconSet(Resource::loadIconSet("new"));
+ newPageButton->setUsesBigPixmap( useBigIcon );
+ newPageButton->setPixmap(Opie::Core::OResource::loadPixmap("new", Opie::Core::OResource::SmallIcon));
newPageButton->setAutoRaise(true);
connect(newPageButton, SIGNAL(clicked()), this, SLOT(newPage()));
QWhatsThis::add( newPageButton, tr( "Click here to add a new sheet." ) );
QToolButton* clearPageButton = new QToolButton(this);
- clearPageButton->setIconSet(Resource::loadIconSet("drawpad/clear"));
+ clearPageButton->setUsesBigPixmap( useBigIcon );
+ clearPageButton->setPixmap(Opie::Core::OResource::loadPixmap("drawpad/clear", Opie::Core::OResource::SmallIcon));
clearPageButton->setAutoRaise(true);
connect(clearPageButton, SIGNAL(clicked()), this, SLOT(clearPage()));
QWhatsThis::add( clearPageButton, tr( "Click here to erase the current sheet." ) );
QToolButton* deletePageButton = new QToolButton(this);
- deletePageButton->setIconSet(Resource::loadIconSet("trash"));
+ deletePageButton->setUsesBigPixmap( useBigIcon );
+ deletePageButton->setPixmap(Opie::Core::OResource::loadPixmap("trash", Opie::Core::OResource::SmallIcon));
deletePageButton->setAutoRaise(true);
connect(deletePageButton, SIGNAL(clicked()), this, SLOT(deletePage()));
QWhatsThis::add( deletePageButton, tr( "Click here to remove the current sheet." ) );
m_pMovePageUpButton = new QToolButton(this);
- m_pMovePageUpButton->setIconSet(Resource::loadIconSet("up"));
+ m_pMovePageUpButton->setUsesBigPixmap( useBigIcon );
+ m_pMovePageUpButton->setPixmap(Opie::Core::OResource::loadPixmap("up", Opie::Core::OResource::SmallIcon));
m_pMovePageUpButton->setAutoRaise(true);
connect(m_pMovePageUpButton, SIGNAL(clicked()), this, SLOT(movePageUp()));
QWhatsThis::add( m_pMovePageUpButton, tr( "Click here to move the current sheet up one position in the list." ) );
-
+
m_pMovePageDownButton = new QToolButton(this);
- m_pMovePageDownButton->setIconSet(Resource::loadIconSet("down"));
+ m_pMovePageDownButton->setUsesBigPixmap( useBigIcon );
+ m_pMovePageDownButton->setPixmap(Opie::Core::OResource::loadPixmap("down", Opie::Core::OResource::SmallIcon));
m_pMovePageDownButton->setAutoRaise(true);
connect(m_pMovePageDownButton, SIGNAL(clicked()), this, SLOT(movePageDown()));
QWhatsThis::add( m_pMovePageDownButton, tr( "Click here to move the current sheet down one position in the list." ) );
m_pPageListBox = new PageListBox(m_pDrawPadCanvas, this);
connect(m_pPageListBox, SIGNAL(selectionChanged()), this, SLOT(changePage()));
QVBoxLayout* mainLayout = new QVBoxLayout(this, 4, 4);
QHBoxLayout* buttonLayout = new QHBoxLayout(0);
buttonLayout->addWidget(newPageButton);
buttonLayout->addWidget(clearPageButton);