Ticket #3068: mythvideopatch.diff

File mythvideopatch.diff, 1.6 KB (added by zdzisekg@…, 17 years ago)
  • mythvideo/mythvideo/videogallery.h

     
    5656    void positionIcon();
    5757
    5858    void computeLastRowCol(int list_count);
     59    void drawBackground();
    5960
    6061  private:
    6162    bool subtitleOn;
     
    6970    QPixmap backSelPix;
    7071    QPixmap folderRegPix;
    7172    QPixmap folderSelPix;
    72 
     73    QPixmap myBackground;
    7374    int currRow;
    7475    int currCol;
    7576    int lastRow;
  • mythvideo/mythvideo/videogallery.cpp

     
    4141    keepAspectRatio = gContext->GetNumSetting("VideoGalleryAspectRatio", 1);
    4242
    4343    loadWindow(xmldata);
     44
     45    drawBackground(); // draw the background
     46
    4447    LoadIconWindow(); // load icon settings
    4548
    4649    fetchVideos();
     
    266269
    267270void VideoGallery::updateView(QPainter *p)
    268271{
     272
    269273    //
    270274    // Draw all video icons
    271275    //
     
    877881    else if (container_name == "arrows")
    878882        arrowsRect = area;
    879883}
     884
     885void VideoGallery::drawBackground(void)
     886{
     887    QPixmap bground(size());
     888    bground.fill(this, 0, 0);
     889
     890    QPainter tmp(&bground);
     891
     892    LayerSet *container = theme->GetSet("background");
     893    if (container)
     894        container->Draw(&tmp, 0, 0);
     895
     896        tmp.end();
     897        myBackground = bground;
     898
     899    setPaletteBackgroundPixmap(myBackground);
     900}