QmlJSInspector: Fixed position of crumble path menu

These buttons are not in a regular layout so they were not being resized
down to the available size. Just specify a fixed height on all levels
now, and make sure it is consistent.
This commit is contained in:
Thorbjørn Lindeijer
2011-02-17 11:44:02 +01:00
parent 9552e13c3c
commit b2424347b7
2 changed files with 4 additions and 4 deletions

View File

@@ -94,9 +94,10 @@ private:
CrumblePathButton::CrumblePathButton(const QString &title, QWidget *parent) CrumblePathButton::CrumblePathButton(const QString &title, QWidget *parent)
: QPushButton(title, parent), m_isHovering(false), m_isPressed(false), m_isSelected(false), m_isEnd(true) : QPushButton(title, parent), m_isHovering(false), m_isPressed(false), m_isSelected(false), m_isEnd(true)
{ {
setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Minimum); setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed);
setToolTip(title); setToolTip(title);
setMinimumHeight(24); setMinimumHeight(25);
setMaximumHeight(25);
setMouseTracking(true); setMouseTracking(true);
m_textPos.setX(18); m_textPos.setX(18);
m_textPos.setY(height()); m_textPos.setY(height());
@@ -234,7 +235,7 @@ CrumblePath::CrumblePath(QWidget *parent) :
{ {
setMinimumHeight(25); setMinimumHeight(25);
setMaximumHeight(25); setMaximumHeight(25);
setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Minimum); setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed);
} }
CrumblePath::~CrumblePath() CrumblePath::~CrumblePath()

View File

@@ -42,7 +42,6 @@ ContextCrumblePath::ContextCrumblePath(QWidget *parent)
: CrumblePath(parent) : CrumblePath(parent)
, m_isEmpty(true) , m_isEmpty(true)
{ {
setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred);
updateContextPath(QStringList(), QList<int>()); updateContextPath(QStringList(), QList<int>());
} }