aboutsummaryrefslogtreecommitdiff
path: root/src-qt5
diff options
context:
space:
mode:
Diffstat (limited to 'src-qt5')
-rw-r--r--src-qt5/core/lumina-desktop/panel-plugins/clock/LClock.cpp6
-rw-r--r--src-qt5/desktop-utils/lumina-screenshot/main.cpp2
2 files changed, 5 insertions, 3 deletions
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 ef58169d..7c059844 100644
--- a/src-qt5/core/lumina-desktop/panel-plugins/clock/LClock.cpp
+++ b/src-qt5/core/lumina-desktop/panel-plugins/clock/LClock.cpp
@@ -100,12 +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->setMinimumWidth( wid );
- this->setMaximumWidth(wid+6);
+ this->setMinimumWidth( wid - (4*button->fontMetrics().width("O")) );
+ this->setMaximumWidth(wid + (4*button->fontMetrics().width("O")));
}else{
//vertical layout
this->setMinimumHeight(button->fontMetrics().lineSpacing() * lines.length());
- this->setMaximumHeight( 6*button->fontMetrics().height() );
+ this->setMaximumHeight( (lines.length()+4)*button->fontMetrics().height() );
}
}
button->setText(label);
diff --git a/src-qt5/desktop-utils/lumina-screenshot/main.cpp b/src-qt5/desktop-utils/lumina-screenshot/main.cpp
index 7ba9d2d5..c1d178a2 100644
--- a/src-qt5/desktop-utils/lumina-screenshot/main.cpp
+++ b/src-qt5/desktop-utils/lumina-screenshot/main.cpp
@@ -11,6 +11,8 @@
int main(int argc, char ** argv)
{
+ //Make sure Qt5 auto-scaling is disabled for this application (need exact pixel measurements)
+ unsetenv("QT_AUTO_SCREEN_SCALE_FACTOR");
LTHEME::LoadCustomEnvSettings();
LSingleApplication a(argc, argv, "l-screenshot");
//LuminaThemeEngine theme(&a);
bgstack15