Ticket #3411: mythnews_bg.diff

File mythnews_bg.diff, 2.9 KB (added by zdzisekg@…, 5 years ago)
  • mythnews/mythnews.cpp

    diff -Naur mythnews.orig/mythnews/mythnews.cpp mythnews/mythnews/mythnews.cpp
    old new  
    104104    setNoErase(); 
    105105    loadTheme(); 
    106106 
     107    updateBackground(); 
     108 
    107109    // Now do the actual work 
    108110    m_RetrieveTimer = new QTimer(this); 
    109111    connect(m_RetrieveTimer, SIGNAL(timeout()), 
     
    251253        updateStatusView(); 
    252254} 
    253255 
     256void MythNews::updateBackground(void) 
     257{ 
     258    QPixmap bground(size()); 
     259    bground.fill(this, 0, 0); 
     260 
     261    QPainter tmp(&bground); 
     262 
     263    LayerSet *container = m_Theme->GetSet("background"); 
     264    if (container) 
     265    { 
     266        container->Draw(&tmp, 0, 0); 
     267    } 
     268 
     269    tmp.end(); 
     270    m_background = bground; 
     271 
     272    setPaletteBackgroundPixmap(m_background); 
     273} 
    254274 
    255275void MythNews::updateSitesView() 
    256276{ 
  • mythnews/mythnews.h

    diff -Naur mythnews.orig/mythnews/mythnews.h mythnews/mythnews/mythnews.h
    old new  
    6464    void loadWindow(QDomElement &element); 
    6565    void paintEvent(QPaintEvent *e); 
    6666 
     67    void updateBackground(); 
    6768    void updateSitesView(); 
    6869    void updateArticlesView(); 
    6970    void updateInfoView(); 
     
    9091 
    9192    XMLParse      *m_Theme; 
    9293 
     94    QPixmap        m_background; 
     95 
    9396    UIListBtnType *m_UISites; 
    9497    UIListBtnType *m_UIArticles; 
    9598    QRect          m_SitesRect; 
  • mythnews/mythnewsconfig.cpp

    diff -Naur mythnews.orig/mythnews/mythnewsconfig.cpp mythnews/mythnews/mythnewsconfig.cpp
    old new  
    132132 
    133133    setNoErase(); 
    134134    loadTheme(); 
     135    updateBackground(); 
    135136} 
    136137 
    137138MythNewsConfig::~MythNewsConfig() 
     
    342343    } 
    343344} 
    344345 
     346void MythNewsConfig::updateBackground(void) 
     347{ 
     348    QPixmap bground(size()); 
     349    bground.fill(this, 0, 0); 
     350 
     351    QPainter tmp(&bground); 
     352 
     353    LayerSet *container = m_Theme->GetSet("background"); 
     354    if (container) 
     355    { 
     356        container->Draw(&tmp, 0, 0); 
     357    } 
     358 
     359    tmp.end(); 
     360    m_background = bground; 
     361 
     362    setPaletteBackgroundPixmap(m_background); 
     363} 
    345364 
    346365void MythNewsConfig::updateSites() 
    347366{ 
  • mythnews/mythnewsconfig.h

    diff -Naur mythnews.orig/mythnews/mythnewsconfig.h mythnews/mythnews/mythnewsconfig.h
    old new  
    6464    void populateSites(); 
    6565    void loadTheme(); 
    6666 
    67  
     67    void updateBackground(); 
    6868    void updateSites(); 
    6969    void updateFreq(); 
    7070    void updateBot(); 
     
    8282    MythNewsConfigPriv *m_priv; 
    8383 
    8484    XMLParse           *m_Theme; 
     85 
     86    QPixmap             m_background; 
     87 
    8588    uint                m_Context; 
    8689    uint                m_InColumn; 
    8790