Skip to content

Commit

Permalink
Add margin and padding to TimeDisplayWidget
Browse files Browse the repository at this point in the history
  • Loading branch information
winniehell committed Aug 10, 2019
1 parent 04d6806 commit 0515096
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions include/TimeDisplayWidget.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@
#ifndef _TIME_DISPLAY_WIDGET
#define _TIME_DISPLAY_WIDGET

#include <QWidget>
#include <QFrame>
#include <QGridLayout>
#include <QLabel>

#include "LcdWidget.h"


class TimeDisplayWidget : public QWidget
class TimeDisplayWidget : public QFrame
{
Q_OBJECT
public:
Expand Down
8 changes: 4 additions & 4 deletions src/gui/widgets/TimeDisplayWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@


TimeDisplayWidget::TimeDisplayWidget() :
QWidget(),
QFrame(),
m_displayMode( MinutesSeconds ),
m_spinBoxesLayout( this ),
m_majorLabel( this ),
Expand All @@ -53,10 +53,10 @@ TimeDisplayWidget::TimeDisplayWidget() :
m_spinBoxesLayout.addWidget( &m_milliSecondsLabel, 0, 2 );
m_spinBoxesLayout.addWidget( &m_milliSecondsValue, 1, 2 );

this->setStyleSheet( "background-color: rgba(0,0,0,70);" );
this->setStyleSheet( "TimeDisplayWidget { border-radius: 4px; background-color: rgba(0,0,0,70); margin: 8px; padding: 4px; }" );

QString labelStyle = "font-size: 12px;";
QString valueStyle = "color: #0bd556; font-size: 32px;";
QString labelStyle = "font-size: 10px;";
QString valueStyle = "color: #0bd556; font-size: 24px;";

m_majorLabel.setAlignment(Qt::AlignRight);
m_majorLabel.setStyleSheet(labelStyle);
Expand Down

0 comments on commit 0515096

Please sign in to comment.