'fixes' layouts for pushbuttons
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=696696
This commit is contained in:
parent
5d05c8ac7e
commit
f33c5ab58b
@ -260,6 +260,23 @@ void PushButton::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
|
||||
update();
|
||||
}
|
||||
|
||||
QSizeF PushButton::minimumSize() const
|
||||
{
|
||||
QFontMetricsF m = qApp->fontMetrics();
|
||||
return m.boundingRect(text()).size() + QSizeF(5.0f, 5.0f);
|
||||
}
|
||||
|
||||
Qt::Orientations PushButton::expandingDirections() const
|
||||
{
|
||||
return Qt::Horizontal;
|
||||
}
|
||||
|
||||
QSizeF PushButton::sizeHint() const
|
||||
{
|
||||
return minimumSize();
|
||||
}
|
||||
|
||||
|
||||
} // namespace Plasma
|
||||
|
||||
#include "pushbutton.moc"
|
||||
|
@ -134,6 +134,11 @@ public:
|
||||
*/
|
||||
void setFlat(bool flat);
|
||||
|
||||
// NOTE: bogus
|
||||
QSizeF minimumSize() const;
|
||||
Qt::Orientations expandingDirections() const;
|
||||
QSizeF sizeHint() const;
|
||||
|
||||
Q_SIGNALS:
|
||||
/**
|
||||
* Triggered when the button has been clicked.
|
||||
|
Loading…
x
Reference in New Issue
Block a user