forked from qt-creator/qt-creator
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:
@@ -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()
|
||||||
|
|||||||
@@ -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>());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user