require less space if the applet does not have a configuration interface
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=735975
This commit is contained in:
parent
a99f124c4d
commit
29501c53f2
@ -43,8 +43,9 @@ AppletHandle::AppletHandle(Containment *parent, Applet *applet)
|
|||||||
m_rect = m_applet->boundingRect();
|
m_rect = m_applet->boundingRect();
|
||||||
m_rect = m_applet->mapToParent(m_rect).boundingRect();
|
m_rect = m_applet->mapToParent(m_rect).boundingRect();
|
||||||
|
|
||||||
if (m_rect.height()<158.0) {
|
const int requiredHeight = m_applet->hasConfigurationInterface() ? 158 : 116;
|
||||||
float delta = 158.0-m_rect.height();
|
if (m_rect.height()<requiredHeight) {
|
||||||
|
float delta = requiredHeight-m_rect.height();
|
||||||
delta = delta/2.0;
|
delta = delta/2.0;
|
||||||
if (delta>0.0) {
|
if (delta>0.0) {
|
||||||
m_rect.adjust(0.0, -delta, 0.0, delta);
|
m_rect.adjust(0.0, -delta, 0.0, delta);
|
||||||
|
Loading…
Reference in New Issue
Block a user