Ticket #3325: sys_stat_bg.diff

File sys_stat_bg.diff, 1.6 KB (added by zdzisekg@…, 13 years ago)
  • programs/mythfrontend/statusbox.cpp

    diff -Naur mythtv-orig/programs/mythfrontend/statusbox.cpp mythtv/programs/mythfrontend/statusbox.cpp
    old new  
    5353    LoadTheme();
    5454    if (IsErrored())
    5555        return;
    56  
     56
     57    updateBackground();
     58
    5759    icon_list->SetItemText(item_count++, QObject::tr("Listings Status"));
    5860    icon_list->SetItemText(item_count++, QObject::tr("Schedule Status"));
    5961    icon_list->SetItemText(item_count++, QObject::tr("Tuner Status"));
     
    112114        updateContent();
    113115}
    114116
     117void StatusBox::updateBackground(void)
     118{
     119    QPixmap bground(size());
     120    bground.fill(this, 0, 0);
     121
     122    QPainter tmp(&bground);
     123
     124    LayerSet *container = theme->GetSet("background");
     125    if (container)
     126    {
     127        container->Draw(&tmp, 0, 0);
     128    }
     129
     130    tmp.end();
     131    m_background = bground;
     132
     133    setPaletteBackgroundPixmap(m_background);
     134}
     135
    115136void StatusBox::updateContent()
    116137{
    117138    QRect pr = ContentRect;
  • programs/mythfrontend/statusbox.h

    diff -Naur mythtv-orig/programs/mythfrontend/statusbox.h mythtv/programs/mythfrontend/statusbox.h
    old new  
    2828    void paintEvent(QPaintEvent *e);
    2929
    3030  private:
     31    void updateBackground();
    3132    void updateTopBar();
    3233    void updateSelector();
    3334    void updateContent();
     
    7172
    7273    MythMainWindow *my_parent;
    7374
     75    QPixmap m_background;
     76
    7477    bool isBackend;
    7578    bool errored;
    7679};