Skip to content

Commit

Permalink
Text alignment vertical set to center for a better look.
Browse files Browse the repository at this point in the history
  • Loading branch information
BlueAndi committed Jul 13, 2024
1 parent 40833a1 commit 71b1292
Show file tree
Hide file tree
Showing 4 changed files with 71 additions and 2 deletions.
15 changes: 14 additions & 1 deletion lib/Views/src/layouts/IconTextLampView32x8.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,18 @@
*****************************************************************************/

/**
* Generic view for 32x8 LED matrix with icon and text.
* View for 32x8 LED matrix with icon and text.
*
* +-----------------------------------------------------------------+
* | | |
* | | |
* | | |
* | Icon | Text |
* | 8x8 | 24x8 |
* | | |
* | +------------------------------------------------+
* | | Lamps 24x1 |
* +----------------+------------------------------------------------+
*/
class IconTextLampView32x8 : public IIconTextLampView
{
Expand All @@ -78,6 +89,8 @@ class IconTextLampView32x8 : public IIconTextLampView
{LAMP_WIDTH, LAMP_HEIGHT, LAMP_2_X , LAMP_Y},
{LAMP_WIDTH, LAMP_HEIGHT, LAMP_3_X , LAMP_Y}}
{
m_bitmapWidget.setVerticalAlignment(Alignment::Vertical::VERTICAL_CENTER);
m_bitmapWidget.setHorizontalAlignment(Alignment::Horizontal::HORIZONTAL_CENTER);
}

/**
Expand Down
23 changes: 22 additions & 1 deletion lib/Views/src/layouts/IconTextLampView64x64.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,28 @@
*****************************************************************************/

/**
* Generic view for 64x64 LED matrix with icon and text.
* View for 64x64 LED matrix with icon and text.
*
* +-----------------------------------------------------------------+
* | |
* | |
* | |
* | Icon |
* | 64x32 |
* | |
* | |
* | |
* +-----------------------------------------------------------------+
* | Lamps |
* | 62x2 |
* +-----------------------------------------------------------------+
* | |
* | Text |
* | 64x30 |
* | |
* | |
* | |
* +-----------------------------------------------------------------+
*/
class IconTextLampView64x64 : public IIconTextLampView
{
Expand Down
15 changes: 15 additions & 0 deletions lib/Views/src/layouts/IconTextView32x8.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,17 @@

/**
* View for 32x8 LED matrix with icon and text.
*
* +-----------------------------------------------------------------+
* | | |
* | | |
* | | |
* | Icon | Text |
* | 8x8 | 24x8 |
* | | |
* | | |
* | | |
* +-----------------------------------------------------------------+
*/
class IconTextView32x8 : public IIconTextView
{
Expand All @@ -73,6 +84,10 @@ class IconTextView32x8 : public IIconTextView
m_bitmapWidget(BITMAP_WIDTH, BITMAP_HEIGHT, BITMAP_X, BITMAP_Y),
m_textWidget(TEXT_WIDTH, TEXT_HEIGHT, TEXT_X, TEXT_Y)
{
m_bitmapWidget.setVerticalAlignment(Alignment::Vertical::VERTICAL_CENTER);
m_bitmapWidget.setHorizontalAlignment(Alignment::Horizontal::HORIZONTAL_CENTER);

m_textWidget.setVerticalAlignment(Alignment::Vertical::VERTICAL_CENTER);
}

/**
Expand Down
20 changes: 20 additions & 0 deletions lib/Views/src/layouts/IconTextView64x64.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,26 @@

/**
* View for 64x64 LED matrix with a icon and text.
*
* +-----------------------------------------------------------------+
* | |
* | |
* | |
* | Icon |
* | 64x32 |
* | |
* | |
* | |
* +-----------------------------------------------------------------+
* | |
* | |
* | |
* | Text |
* | 64x32 |
* | |
* | |
* | |
* +-----------------------------------------------------------------+
*/
class IconTextView64x64 : public IIconTextView
{
Expand Down

0 comments on commit 71b1292

Please sign in to comment.