aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/actioneditor
diff options
context:
space:
mode:
authorGravatar Fabio Bas2009-12-13 13:30:09 +0000
committerGravatar Fabio Bas2009-12-13 13:30:09 +0000
commit91d242c991462a3c79affe72fac6fab143cbc343 (patch)
tree548dcf38102d47e46ff1be89bb58a49a8a4c3496 /src/modules/actioneditor
parentadded missing shortcut (diff)
downloadKVIrc-91d242c991462a3c79affe72fac6fab143cbc343.tar.gz
KVIrc-91d242c991462a3c79affe72fac6fab143cbc343.tar.bz2
KVIrc-91d242c991462a3c79affe72fac6fab143cbc343.zip
{alias,action,event,raw,popup}editor: don't use a supplementary widget to handle layout and resize events (should fix #642)
input editor: code cleaning git-svn-id: https://svn.kvirc.de/svn/trunk/kvirc@3694 17fca916-40b9-46aa-a4ea-0a15b648b75c
Diffstat (limited to 'src/modules/actioneditor')
-rw-r--r--src/modules/actioneditor/actioneditor.cpp31
-rw-r--r--src/modules/actioneditor/actioneditor.h2
2 files changed, 11 insertions, 22 deletions
diff --git a/src/modules/actioneditor/actioneditor.cpp b/src/modules/actioneditor/actioneditor.cpp
index b05e1e408..079cee80e 100644
--- a/src/modules/actioneditor/actioneditor.cpp
+++ b/src/modules/actioneditor/actioneditor.cpp
@@ -856,31 +856,29 @@ KviActionEditorWindow::KviActionEditorWindow(KviFrame * lpFrm)
g_pActionEditorWindow = this;
setFixedCaption(__tr2qs_ctx("Action Editor","editor"));
- m_pEditor = new KviActionEditor(this);
+ QGridLayout * g = new QGridLayout();
- m_pBase = new QWidget(this);
- QGridLayout * g = new QGridLayout(m_pBase);
+ m_pEditor = new KviActionEditor(this);
+ g->addWidget(m_pEditor,0,0,1,4);
- QPushButton * btn = new QPushButton(__tr2qs_ctx("OK","editor"),m_pBase);
- btn->setMinimumWidth(80);
+ QPushButton * btn = new QPushButton(__tr2qs_ctx("OK","editor"),this);
connect(btn,SIGNAL(clicked()),this,SLOT(okClicked()));
btn->setIcon(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_ACCEPT)));
- g->addWidget(btn,0,1);
+ g->addWidget(btn,1,1);
- btn = new QPushButton(__tr2qs_ctx("Apply","editor"),m_pBase);
- btn->setMinimumWidth(80);
+ btn = new QPushButton(__tr2qs_ctx("Apply","editor"),this);
connect(btn,SIGNAL(clicked()),this,SLOT(applyClicked()));
btn->setIcon(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_ACCEPT)));
- g->addWidget(btn,0,2);
+ g->addWidget(btn,1,2);
- btn = new QPushButton(__tr2qs_ctx("Cancel","editor"),m_pBase);
- btn->setMinimumWidth(80);
+ btn = new QPushButton(__tr2qs_ctx("Cancel","editor"),this);
connect(btn,SIGNAL(clicked()),this,SLOT(cancelClicked()));
btn->setIcon(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_DISCARD)));
- g->addWidget(btn,0,3);
+ g->addWidget(btn,1,3);
+ g->setRowStretch(0,1);
g->setColumnStretch(0,1);
-
+ setLayout(g);
}
KviActionEditorWindow::~KviActionEditorWindow()
@@ -909,13 +907,6 @@ QPixmap * KviActionEditorWindow::myIconPtr()
return g_pIconManager->getSmallIcon(KVI_SMALLICON_SCRIPTACTION);
}
-void KviActionEditorWindow::resizeEvent(QResizeEvent *)
-{
- int hght = m_pBase->sizeHint().height();
- m_pEditor->setGeometry(0,0,width(),height()- hght);
- m_pBase->setGeometry(0,height() - hght,width(),hght);
-}
-
void KviActionEditorWindow::getConfigGroupName(QString &szName)
{
szName = "actioneditor";
diff --git a/src/modules/actioneditor/actioneditor.h b/src/modules/actioneditor/actioneditor.h
index 3c3be4bbd..dc8ea08b6 100644
--- a/src/modules/actioneditor/actioneditor.h
+++ b/src/modules/actioneditor/actioneditor.h
@@ -188,10 +188,8 @@ public:
~KviActionEditorWindow();
protected:
KviActionEditor * m_pEditor;
- QWidget * m_pBase;
protected:
virtual QPixmap * myIconPtr();
- virtual void resizeEvent(QResizeEvent *e);
virtual void getConfigGroupName(QString &szName);
virtual void saveProperties(KviConfig *);
virtual void loadProperties(KviConfig *);