Start tweaking alignments to make look a little better and take up proper spacing.

This commit is contained in:
Kevin Whitaker
2017-02-17 19:47:30 -05:00
parent 167b2f9084
commit 0fa26d83f6
4 changed files with 22 additions and 9 deletions

View File

@@ -22,6 +22,8 @@
#include "../GroovePlayer.h"
#include <grooveplayer/player.h>
#include <Wt/WLength>
#include <Wt/WColor>
#include <Wt/WBorder>
PlayerInterface::PlayerInterface(WebInterface* app)
{
@@ -30,8 +32,11 @@ PlayerInterface::PlayerInterface(WebInterface* app)
this->setLayout(interfaceLayout);
playControlLayout = new Wt::WHBoxLayout();
voteControlLayout = new Wt::WVBoxLayout();
playControlWidget = new Wt::WContainerWidget();
playControlWidget->setLayout(playControlLayout);
currentTrackProgress = new Wt::WProgressBar();
currentTrackProgress->decorationStyle().setBackgroundColor(Wt::WColor("#B20A5E"));
currentTrackProgress->setFormat("");
trackProgress = new Wt::WTimer();
trackProgress->setInterval(1000);
@@ -43,10 +48,12 @@ PlayerInterface::PlayerInterface(WebInterface* app)
isPaused = groove_playlist_playing(GroovePlayerMgr::getInstance()->currentPlaylist)==0;
playpause->clicked().connect(this, &PlayerInterface::playpauseClicked);
interfaceLayout->addLayout(playControlLayout);
interfaceLayout->addWidget(playControlWidget);
interfaceLayout->addWidget(currentTrackProgress);
interfaceLayout->addLayout(voteControlLayout);
playControlLayout->addWidget(playpause,0,Wt::AlignmentFlag::AlignCenter | Wt::AlignmentFlag::AlignMiddle);
playControlWidget->decorationStyle().setBorder(Wt::WBorder::Outset);
playControlWidget->decorationStyle().setBackgroundColor(Wt::WColor("#00B200"));
playControlLayout->addWidget(playpause,0,Wt::AlignmentFlag::AlignLeft | Wt::AlignmentFlag::AlignMiddle);
playControlLayout->addWidget(currentTrackDetails);
}