Ticket #8784: thumbnail.patch
File thumbnail.patch, 1.6 KB (added by , 11 years ago) |
---|
-
mythgallery/mythgallery/iconview.cpp
191 191 BuildFocusList(); 192 192 193 193 // TODO Not accurate, the image may be smaller than the button 194 uint buttonwidth = m_imageList->ItemWidth(); 195 uint buttonheight = m_imageList->ItemHeight(); 194 int thumbWidth = m_imageList->ItemWidth(); 195 int thumbHeight = m_imageList->ItemHeight(); 196 if (m_selectedImage && (m_selectedImage->GetArea().width() > thumbWidth || 197 m_selectedImage->GetArea().height() > thumbHeight)) 198 { 199 thumbWidth = m_selectedImage->GetArea().width(); 200 thumbHeight = m_selectedImage->GetArea().height(); 201 } 196 202 197 203 if (m_thumbGen) 198 m_thumbGen->setSize( (int)buttonwidth, (int)buttonheight);204 m_thumbGen->setSize(thumbWidth, thumbHeight); 199 205 200 206 SetupMediaMonitor(); 201 207 … … 266 272 m_noImagesText->SetVisible((m_itemList.size() == 0)); 267 273 268 274 UpdateText(m_imageList->GetItemCurrent()); 275 UpdateImage(m_imageList->GetItemCurrent()); 269 276 } 270 277 271 278 void IconView::LoadThumbnail(ThumbItem *item) … … 739 746 MythUIButtonListItem *item = m_imageList->GetItemAt(pos); 740 747 if (QFile(thumbitem->GetImageFilename()).exists()) 741 748 item->SetImage(thumbitem->GetImageFilename()); 749 750 if (m_imageList->GetCurrentPos() == pos) 751 UpdateImage(item); 742 752 } 743 753 delete td; 744 754 }