Skip to content
This repository has been archived by the owner on Jun 14, 2020. It is now read-only.

Commit

Permalink
* - fix Obese/Overweight mixup
Browse files Browse the repository at this point in the history
  • Loading branch information
Lains committed Nov 16, 2018
1 parent 286e501 commit f5e1b8c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
4 changes: 2 additions & 2 deletions data/stylesheet.css
Expand Up @@ -45,12 +45,12 @@
}

.overweight-label {
color: @STRAWBERRY_700;
color: @BANANA_700;
font-weight: 300;
}

.obese-label {
color: @BANANA_700;
color: @STRAWBERRY_700;
font-weight: 300;
}

Expand Down
13 changes: 6 additions & 7 deletions src/MainWindow.vala
Expand Up @@ -127,15 +127,15 @@ namespace Beemy {
number_context.remove_class ("obese-label");
number_context.remove_class ("overweight-label");
} else if (24.1 <= res <= 30.0) {
number_context.add_class ("obese-label");
number_context.add_class ("overweight-label");
number_context.remove_class ("underweight-label");
number_context.remove_class ("healthy-label");
number_context.remove_class ("overweight-label");
number_context.remove_class ("obese-label");
} else if (res > 30.1) {
number_context.add_class ("overweight-label");
number_context.add_class ("obese-label");
number_context.remove_class ("healthy-label");
number_context.remove_class ("underweight-label");
number_context.remove_class ("obese-label");
number_context.remove_class ("overweight-label");
}

label_result_grade.set_markup ("\nYour Body Mass Index is:\n");
Expand All @@ -149,9 +149,9 @@ namespace Beemy {
} else if (18.8 <= res <= 24.0) {
grade_type = "Healthy";
} else if (24.1 <= res <= 30.0) {
grade_type = "Obese";
} else if (res > 30.1) {
grade_type = "Overweight";
} else if (res > 30.1) {
grade_type = "Obese";
}

label_result_info.set_markup ("""You are considered <span font="16">%s</span>
Expand Down Expand Up @@ -283,7 +283,6 @@ in the official Body Mass Index chart.""".printf(grade_type));
base_weight_cb.set_active(settings.weight_type);
base_height_cb.set_active(settings.height_type);

// TODO check if working (moved from bottom of constructor, after decorate)
int x = settings.window_x;
int y = settings.window_y;
int weight_type = base_weight_cb.get_active();
Expand Down

0 comments on commit f5e1b8c

Please sign in to comment.