Commit b2424347 authored by Thorbjørn Lindeijer's avatar Thorbjørn Lindeijer
Browse files

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.
parent 9552e13c
...@@ -94,9 +94,10 @@ private: ...@@ -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) : ...@@ -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()
......
...@@ -42,7 +42,6 @@ ContextCrumblePath::ContextCrumblePath(QWidget *parent) ...@@ -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>());
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment