diff --git a/src/gui/options/OptionsView.cpp b/src/gui/options/OptionsView.cpp index 360e63143..eee9f3675 100644 --- a/src/gui/options/OptionsView.cpp +++ b/src/gui/options/OptionsView.cpp @@ -76,13 +76,13 @@ OptionsView::OptionsView() : ui::Window(ui::Point(-1, -1), ui::Point(320, 340)) auto *checkbox = new ui::Checkbox(ui::Point(8 + indent * 15, currentY), ui::Point(1, 16), text, ""); autoWidth(checkbox, 0); checkbox->SetActionCallback({ action }); - scrollPanel->AddChild(checkbox); currentY += 14; if (info.size()) { addLabel(indent, info); } currentY += 4; + scrollPanel->AddChild(checkbox); return checkbox; }; auto addDropDown = [this, ¤tY, &autoWidth](String info, std::vector> options, std::function action) { @@ -141,7 +141,7 @@ OptionsView::OptionsView() : ui::Window(ui::Point(-1, -1), ui::Point(320, 340)) scrollPanel->AddChild(ambientAirTemp); ambientAirTempPreview = new ui::Button(ui::Point(Size.X-31, currentY), ui::Point(16, 16), "", "Preview"); scrollPanel->AddChild(ambientAirTempPreview); - auto *label = new ui::Label(ui::Point(8, currentY), ui::Point(Size.X-96, 16), "Ambient air temperature"); + auto *label = new ui::Label(ui::Point(8, currentY), ui::Point(Size.X-105, 16), "Ambient air temperature"); label->Appearance.HorizontalAlign = ui::Appearance::AlignLeft; label->Appearance.VerticalAlign = ui::Appearance::AlignMiddle; scrollPanel->AddChild(label); diff --git a/src/gui/preview/PreviewView.cpp b/src/gui/preview/PreviewView.cpp index cc29b428f..9a0254ef4 100644 --- a/src/gui/preview/PreviewView.cpp +++ b/src/gui/preview/PreviewView.cpp @@ -129,9 +129,9 @@ PreviewView::PreviewView(std::unique_ptr newSavePreview): AddComponent(saveDescriptionLabel); if(showAvatars) - authorDateLabel = new ui::Label(ui::Point(39, (YRES/2)+4+15), ui::Point(180, 16), ""); + authorDateLabel = new ui::Label(ui::Point(39, (YRES/2)+4+15), ui::Point(200, 16), ""); else - authorDateLabel = new ui::Label(ui::Point(5, (YRES/2)+4+15), ui::Point(200, 16), ""); + authorDateLabel = new ui::Label(ui::Point(5, (YRES/2)+4+15), ui::Point(220, 16), ""); authorDateLabel->Appearance.HorizontalAlign = ui::Appearance::AlignLeft; authorDateLabel->Appearance.VerticalAlign = ui::Appearance::AlignMiddle; AddComponent(authorDateLabel); @@ -148,7 +148,7 @@ PreviewView::PreviewView(std::unique_ptr newSavePreview): AddComponent(avatarButton); } - viewsLabel = new ui::Label(ui::Point((XRES/2)-80, (YRES/2)+4+15), ui::Point(80, 16), ""); + viewsLabel = new ui::Label(ui::Point((XRES/2)-88, (YRES/2)+4+15), ui::Point(88, 16), ""); viewsLabel->Appearance.HorizontalAlign = ui::Appearance::AlignRight; viewsLabel->Appearance.VerticalAlign = ui::Appearance::AlignMiddle; AddComponent(viewsLabel); diff --git a/src/gui/profile/ProfileActivity.cpp b/src/gui/profile/ProfileActivity.cpp index c8545ca1d..ca4b71cbe 100644 --- a/src/gui/profile/ProfileActivity.cpp +++ b/src/gui/profile/ProfileActivity.cpp @@ -70,7 +70,7 @@ void ProfileActivity::setUserInfo(UserInfo newInfo) int currentY = 5; // username label - ui::Label * title = new ui::Label(ui::Point(4, currentY), ui::Point(Size.X-8-(40+8+75), 15), info.username.FromUtf8()); + ui::Label * title = new ui::Label(ui::Point(4, currentY), ui::Point(Size.X-8-(40+16+75), 15), info.username.FromUtf8()); title->Appearance.HorizontalAlign = ui::Appearance::AlignLeft; scrollPanel->AddChild(title); @@ -90,13 +90,13 @@ void ProfileActivity::setUserInfo(UserInfo newInfo) currentY += 23; // age - ui::Label * ageTitle = new ui::Label(ui::Point(4, currentY), ui::Point(18, 15), "Age:"); + ui::Label * ageTitle = new ui::Label(ui::Point(4, currentY), ui::Point(23, 15), "Age:"); ageTitle->Appearance.HorizontalAlign = ui::Appearance::AlignLeft; ageTitle->SetTextColour(ui::Colour(180, 180, 180)); scrollPanel->AddChild(ageTitle); // can't figure out how to tell a null from a 0 in the json library we use - ui::Label *age = new ui::Label(ui::Point(8+ageTitle->Size.X, currentY), ui::Point(40, 15), info.age ? String::Build(info.age) : "\bgNot Provided"); + ui::Label *age = new ui::Label(ui::Point(5+ageTitle->Size.X, currentY), ui::Point(Size.X-ageTitle->Size.X-56, 15), info.age ? String::Build(info.age) : "\bgNot Provided"); age->Appearance.HorizontalAlign = ui::Appearance::AlignLeft; scrollPanel->AddChild(age); currentY += 2+age->Size.Y; @@ -109,24 +109,24 @@ void ProfileActivity::setUserInfo(UserInfo newInfo) if (editable) { - location = new ui::Textbox(ui::Point(8+locationTitle->Size.X, currentY), ui::Point(Size.X-locationTitle->Size.X-16, 17), info.location); + location = new ui::Textbox(ui::Point(5+locationTitle->Size.X, currentY), ui::Point(Size.X-locationTitle->Size.X-16, 17), info.location); ((ui::Textbox*)location)->SetLimit(40); } else { - location = new ui::Label(ui::Point(4+locationTitle->Size.X, currentY), ui::Point(Size.X-locationTitle->Size.X-14, 17), info.location); + location = new ui::Label(ui::Point(5+locationTitle->Size.X, currentY), ui::Point(Size.X-locationTitle->Size.X-14, 17), info.location); } location->Appearance.HorizontalAlign = ui::Appearance::AlignLeft; scrollPanel->AddChild(location); currentY += 2+location->Size.Y; // website - ui::Label * websiteTitle = new ui::Label(ui::Point(4, currentY), ui::Point(38, 15), "Website:"); + ui::Label * websiteTitle = new ui::Label(ui::Point(1, currentY), ui::Point(42, 15), "Website:"); websiteTitle->Appearance.HorizontalAlign = ui::Appearance::AlignLeft; websiteTitle->SetTextColour(ui::Colour(180, 180, 180)); scrollPanel->AddChild(websiteTitle); - ui::Label *website = new ui::Label(ui::Point(8+websiteTitle->Size.X, currentY), ui::Point(Size.X-websiteTitle->Size.X-16, 15), info.website.FromUtf8()); + ui::Label *website = new ui::Label(ui::Point(2+websiteTitle->Size.X, currentY), ui::Point(Size.X-websiteTitle->Size.X-16, 15), info.website.FromUtf8()); website->Appearance.HorizontalAlign = ui::Appearance::AlignLeft; scrollPanel->AddChild(website); currentY += 2+website->Size.Y; @@ -139,34 +139,34 @@ void ProfileActivity::setUserInfo(UserInfo newInfo) currentY += savesTitle->Size.Y; // saves count - ui::Label * saveCountTitle = new ui::Label(ui::Point(12, currentY), ui::Point(30, 15), "Count:"); + ui::Label * saveCountTitle = new ui::Label(ui::Point(12, currentY), ui::Point(32, 15), "Count:"); saveCountTitle->Appearance.HorizontalAlign = ui::Appearance::AlignLeft; saveCountTitle->SetTextColour(ui::Colour(180, 180, 180)); scrollPanel->AddChild(saveCountTitle); - ui::Label *savesCount = new ui::Label(ui::Point(12+saveCountTitle->Size.X, currentY), ui::Point(Size.X-saveCountTitle->Size.X-16, 15), String::Build(info.saveCount)); + ui::Label *savesCount = new ui::Label(ui::Point(13+saveCountTitle->Size.X, currentY), ui::Point(Size.X-saveCountTitle->Size.X-24, 15), String::Build(info.saveCount)); savesCount->Appearance.HorizontalAlign = ui::Appearance::AlignLeft; scrollPanel->AddChild(savesCount); currentY += savesCount->Size.Y; // average score - ui::Label * averageScoreTitle = new ui::Label(ui::Point(12, currentY), ui::Point(70, 15), "Average Score:"); + ui::Label * averageScoreTitle = new ui::Label(ui::Point(12, currentY), ui::Point(72, 15), "Average Score:"); averageScoreTitle->Appearance.HorizontalAlign = ui::Appearance::AlignLeft; averageScoreTitle->SetTextColour(ui::Colour(180, 180, 180)); scrollPanel->AddChild(averageScoreTitle); - ui::Label *averageScore = new ui::Label(ui::Point(12+averageScoreTitle->Size.X, currentY), ui::Point(Size.X-averageScoreTitle->Size.X-16, 15), String::Build(info.averageScore)); + ui::Label *averageScore = new ui::Label(ui::Point(13+averageScoreTitle->Size.X, currentY), ui::Point(Size.X-averageScoreTitle->Size.X-24, 15), String::Build(info.averageScore)); averageScore->Appearance.HorizontalAlign = ui::Appearance::AlignLeft; scrollPanel->AddChild(averageScore); currentY += averageScore->Size.Y; // highest score - ui::Label * highestScoreTitle = new ui::Label(ui::Point(12, currentY), ui::Point(69, 15), "Highest Score:"); + ui::Label * highestScoreTitle = new ui::Label(ui::Point(12, currentY), ui::Point(71, 15), "Highest Score:"); highestScoreTitle->Appearance.HorizontalAlign = ui::Appearance::AlignLeft; highestScoreTitle->SetTextColour(ui::Colour(180, 180, 180)); scrollPanel->AddChild(highestScoreTitle); - ui::Label *highestScore = new ui::Label(ui::Point(12+highestScoreTitle->Size.X, currentY), ui::Point(Size.X-highestScoreTitle->Size.X-16, 15), String::Build(info.highestScore)); + ui::Label *highestScore = new ui::Label(ui::Point(13+highestScoreTitle->Size.X, currentY), ui::Point(Size.X-highestScoreTitle->Size.X-24, 15), String::Build(info.highestScore)); highestScore->Appearance.HorizontalAlign = ui::Appearance::AlignLeft; scrollPanel->AddChild(highestScore); currentY += 2+highestScore->Size.Y;