A modern Music Player Daemon based on Rockbox open source high quality audio player
libadwaita audio rust zig deno mpris rockbox mpd
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

Theme Editor: Implemented status bar enable/disable

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27200 a1c6a512-1295-4272-9138-f99709370657

+43 -3
+5 -1
utils/themeeditor/graphics/rbscreen.cpp
··· 29 29 RBScreen::RBScreen(const RBRenderInfo& info, bool remote, 30 30 QGraphicsItem *parent) 31 31 :QGraphicsItem(parent), backdrop(0), project(project), 32 - albumArt(0) 32 + albumArt(0), defaultStatusBar(true), 33 + statusBarTexture(":/render/statusbar.png") 33 34 { 34 35 35 36 if(remote) ··· 116 117 { 117 118 painter->fillRect(0, 0, width, height, bgColor); 118 119 } 120 + 121 + if(defaultStatusBar) 122 + painter->fillRect(QRectF(0, 0, width, 8), statusBarTexture); 119 123 } 120 124 121 125 void RBScreen::loadViewport(QString name, RBViewport *view)
+5
utils/themeeditor/graphics/rbscreen.h
··· 83 83 } 84 84 } 85 85 86 + void disableStatusBar(){ defaultStatusBar = false; } 87 + void enableStatusBar(){ defaultStatusBar = true; } 86 88 87 89 private: 88 90 int width; ··· 101 103 QList<QString> displayedViewports; 102 104 103 105 RBAlbumArt* albumArt; 106 + 107 + bool defaultStatusBar; 108 + QPixmap statusBarTexture; 104 109 105 110 }; 106 111
+5 -1
utils/themeeditor/graphics/rbviewport.cpp
··· 33 33 : QGraphicsItem(info.screen()), font(info.screen()->getFont(0)), 34 34 foreground(info.screen()->foreground()), 35 35 background(info.screen()->background()), textOffset(0,0), 36 - screen(info.screen()), textAlign(Left) 36 + screen(info.screen()), textAlign(Left), showStatusBar(false), 37 + statusBarTexture(":/render/statusbar.png") 37 38 { 38 39 if(!node->tag) 39 40 { ··· 140 141 painter->setPen(customUI ? Qt::blue : Qt::red); 141 142 if(debug) 142 143 painter->drawRect(size); 144 + 145 + if(showStatusBar) 146 + painter->fillRect(QRectF(0, 0, size.width(), 8), statusBarTexture); 143 147 } 144 148 145 149 void RBViewport::newLine()
+5
utils/themeeditor/graphics/rbviewport.h
··· 57 57 void write(QString text); 58 58 void alignText(Alignment align){ textAlign = align; } 59 59 60 + void enableStatusBar(){ showStatusBar = true; } 61 + 60 62 private: 61 63 62 64 void alignLeft(); ··· 79 81 QList<QGraphicsItem*> centerText; 80 82 QList<QGraphicsItem*> rightText; 81 83 Alignment textAlign; 84 + 85 + bool showStatusBar; 86 + QPixmap statusBarTexture; 82 87 }; 83 88 84 89 #endif // RBVIEWPORT_H
+19
utils/themeeditor/models/parsetreenode.cpp
··· 611 611 612 612 return false; 613 613 614 + case 'w': 615 + switch(element->tag->name[1]) 616 + { 617 + case 'd': 618 + info.screen()->disableStatusBar(); 619 + return true; 620 + 621 + case 'e': 622 + info.screen()->enableStatusBar(); 623 + return true; 624 + 625 + case 'i': 626 + info.screen()->disableStatusBar(); 627 + viewport->enableStatusBar(); 628 + return true; 629 + } 630 + 631 + return false; 632 + 614 633 case 'x': 615 634 switch(element->tag->name[1]) 616 635 {
+1
utils/themeeditor/resources.qrc
··· 13 13 <qresource prefix="/render"> 14 14 <file alias="scenebg.png">resources/render/scenebg.png</file> 15 15 <file alias="albumart.png">resources/render/albumart.png</file> 16 + <file alias="statusbar.png">resources/render/statusbar.png</file> 16 17 </qresource> 17 18 </RCC>
utils/themeeditor/resources/render/statusbar.png

This is a binary file and will not be displayed.

+3 -1
utils/themeeditor/themeeditor.pro
··· 72 72 resources/document-save.png \ 73 73 resources/document-open.png \ 74 74 resources/document-new.png \ 75 - resources/deviceoptions 75 + resources/deviceoptions \ 76 + resources/render/statusbar.png \ 77 + resources/render/scenebg.png 76 78 FORMS += gui/editorwindow.ui \ 77 79 gui/preferencesdialog.ui \ 78 80 gui/configdocument.ui \