aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src-qt5/core/lumina-desktop/LPanel.h1
-rw-r--r--src-qt5/core/lumina-desktop/panel-plugins/clock/LClock.cpp6
2 files changed, 5 insertions, 2 deletions
diff --git a/src-qt5/core/lumina-desktop/LPanel.h b/src-qt5/core/lumina-desktop/LPanel.h
index bcea8eaf..58e315b8 100644
--- a/src-qt5/core/lumina-desktop/LPanel.h
+++ b/src-qt5/core/lumina-desktop/LPanel.h
@@ -42,6 +42,7 @@ private:
int panelnum;
int viswidth, fullwidth;
QList<LPPlugin*> PLUGINS;
+ QRect desiredGeom;
int Screen(); //Turn the screenID into the appropriate number
diff --git a/src-qt5/core/lumina-desktop/panel-plugins/clock/LClock.cpp b/src-qt5/core/lumina-desktop/panel-plugins/clock/LClock.cpp
index a5266bee..ef58169d 100644
--- a/src-qt5/core/lumina-desktop/panel-plugins/clock/LClock.cpp
+++ b/src-qt5/core/lumina-desktop/panel-plugins/clock/LClock.cpp
@@ -100,10 +100,12 @@ void LClock::updateTime(bool adjustformat){
}
if(lines.length()==1){ wid+=6; } //need some extra margins for single-line
else{ wid-=6; } // need to remove some margins for multi-line
- this->setFixedWidth( wid );
+ this->setMinimumWidth( wid );
+ this->setMaximumWidth(wid+6);
}else{
//vertical layout
- this->setMaximumWidth(button->fontMetrics().lineSpacing() * lines.length());
+ this->setMinimumHeight(button->fontMetrics().lineSpacing() * lines.length());
+ this->setMaximumHeight( 6*button->fontMetrics().height() );
}
}
button->setText(label);
bgstack15