diff options
author | chriszero <zerov83@gmail.com> | 2015-05-29 20:42:53 +0200 |
---|---|---|
committer | chriszero <zerov83@gmail.com> | 2015-05-29 20:42:53 +0200 |
commit | 3ec286b742bb833ca203a9965e22d2447fe4d59f (patch) | |
tree | 53545b4962345be75dafca6752b8333bb8288b8f | |
parent | 3bb1c162515089e5f20300029095edef2c1a2387 (diff) | |
download | vdr-plugin-plex-3ec286b742bb833ca203a9965e22d2447fe4d59f.tar.gz vdr-plugin-plex-3ec286b742bb833ca203a9965e22d2447fe4d59f.tar.bz2 |
Some tweaks
-rw-r--r-- | Config.h | 4 | ||||
-rw-r--r-- | browserGrid.cpp | 18 | ||||
-rw-r--r-- | browserGrid.h | 1 |
3 files changed, 16 insertions, 7 deletions
@@ -69,8 +69,8 @@ public: std::string GetPassword(); int ThumbHeight() { return 1080 / CoverGridRows; }; int ThumbWidth() { return 1920 / CoverGridColumns; }; - int ArtHeight() { return 1080; }; - int ArtWidth() { return 1920; }; + int ArtHeight() { return 1080 / 4; }; + int ArtWidth() { return 1920 / 4; }; int BannerHeight() { return 1080 / 2; }; int BannerWidth() { return 1920 / 2; }; diff --git a/browserGrid.cpp b/browserGrid.cpp index 9422eec..c0cd03a 100644 --- a/browserGrid.cpp +++ b/browserGrid.cpp @@ -19,6 +19,7 @@ cBrowserGrid::cBrowserGrid(skindesignerapi::cOsdView* rootView) : cViewGridNavig m_pService = NULL; m_pContainer = NULL; m_viewEntryIndex = 0; + m_redrawBackground = true; Config *conf = &Config::GetInstance(); if(conf->DefaultViewMode == ViewMode::Cover) { @@ -53,10 +54,14 @@ void cBrowserGrid::Clear() void cBrowserGrid::Flush() { + if(m_redrawBackground){ + m_pBackground->Display(); + m_redrawBackground = false; + } + cMutexLock MutexLock(&cPlexSdOsd::RedrawMutex); - m_pBackground->Display(); - m_pInfopane->Display(); m_pGrid->Display(); + m_pRootView->Display(); } @@ -145,6 +150,8 @@ void cBrowserGrid::SwitchGrid(int index) selObj->AddTokens(m_pHeader, false); m_pHeader->AddIntToken("position", selObj->AbsolutePosition); } + + DrawBackground(); } void cBrowserGrid::SetServerElements() @@ -246,7 +253,6 @@ eOSState cBrowserGrid::NavigateBack() void cBrowserGrid::DrawGrid() { - DrawBackground(); m_pHeader->Display(); DrawInfopane(); DrawFooter(); @@ -254,15 +260,16 @@ void cBrowserGrid::DrawGrid() void cBrowserGrid::DrawBackground() { + m_redrawBackground = true; m_pBackground->ClearTokens(); - auto video = dynamic_cast<plexclient::Video*>(SelectedObject()); + /*auto video = dynamic_cast<plexclient::Video*>(SelectedObject()); if(video) { bool cached = false; std::string path = cPictureCache::GetInstance().GetPath(video->ArtUri(), 1920, 1080, cached); m_pBackground->AddStringToken("selecteditembackground", path); } - + */ m_pBackground->AddIntToken("isdirectory", 1); m_pBackground->AddStringToken("currentdirectorybackground", "/path"); m_pBackground->AddIntToken("viewmode", Config::GetInstance().DefaultViewMode); @@ -278,6 +285,7 @@ void cBrowserGrid::DrawInfopane() m_pInfopane->AddIntToken("totalcount", m_vElements.size()); m_pInfopane->AddIntToken("position", SelectedObject()->AbsolutePosition); } + m_pInfopane->Display(); } void cBrowserGrid::DrawFooter() diff --git a/browserGrid.h b/browserGrid.h index 6d50541..a901fc7 100644 --- a/browserGrid.h +++ b/browserGrid.h @@ -49,6 +49,7 @@ private: std::shared_ptr<skindesignerapi::cViewElement> m_pWatch; int m_lastsecond; int m_viewEntryIndex; + bool m_redrawBackground; bool m_bServersAreRoot; std::vector<cServerElement> m_vServerElements; |