[GB.QT4]
* BUG: The AutoResize property of Button and ToolButton now works correctly. git-svn-id: svn://localhost/gambas/trunk@2249 867c0c6c-44f3-4631-809d-bfa615b0a4ec
This commit is contained in:
parent
4f027f7eca
commit
e5f3d190c7
3 changed files with 17 additions and 19 deletions
|
@ -1,14 +1,14 @@
|
|||
# Gambas Form File 3.0
|
||||
|
||||
{ Form Form
|
||||
MoveScaled(0,2.1429,112,47)
|
||||
MoveScaled(0,2.1429,115,47)
|
||||
Text = ("Debug")
|
||||
Persistent = True
|
||||
Arrangement = Arrange.Fill
|
||||
{ splDebug HSplit
|
||||
MoveScaled(1,1,103,45)
|
||||
MoveScaled(1,1,113,45)
|
||||
{ tabDebug TabStrip
|
||||
MoveScaled(2,2,77,38)
|
||||
MoveScaled(1,2,88,41)
|
||||
Expand = True
|
||||
Arrangement = Arrange.Vertical
|
||||
Count = 6
|
||||
|
@ -152,7 +152,7 @@
|
|||
Index = 0
|
||||
}
|
||||
{ panStack VBox
|
||||
MoveScaled(80,2,22,41)
|
||||
MoveScaled(90,1,22,41)
|
||||
Visible = False
|
||||
Expand = True
|
||||
{ HBox3 HBox
|
||||
|
|
|
@ -542,7 +542,7 @@ MyPushButton::~MyPushButton()
|
|||
|
||||
void MyPushButton::changeEvent(QEvent *e)
|
||||
{
|
||||
QWidget::changeEvent(e);
|
||||
QPushButton::changeEvent(e);
|
||||
if (e->type() == QEvent::FontChange || e->type() == QEvent::StyleChange)
|
||||
calcMinimumSize();
|
||||
}
|
||||
|
@ -563,22 +563,22 @@ void MyPushButton::calcMinimumSize()
|
|||
else
|
||||
setMinimumHeight(0);
|
||||
|
||||
setMinimumWidth(0);
|
||||
if (THIS->autoresize)
|
||||
{
|
||||
size = sizeHint();
|
||||
setMinimumWidth(size.width());
|
||||
CWIDGET_resize(THIS, size.width(), height());
|
||||
setMinimumWidth(size.width());
|
||||
}
|
||||
else
|
||||
setMinimumWidth(0);
|
||||
|
||||
//qDebug("%p: %s: %d", this, text().latin1(), minimumHeight());
|
||||
}
|
||||
|
||||
void MyPushButton::resizeEvent(QResizeEvent *e)
|
||||
/*void MyPushButton::resizeEvent(QResizeEvent *e)
|
||||
{
|
||||
set_button((CBUTTON *)CWidget::get(this), NULL, true);
|
||||
}
|
||||
}*/
|
||||
|
||||
/*void MyPushButton::paintEvent(QPaintEvent *)
|
||||
{
|
||||
|
@ -606,7 +606,7 @@ MyToolButton::~MyToolButton()
|
|||
|
||||
void MyToolButton::changeEvent(QEvent *e)
|
||||
{
|
||||
QWidget::changeEvent(e);
|
||||
QToolButton::changeEvent(e);
|
||||
if (e->type() == QEvent::FontChange || e->type() == QEvent::StyleChange)
|
||||
calcMinimumSize();
|
||||
}
|
||||
|
@ -627,20 +627,19 @@ void MyToolButton::calcMinimumSize()
|
|||
else
|
||||
setMinimumHeight(0);
|
||||
|
||||
setMinimumWidth(0);
|
||||
if (THIS->autoresize)
|
||||
{
|
||||
size = sizeHint();
|
||||
setMinimumWidth(size.width());
|
||||
CWIDGET_resize(THIS, size.width(), height());
|
||||
setMinimumWidth(size.width());
|
||||
}
|
||||
else
|
||||
setMinimumWidth(0);
|
||||
}
|
||||
|
||||
void MyToolButton::resizeEvent(QResizeEvent *e)
|
||||
/*void MyToolButton::resizeEvent(QResizeEvent *e)
|
||||
{
|
||||
set_tool_button((CBUTTON *)CWidget::get(this), NULL, true);
|
||||
}
|
||||
//set_tool_button((CBUTTON *)CWidget::get(this), NULL, true);
|
||||
}*/
|
||||
|
||||
/*void MyToolButton::paintEvent(QPaintEvent *)
|
||||
{
|
||||
|
|
|
@ -71,7 +71,7 @@ public:
|
|||
~MyPushButton();
|
||||
virtual void changeEvent(QEvent *e);
|
||||
void calcMinimumSize();
|
||||
virtual void resizeEvent(QResizeEvent *e);
|
||||
//virtual void resizeEvent(QResizeEvent *e);
|
||||
//virtual void paintEvent(QPaintEvent *e);
|
||||
|
||||
CWINDOW *top;
|
||||
|
@ -88,7 +88,7 @@ public:
|
|||
~MyToolButton();
|
||||
virtual void changeEvent(QEvent *e);
|
||||
void calcMinimumSize();
|
||||
virtual void resizeEvent(QResizeEvent *e);
|
||||
//virtual void resizeEvent(QResizeEvent *e);
|
||||
//virtual void paintEvent(QPaintEvent *e);
|
||||
};
|
||||
|
||||
|
@ -108,7 +108,6 @@ public slots:
|
|||
void clicked(void);
|
||||
void clickedToggle(void);
|
||||
void clickedTool(void);
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue