Skip to content

Commit

Permalink
bottom_bar : fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
brunotl committed Oct 9, 2024
1 parent 0a40d57 commit 3f38602
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
4 changes: 2 additions & 2 deletions Common/Source/Draw/BottomBar/BottomBar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ void bottom_bar::draw(LKSurface& Surface, const PixelRect& rect) {
// screen has changed => refresh layout
refresh_layout(Surface, rect);
}
fill_backgroud(Surface);
fill_background(Surface);
draw_data(Surface);
}

Expand Down Expand Up @@ -97,7 +97,7 @@ void bottom_bar::refresh_layout(LKSurface& Surface, const PixelRect& rect) {
_screen_rect = rect;
}

void bottom_bar::fill_backgroud(LKSurface& Surface) {
void bottom_bar::fill_background(LKSurface& Surface) {
const auto& brush_bar = INVERTCOLORS ? LKBrush_Black : LKBrush_Nlight;

if (LKSurface::AlphaBlendSupported() && MapSpaceMode == MSM_MAP && BarOpacity < 100) {
Expand Down
12 changes: 7 additions & 5 deletions Common/Source/Draw/BottomBar/BottomBar.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ class bottom_bar final {
void draw(LKSurface& Surface, const PixelRect& rc);

private:
unsigned get_current_mode();
static unsigned get_current_mode();

void refresh_layout(LKSurface& Surface, const PixelRect& rc);
void fill_backgroud(LKSurface& Surface);
void fill_background(LKSurface& Surface);
void draw_data(LKSurface& Surface);

void draw_fly_mode_data(LKSurface& Surface, MapWindow::Mode::TModeFly mode) const;
Expand All @@ -55,7 +55,9 @@ class bottom_bar final {

void draw_box(LKSurface& Surface, unsigned box_num, TCHAR* Value, TCHAR* Unit, TCHAR* Title, DrawBmp_t& Bmp) const;

unsigned get_box_count() const { return _row_count * _col_count; }
unsigned get_box_count() const {
return _row_count * _col_count;
}

private:
PixelRect _screen_rect = {};
Expand All @@ -65,8 +67,8 @@ class bottom_bar final {
PixelSize _value_size = {};
PixelSize _box_size = {};

unsigned _row_count; // 1 => landscape; 2 => portrait
unsigned _col_count; // <= 10
unsigned _row_count = {}; // 1 => landscape; 2 => portrait
unsigned _col_count = {}; // <= 10

LKColor _text_color = {}; // set by `fill_background()`

Expand Down

0 comments on commit 3f38602

Please sign in to comment.