From d566384a4a81497864c30c657ee5ceebb55d3987 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Tue, 20 Oct 2015 11:11:54 -0400 Subject: Ok, *Now* the desktop plugin resizing routine works properly. Also try to fix an issue with the calendar plugin not scaling down appropriately on the bottom/right edges. --- lumina-desktop/desktop-plugins/LDPlugin.h | 5 ++++- lumina-desktop/desktop-plugins/calendar/CalendarPlugin.h | 4 ++++ 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'lumina-desktop/desktop-plugins') diff --git a/lumina-desktop/desktop-plugins/LDPlugin.h b/lumina-desktop/desktop-plugins/LDPlugin.h index 521a89f4..d1a9c743 100644 --- a/lumina-desktop/desktop-plugins/LDPlugin.h +++ b/lumina-desktop/desktop-plugins/LDPlugin.h @@ -141,7 +141,10 @@ protected: } QWidget::mouseMoveEvent(ev); } - + void resizeEvent(QResizeEvent *ev){ + emit PluginResized(); + QFrame::resizeEvent(ev); //do normal processing + } }; #endif diff --git a/lumina-desktop/desktop-plugins/calendar/CalendarPlugin.h b/lumina-desktop/desktop-plugins/calendar/CalendarPlugin.h index e9652e17..133a3af6 100644 --- a/lumina-desktop/desktop-plugins/calendar/CalendarPlugin.h +++ b/lumina-desktop/desktop-plugins/calendar/CalendarPlugin.h @@ -33,6 +33,7 @@ public: timer->setInterval(1800000); //30 minute refresh timer timer->start(); QTimer::singleShot(0,this, SLOT(updateDate()) ); + connect(this, SIGNAL(PluginResized()), this, SLOT(UpdateCalendarSize())); } ~CalendarPlugin(){ timer->stop(); } @@ -44,6 +45,9 @@ private slots: cal->showSelectedDate(); } } + void UpdateCalendarSize(){ + cal->setFixedSize(this->size()); + } }; -- cgit