Skip to content

Commit

Permalink
[ui] Try a tighter ui style
Browse files Browse the repository at this point in the history
  • Loading branch information
jcelerier committed Nov 1, 2024
1 parent 33f4752 commit 1a0a7b5
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 5 deletions.
4 changes: 3 additions & 1 deletion src/lib/score/graphics/GraphicsLayout.cpp
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
#include "GraphicsLayout.hpp"

#include <score/graphics/layouts/Constants.hpp>
#include <score/model/Skin.hpp>
#include <score/widgets/Pixmap.hpp>

#include <QPainter>

namespace score
{

GraphicsLayout::GraphicsLayout(QGraphicsItem* parent)
: score::BackgroundItem{parent}
, m_bg{nullptr}
, m_margin{default_margin}
, m_padding{default_padding}
{
}

Expand Down
6 changes: 2 additions & 4 deletions src/lib/score/graphics/GraphicsLayout.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
namespace score
{
struct BrushSet;
static constexpr const qreal default_margin = 5.;
static constexpr const qreal default_padding = 5.;
class SCORE_LIB_BASE_EXPORT GraphicsLayout : public score::BackgroundItem
{
public:
Expand All @@ -29,8 +27,8 @@ class SCORE_LIB_BASE_EXPORT GraphicsLayout : public score::BackgroundItem
score::BrushSet* m_bg{};
QPixmap* m_pix{};

qreal m_margin{default_margin};
qreal m_padding{default_padding};
qreal m_margin{};
qreal m_padding{};
};

}
1 change: 1 addition & 0 deletions src/lib/score/graphics/RectItem.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include <score/graphics/GraphicsLayout.hpp>
#include <score/graphics/RectItem.hpp>
#include <score/graphics/layouts/Constants.hpp>
#include <score/model/Skin.hpp>

#include <QGraphicsSceneMouseEvent>
Expand Down
9 changes: 9 additions & 0 deletions src/lib/score/graphics/layouts/Constants.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#pragma once
#include <QtTypes>

namespace score
{
static constexpr const qreal default_margin = 0.;
static constexpr const qreal default_padding = 0.;

}
2 changes: 2 additions & 0 deletions src/lib/score/graphics/layouts/GraphicsGridLayout.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#include "GraphicsGridLayout.hpp"

#include <score/graphics/layouts/Constants.hpp>

#include <QPainter>
#include <QPen>

Expand Down

0 comments on commit 1a0a7b5

Please sign in to comment.