Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Sysstat panel plugin: collapse when vertical panel is autosizing prev…

…ented
  • Loading branch information...
commit 76e63d7d60a44d8b8b2a8a8e2cee4ad021a60a90 1 parent a90b007
@kuzmas kuzmas authored
View
7 razorqt-panel/plugin-sysstat/razorsysstat.cpp
@@ -60,6 +60,8 @@ RazorSysStat::RazorSysStat(const RazorPanelPluginStartInfo *startInfo, QWidget *
this->layout()->setContentsMargins(0, 0, 0, 0);
this->layout()->setSpacing(0);
+ mContent->setMinimumSize(2, 2);
+
// qproperty of font type doesn't work with qss, so fake QLabel is used instead
connect(mFakeTitle, SIGNAL(fontChanged(QFont)), mContent, SLOT(setTitleFont(QFont)));
@@ -362,7 +364,7 @@ void RazorSysStatContent::resizeEvent(QResizeEvent * /*event*/)
void RazorSysStatContent::reset(void)
{
- setMinimumSize(mPanel->isHorizontal() ? mMinimalSize : 0, mPanel->isHorizontal() ? 0 : mMinimalSize);
+ setMinimumSize(mPanel->isHorizontal() ? mMinimalSize : 2, mPanel->isHorizontal() ? 2 : mMinimalSize);
mHistoryOffset = 0;
mHistoryImage = QImage(width(), 100, QImage::Format_ARGB32);
@@ -564,6 +566,9 @@ void RazorSysStatContent::paintEvent(QPaintEvent *event)
}
}
+ if (graphHeight < 1)
+ graphHeight = 1;
+
p.scale(1.0, -1.0);
p.drawImage(QRect(0, -height(), width() - mHistoryOffset, graphHeight), mHistoryImage, QRect(mHistoryOffset, 0, width() - mHistoryOffset, 100));
View
26 razorqt-panel/plugin-sysstat/razorsysstatconfiguration.ui
@@ -83,7 +83,7 @@
<string> px</string>
</property>
<property name="minimum">
- <number>1</number>
+ <number>2</number>
</property>
<property name="maximum">
<number>120</number>
@@ -155,6 +155,12 @@
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>0</width>
+ <height>0</height>
+ </size>
+ </property>
</spacer>
</item>
</layout>
@@ -172,6 +178,12 @@
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>0</width>
+ <height>0</height>
+ </size>
+ </property>
</spacer>
</item>
</layout>
@@ -253,6 +265,12 @@
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>0</width>
+ <height>0</height>
+ </size>
+ </property>
</spacer>
</item>
</layout>
@@ -357,6 +375,12 @@
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>0</width>
+ <height>0</height>
+ </size>
+ </property>
</spacer>
</item>
</layout>
Please sign in to comment.
Something went wrong with that request. Please try again.