author | drw <drw> | 2005-03-12 17:23:56 (UTC) |
---|---|---|
committer | drw <drw> | 2005-03-12 17:23:56 (UTC) |
commit | f195cfb8a11a0b5ef6fd397cc835af59b4266c8c (patch) (side-by-side diff) | |
tree | 329e9d2f260c38c4d77e6da0b878e29ad4b01b31 | |
parent | ced8831cd48879e33fa11d45035cc7ff94180897 (diff) | |
download | opie-f195cfb8a11a0b5ef6fd397cc835af59b4266c8c.zip opie-f195cfb8a11a0b5ef6fd397cc835af59b4266c8c.tar.gz opie-f195cfb8a11a0b5ef6fd397cc835af59b4266c8c.tar.bz2 |
Scale close tab button icon
-rw-r--r-- | noncore/net/opieirc/irctab.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/noncore/net/opieirc/irctab.cpp b/noncore/net/opieirc/irctab.cpp index fbbf303..aee33c4 100644 --- a/noncore/net/opieirc/irctab.cpp +++ b/noncore/net/opieirc/irctab.cpp @@ -1,16 +1,18 @@ #include "irctab.h" #include "mainwindow.h" #include <opie2/okeyconfigmanager.h> + +#include <qpe/applnk.h> #include <qpe/resource.h> #include <qpushbutton.h> #include <qwhatsthis.h> QString IRCTab::m_errorColor; QString IRCTab::m_serverColor; QString IRCTab::m_textColor; QString IRCTab::m_backgroundColor; QString IRCTab::m_selfColor; @@ -33,27 +35,29 @@ QString IRCTab::appendTimestamp( const QString& text ) { } IRCTab::IRCTab(QWidget *parent, const char *name, WFlags f) : QWidget(parent, name, f) { m_layout = new QVBoxLayout(this); QHBoxLayout *descLayout = new QHBoxLayout(m_layout); descLayout->setMargin(5); m_description = new QLabel(tr("Missing description"), this); QWhatsThis::add(m_description, tr("Description of the tab's content")); descLayout->addWidget(m_description); descLayout->setStretchFactor(m_description, 5); - QPushButton *close = new QPushButton(this); + QPixmap pic; + pic.convertFromImage( Resource::loadImage( "close" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) ); + QPushButton *close = new QPushButton(pic, QString::null, this); + close->setMaximumWidth( close->height() ); QWhatsThis::add(close, tr("Close this tab")); - close->setPixmap(Resource::loadPixmap("close")); connect(close, SIGNAL(clicked()), this, SLOT(remove())); descLayout->addWidget(close); descLayout->setStretchFactor(m_description, 1); } void IRCTab::setID(int id) { m_id = id; } int IRCTab::id() { return m_id; |