From 51657e10769faa2617d546a06c42e4c62a19bb50 Mon Sep 17 00:00:00 2001 From: Aki Date: Sun, 30 Jan 2022 17:41:24 +0100 Subject: Removed trailing whitespace all over the place --- Stars45/Button.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'Stars45/Button.cpp') diff --git a/Stars45/Button.cpp b/Stars45/Button.cpp index 292e29a..c4a8de1 100644 --- a/Stars45/Button.cpp +++ b/Stars45/Button.cpp @@ -262,7 +262,7 @@ Button::Draw() DrawText(text.data(), 0, label_rect, DT_CALCRECT | align); vert_space = (vert_space - label_rect.h)/2; - + label_rect.w = horz_space; if (vert_space > 0) @@ -276,14 +276,14 @@ Button::Draw() if (drop_shadow) { label_rect.x++; label_rect.y++; - + font->SetColor(back_color); DrawText(text.data(), text.length(), label_rect, align); - + label_rect.x--; label_rect.y--; } - + font->SetColor(fore_color); DrawText(text.data(), text.length(), label_rect, align); } @@ -351,13 +351,13 @@ Button::CalcPictureRect() int h = rect.h; int img_w = picture.Width(); int img_h = picture.Height(); - + if (img_h > h) img_h = h-2; if (img_w > w) img_w = w-2; - + int img_x_offset = bevel_width; int img_y_offset = bevel_width; - + switch (picture_loc) { default: @@ -391,7 +391,7 @@ Button::CalcPictureRect() img_y_offset = h - img_h - bevel_width; break; } - + Rect img_rect; img_rect.x = img_x_offset; img_rect.y = img_y_offset; @@ -557,11 +557,11 @@ int Button::OnClick() } int Button::OnMouseEnter(int mx, int my) -{ +{ if (button_state >= 0) pre_state = button_state; - if (button_state == 0) + if (button_state == 0) button_state = -1; if (IsEnabled() && IsShown()) @@ -571,7 +571,7 @@ int Button::OnMouseEnter(int mx, int my) } int Button::OnMouseExit(int mx, int my) -{ +{ if (button_state == -1) button_state = pre_state; -- cgit v1.1