GLife: more style fixes

Change-Id: I16eecf18736058329c5a073d9b569f2a4d5941d8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7664
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
This commit is contained in:
PulkoMandy 2024-05-03 10:09:39 +02:00 committed by waddlesplash
parent bee419ebd8
commit c9810ca22a
1 changed files with 15 additions and 20 deletions

View File

@ -13,11 +13,12 @@
#include <Catalog.h>
#include <GroupLayoutBuilder.h>
#include <Slider.h>
#include <stdio.h>
#include <String.h>
#include <StringView.h>
#include <View.h>
#include <stdio.h>
#include "GLifeState.h"
#undef B_TRANSLATION_CONTEXT
@ -37,8 +38,8 @@ GLifeConfig::GLifeConfig(BRect frame, GLifeState* pglsState)
// Info text
BStringView* name = new BStringView(frame, B_EMPTY_STRING,
B_TRANSLATE("OpenGL \"Game of Life\""), B_FOLLOW_LEFT);
BStringView* author = new BStringView(frame, B_EMPTY_STRING,
B_TRANSLATE("by Aaron Hill"), B_FOLLOW_LEFT);
BStringView* author = new BStringView(frame, B_EMPTY_STRING, B_TRANSLATE("by Aaron Hill"),
B_FOLLOW_LEFT);
// Sliders
fGridDelay = new BSlider(frame, "GridDelay",
@ -47,38 +48,32 @@ GLifeConfig::GLifeConfig(BRect frame, GLifeState* pglsState)
0, 4, B_BLOCK_THUMB);
fGridDelay->SetHashMarks(B_HASH_MARKS_BOTTOM);
fGridDelay->SetLimitLabels(B_TRANSLATE("None"), B_TRANSLATE_COMMENT("4x",
"This is a factor: the x represents 'times'"));
fGridDelay->SetLimitLabels(B_TRANSLATE("None"),
B_TRANSLATE_COMMENT("4x", "This is a factor: the x represents 'times'"));
fGridDelay->SetValue(pglsState->GridDelay());
fGridDelay->SetHashMarkCount(5);
fGridBorder = new BSlider(frame, "GridBorder",
B_TRANSLATE("Grid border: "),
new BMessage(kGridBorder),
0, 10, B_BLOCK_THUMB);
fGridBorder = new BSlider(frame, "GridBorder", B_TRANSLATE("Grid border: "),
new BMessage(kGridBorder), 0, 10, B_BLOCK_THUMB);
fGridBorder->SetHashMarks(B_HASH_MARKS_BOTTOM);
fGridBorder->SetLimitLabels("0", "10");
fGridBorder->SetValue(pglsState->GridBorder());
fGridBorder->SetHashMarkCount(11);
fGridWidth = new BSlider(frame, "GridWidth",
B_TRANSLATE("Grid width: "),
new BMessage(kGridWidth),
10, 100, B_BLOCK_THUMB);
fGridWidth = new BSlider(frame, "GridWidth", B_TRANSLATE("Grid width: "),
new BMessage(kGridWidth), 10, 100, B_BLOCK_THUMB);
fGridWidth->SetHashMarks(B_HASH_MARKS_BOTTOM);
//fGridWidth->SetLimitLabels("10", "100");
// fGridWidth->SetLimitLabels("10", "100");
fGridWidth->SetValue(pglsState->GridWidth());
fGridWidth->SetHashMarkCount(10);
fGridHeight = new BSlider(frame, "GridHeight",
B_TRANSLATE("Grid height: "),
new BMessage(kGridHeight),
10, 100, B_BLOCK_THUMB);
fGridHeight = new BSlider(frame, "GridHeight", B_TRANSLATE("Grid height: "),
new BMessage(kGridHeight), 10, 100, B_BLOCK_THUMB);
fGridHeight->SetHashMarks(B_HASH_MARKS_BOTTOM);
//fGridHeight->SetLimitLabels("10", "100");
// fGridHeight->SetLimitLabels("10", "100");
fGridHeight->SetValue(pglsState->GridHeight());
fGridHeight->SetHashMarkCount(10);
@ -152,7 +147,7 @@ GLifeConfig::_UpdateLabels()
void
GLifeConfig::MessageReceived(BMessage* pbmMessage)
{
switch(pbmMessage->what) {
switch (pbmMessage->what) {
case kGridWidth:
m_pglsState->GridWidth() = fGridWidth->Value();
break;