diff --git a/Data/button.png b/Data/button.png new file mode 100644 index 0000000..17674e9 Binary files /dev/null and b/Data/button.png differ diff --git a/Data/button_pressed.png b/Data/button_pressed.png new file mode 100644 index 0000000..0f77077 Binary files /dev/null and b/Data/button_pressed.png differ diff --git a/Data/header.png b/Data/header.png new file mode 100644 index 0000000..f02e7e6 Binary files /dev/null and b/Data/header.png differ diff --git a/Data/player_control.png b/Data/player_control.png new file mode 100644 index 0000000..0f77077 Binary files /dev/null and b/Data/player_control.png differ diff --git a/Mockup/drawing.svg b/Mockup/drawing.svg index 96582c2..7870af6 100644 --- a/Mockup/drawing.svg +++ b/Mockup/drawing.svg @@ -211,20 +211,20 @@ borderopacity="1.0" inkscape:pageopacity="0.0" inkscape:pageshadow="2" - inkscape:zoom="1.6551608" + inkscape:zoom="1.0994222" inkscape:cx="414.76334" - inkscape:cy="203.62079" + inkscape:cy="69.675743" inkscape:document-units="px" - inkscape:current-layer="layer2" + inkscape:current-layer="layer3" showgrid="false" showguides="true" inkscape:guide-bbox="true" inkscape:object-nodes="true" inkscape:snap-nodes="true" inkscape:snap-bbox="false" - inkscape:window-width="1880" - inkscape:window-height="1061" - inkscape:window-x="38" + inkscape:window-width="1336" + inkscape:window-height="743" + inkscape:window-x="30" inkscape:window-y="0" inkscape:window-maximized="1" fit-margin-top="0" @@ -241,7 +241,7 @@ id="guide4600" /> + @@ -264,7 +268,7 @@ image/svg+xml - + @@ -274,3943 +278,2075 @@ inkscape:label="bg image" style="display:inline"> + width="480" /> + - - - 01:12-03:14 - - - - - - - - - - + + + + + + + + + + + + + + + + { @@ -93,10 +95,10 @@ class Header : SDLWidget, SDLWidgetDrawing /* Up button */ - up_button = new SDLMpc.Button(m, (int16) (this.x+(this.w-this.h+2)), + up_button = new SDLMpc.Button(m, (int16) (this.x+(this.w-this.h)), (int16) this.y, - (uint16)this.h-2, - (uint16)this.h-2, + (uint16)this.h, + (uint16)this.h, "U"); this.children.append(up_button); up_button.b_clicked.connect((source) => { diff --git a/SRC/Views/NowPlaying.vala b/SRC/Views/NowPlaying.vala index 7a9ee74..800b5c2 100644 --- a/SRC/Views/NowPlaying.vala +++ b/SRC/Views/NowPlaying.vala @@ -68,9 +68,9 @@ class NowPlaying : SDLWidget, SDLWidgetDrawing var frame = new PlayerControl (this.m, (int16) this.x, - (int16) (this.y+this.h-42), + (int16) (this.y+this.h-38), (uint16) this.w, - 42, + 38, bpp); this.children.append(frame); @@ -513,7 +513,6 @@ class PlayerControl : SDLWidget, SDLWidgetDrawing private VolumeBar volume_bar; - private bool pressed = false; private bool stopped = false; @@ -528,10 +527,13 @@ class PlayerControl : SDLWidget, SDLWidgetDrawing this.x = x; this.y = y; this.w = w; this.h = h; - +/* sf = new Surface.RGB(0, w,h,bpp,(uint32)0xFF000000, 0x00FF0000, 0x0000FF00, 0x000000FF); sf = sf.DisplayFormatAlpha(); - + */ + sf = SDLImage.load("Data/player_control.png"); + sf = sf.DisplayFormat(); +/* SDL.Rect rect = {0,0,(uint16)sf.w,(uint16)sf.h}; rect.h = (uint16)this.h; if(pressed) { @@ -539,9 +541,9 @@ class PlayerControl : SDLWidget, SDLWidgetDrawing }else{ sf.fill(rect, sf.format.map_rgba(30,30,30,128)); } - +*/ /* Previous button */ - prev_button = new SDLMpc.Button(m, (int16) this.x+ 1,(int16) this.y+1, 50, 40, "◂◂"); + prev_button = new SDLMpc.Button(m, (int16) this.x+ 0,(int16) this.y+0, 38, 38, "◂◂"); prev_button.b_clicked.connect((source) => { SDLMpc.Event ev = new SDLMpc.Event(); ev.type = SDLMpc.EventType.COMMANDS; @@ -551,7 +553,7 @@ class PlayerControl : SDLWidget, SDLWidgetDrawing /* Stop button */ - stop_button = new SDLMpc.Button(m, (int16) this.x+ 52,(int16) this.y+1, 50, 40, "■"); + stop_button = new SDLMpc.Button(m, (int16) this.x+ 38,(int16) this.y+0, 38, 38, "■"); stop_button.b_clicked.connect((source) => { SDLMpc.Event ev = new SDLMpc.Event(); ev.type = SDLMpc.EventType.COMMANDS; @@ -562,7 +564,7 @@ class PlayerControl : SDLWidget, SDLWidgetDrawing /* Play/pause button */ - pause_button = new SDLMpc.Button(m,(int16) this.x+ 103,(int16) this.y+1, 50, 40, "▶"); + pause_button = new SDLMpc.Button(m,(int16) this.x+ 76,(int16) this.y+0, 38, 38, "▶"); pause_button.b_clicked.connect((source) => { SDLMpc.Event ev = new SDLMpc.Event(); ev.type = SDLMpc.EventType.COMMANDS; @@ -573,7 +575,7 @@ class PlayerControl : SDLWidget, SDLWidgetDrawing } m.push_event((owned)ev); }); - next_button = new SDLMpc.Button(m, (int16) this.x+ 154,(int16) this.y+1, 50, 40, "▸▸"); + next_button = new SDLMpc.Button(m, (int16) this.x+ 114,(int16) this.y+0, 38, 38, "▸▸"); next_button.b_clicked.connect((source) => { SDLMpc.Event ev = new SDLMpc.Event(); ev.type = SDLMpc.EventType.COMMANDS; @@ -594,7 +596,7 @@ class PlayerControl : SDLWidget, SDLWidgetDrawing } }); - volume_bar = new VolumeBar(m, (int16) this.x+ 300,(int16) this.y+10,(uint16)(this.w-300), 20); + volume_bar = new VolumeBar(m, (int16) this.x+ 280,(int16) this.y+10,(uint16)(this.w-300), 20); this.children.append(prev_button); this.children.append(stop_button); @@ -620,34 +622,6 @@ class PlayerControl : SDLWidget, SDLWidgetDrawing sf.blit_surface(src_rect, screen, dest_rect); } - public override bool button_press() - { - if(!pressed) - { - SDL.Rect rect = {0,0,(uint16)this.w,(uint16)this.h}; - GLib.debug("PlayerControl bg press"); - pressed =true; - sf.fill(rect, sf.format.map_rgba(200,30,30,128)); - this.require_redraw = true;; - return true; - } - return false; - } - public override void button_release(bool inside) - { - if(pressed) { - SDL.Rect rect = {0,0,(uint16)this.w,(uint16)this.h}; - GLib.debug("PlayerControl bg release"); - sf.fill(rect, sf.format.map_rgba(30,30,30,128)); - pressed = false; - - if(inside) { - /* Button release */ - - } - this.require_redraw = true;; - } - } /** diff --git a/SRC/Widgets/SDLMpcButton.vala b/SRC/Widgets/SDLMpcButton.vala index 377b0aa..970a06d 100644 --- a/SRC/Widgets/SDLMpcButton.vala +++ b/SRC/Widgets/SDLMpcButton.vala @@ -32,6 +32,7 @@ namespace SDLMpc private Main m; public Label l; private Surface sf; + private Surface sf_pressed; private bool pressed = false; private bool highlight = false; @@ -57,8 +58,8 @@ namespace SDLMpc public void update() { - SDL.Rect rect = {0,0,(uint16)sf.w,(uint16)sf.h}; - + SDL.Rect rect = {0,0,(uint16)this.w,(uint16)this.h}; +/* if(highlight){ sf.fill(rect, sf.format.map_rgba(0,255,255,170)); }else{ @@ -70,10 +71,11 @@ namespace SDLMpc }else { sf.fill(rect, sf.format.map_rgba(0,0,0,170)); } - l.x = (int16)(this.x+ ((sf.w -l.width())*_x_align)+1); - l.y = (int16)(this.y+ (sf.h-l.height())/2); + l.x = (int16)(this.x+ ((this.w -l.width())*_x_align)+1); + l.y = (int16)(this.y+ (this.h-l.height())/2); l.w = (uint16)(this.w-(l.x-this.x))-1; l.h = (uint16)(this.h-(l.y-this.y))-1; + */ this.l.require_redraw = true;; } public void update_text(string? text) @@ -94,8 +96,12 @@ namespace SDLMpc this.h = height; - sf = new Surface.RGB(0, width,height,32,(uint32)0xFF000000, 0x00FF0000, 0x0000FF00, 0x000000FF); - sf = sf.DisplayFormatAlpha(); + //sf = new Surface.RGB(0, width,height,32,(uint32)0xFF000000, 0x00FF0000, 0x0000FF00, 0x000000FF); + + sf = SDLImage.load("Data/button.png"); + sf = sf.DisplayFormatAlpha(); + sf_pressed = SDLImage.load("Data/button_pressed.png"); + sf_pressed = sf_pressed.DisplayFormatAlpha(); if(height < 30) { l = new Label(m, FontSize.SMALL,(int16)this.x+2,(int16)this.y+2,(uint16)w-4,(uint16)h-4); }else{ @@ -124,7 +130,12 @@ namespace SDLMpc src_rect.h = (uint16).min((uint16)this.h, (uint16)(orect.y+orect.h-this.y)); GLib.debug("rect: %i %i %u %u", src_rect.x, src_rect.y, src_rect.w, src_rect.h); // {(int16)this.x,(int16) this.y,(uint16)this.w,(uint16) this.h}; - sf.blit_surface(src_rect, screen, dest_rect); + if(pressed) + { + sf_pressed.blit_surface(src_rect, screen, dest_rect); + }else{ + sf.blit_surface(src_rect, screen, dest_rect); + } } public override bool button_press() @@ -142,7 +153,7 @@ namespace SDLMpc { if(pressed) { SDL.Rect rect = {0,0,(uint16)this.w,(uint16)this.h}; - sf.fill(rect, sf.format.map_rgba(30,30,30,128)); + //sf.fill(rect, sf.format.map_rgba(30,30,30,128)); pressed = false; if(inside) { diff --git a/Wallpapers/1.png b/Wallpapers/1.png index defd833..64acdb8 100644 Binary files a/Wallpapers/1.png and b/Wallpapers/1.png differ diff --git a/Wallpapers/2.jpg b/Wallpapers/2.jpg deleted file mode 100644 index 0d80592..0000000 Binary files a/Wallpapers/2.jpg and /dev/null differ diff --git a/Wallpapers/2.png b/Wallpapers/2.png new file mode 100644 index 0000000..feba4a5 Binary files /dev/null and b/Wallpapers/2.png differ diff --git a/Wallpapers/3.jpg b/Wallpapers/3.jpg deleted file mode 100644 index a2a7b67..0000000 Binary files a/Wallpapers/3.jpg and /dev/null differ diff --git a/Wallpapers/3.png b/Wallpapers/3.png new file mode 100644 index 0000000..93e7c09 Binary files /dev/null and b/Wallpapers/3.png differ diff --git a/Wallpapers/4.jpg b/Wallpapers/4.jpg deleted file mode 100644 index 947eff8..0000000 Binary files a/Wallpapers/4.jpg and /dev/null differ diff --git a/Wallpapers/5.png b/Wallpapers/5.png index 4a46ef3..fe0400b 100644 Binary files a/Wallpapers/5.png and b/Wallpapers/5.png differ diff --git a/Wallpapers/ART b/Wallpapers/ART new file mode 100644 index 0000000..b70822e --- /dev/null +++ b/Wallpapers/ART @@ -0,0 +1,5 @@ +1 - Fantasy - Art by MrWonderful under the Creative Commons by-nc-nd +2 - Abyss - Art by MrWonderful under the Creative Commons by-nc-nd +3 - Dash - Art by MrWonderful under the Creative Commons by-nc-nd +5 - Escape - Art by MrWonderful under the Creative Commons by-nc-nd +