aboutsummaryrefslogtreecommitdiff
path: root/lumina-desktop/desktop-plugins/audioplayer
diff options
context:
space:
mode:
authorKen Moore <moorekou@gmail.com>2015-10-20 14:15:05 -0400
committerKen Moore <moorekou@gmail.com>2015-10-20 14:15:05 -0400
commit20aa87623b3795d8bc21174598da33ce637e993f (patch)
tree7923e74b6de7eb1ea9036ae4a657cc07048e4d02 /lumina-desktop/desktop-plugins/audioplayer
parentOk, *Now* the desktop plugin resizing routine works properly. Also try to fix... (diff)
downloadlumina-20aa87623b3795d8bc21174598da33ce637e993f.tar.gz
lumina-20aa87623b3795d8bc21174598da33ce637e993f.tar.bz2
lumina-20aa87623b3795d8bc21174598da33ce637e993f.zip
Ok, Now the desktop plugin canvas has truly been converted to a grid-space coordinate system. Also setup the desktop plugins to assign a default size for themselves in grid-space rather than pixels (better accounts for screen scaling and such on high-resolution monitors).
Diffstat (limited to 'lumina-desktop/desktop-plugins/audioplayer')
-rw-r--r--lumina-desktop/desktop-plugins/audioplayer/PlayerWidget.cpp1
-rw-r--r--lumina-desktop/desktop-plugins/audioplayer/PlayerWidget.h5
2 files changed, 5 insertions, 1 deletions
diff --git a/lumina-desktop/desktop-plugins/audioplayer/PlayerWidget.cpp b/lumina-desktop/desktop-plugins/audioplayer/PlayerWidget.cpp
index 459e4610..4d293b39 100644
--- a/lumina-desktop/desktop-plugins/audioplayer/PlayerWidget.cpp
+++ b/lumina-desktop/desktop-plugins/audioplayer/PlayerWidget.cpp
@@ -262,7 +262,6 @@ AudioPlayerPlugin::AudioPlayerPlugin(QWidget *parent, QString ID) : LDPlugin(par
this->layout()->setContentsMargins(0,0,0,0);
this->layout()->addWidget(player);
- this->setInitialSize(this->sizeHint().width(), this->sizeHint().height());
}
AudioPlayerPlugin::~AudioPlayerPlugin(){
diff --git a/lumina-desktop/desktop-plugins/audioplayer/PlayerWidget.h b/lumina-desktop/desktop-plugins/audioplayer/PlayerWidget.h
index eaa068ff..6aaeac4c 100644
--- a/lumina-desktop/desktop-plugins/audioplayer/PlayerWidget.h
+++ b/lumina-desktop/desktop-plugins/audioplayer/PlayerWidget.h
@@ -64,6 +64,11 @@ public:
AudioPlayerPlugin(QWidget* parent, QString ID);
~AudioPlayerPlugin();
+ virtual QSize defaultPluginSize(){
+ // The returned QSize is in grid points (typically 100 or 200 pixels square)
+ return QSize(3,1);
+ }
+
private:
PlayerWidget *player;
bgstack15