From d4400b358a1c1db2b26146e1c7ff66c77e75426c Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Mon, 1 Jan 2018 22:06:20 -0800 Subject: [PATCH] UI: Actually offset text shadow. It wasn't actually visible before, since it was strictly underneath text that was usually white. --- UI/ReportScreen.cpp | 7 ++++--- ext/native/ui/view.cpp | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/UI/ReportScreen.cpp b/UI/ReportScreen.cpp index ce2556e5f7..549a86f604 100644 --- a/UI/ReportScreen.cpp +++ b/UI/ReportScreen.cpp @@ -62,11 +62,11 @@ private: RatingChoice::RatingChoice(const char *captionKey, int *value, LayoutParams *layoutParams) : LinearLayout(ORIENT_VERTICAL, layoutParams), value_(value) { - SetSpacing(-8.0f); + SetSpacing(0.0f); I18NCategory *rp = GetI18NCategory("Reporting"); group_ = new LinearLayout(ORIENT_HORIZONTAL); - Add(new InfoItem(rp->T(captionKey), "")); + Add(new TextView(rp->T(captionKey)))->SetShadow(true); Add(group_); group_->SetSpacing(0.0f); @@ -223,7 +223,7 @@ void ReportScreen::CreateViews() { ViewGroup *rightColumn = new ScrollView(ORIENT_VERTICAL, new LinearLayoutParams(300, FILL_PARENT, actionMenuMargins)); LinearLayout *rightColumnItems = new LinearLayout(ORIENT_VERTICAL); - leftColumnItems->Add(new TextView(rp->T("FeedbackDesc", "How's the emulation? Let us and the community know!"), new LinearLayoutParams(Margins(12, 5, 0, 5)))); + leftColumnItems->Add(new TextView(rp->T("FeedbackDesc", "How's the emulation? Let us and the community know!"), new LinearLayoutParams(Margins(12, 5, 0, 5))))->SetShadow(true); if (!Reporting::IsEnabled()) { reportingNotice_ = leftColumnItems->Add(new TextView(rp->T("FeedbackDisabled", "Compatibility server reports must be enabled."), new LinearLayoutParams(Margins(12, 5, 0, 5)))); reportingNotice_->SetShadow(true); @@ -258,6 +258,7 @@ void ReportScreen::CreateViews() { leftColumnItems->Add(new CompatRatingChoice("Overall", (int *)&overall_))->SetEnabledPtr(&enableReporting_)->OnChoice.Handle(this, &ReportScreen::HandleChoice); overallDescription_ = leftColumnItems->Add(new TextView("", new LinearLayoutParams(Margins(10, 0)))); + overallDescription_->SetShadow(true); leftColumnItems->Add(new RatingChoice("Graphics", &graphics_))->SetEnabledPtr(&ratingEnabled_)->OnChoice.Handle(this, &ReportScreen::HandleChoice); leftColumnItems->Add(new RatingChoice("Speed", &speed_))->SetEnabledPtr(&ratingEnabled_)->OnChoice.Handle(this, &ReportScreen::HandleChoice); leftColumnItems->Add(new RatingChoice("Gameplay", &gameplay_))->SetEnabledPtr(&ratingEnabled_)->OnChoice.Handle(this, &ReportScreen::HandleChoice); diff --git a/ext/native/ui/view.cpp b/ext/native/ui/view.cpp index 367e7e04a9..0585b62d27 100644 --- a/ext/native/ui/view.cpp +++ b/ext/native/ui/view.cpp @@ -837,7 +837,7 @@ void TextView::Draw(UIContext &dc) { dc.SetFontStyle(small_ ? dc.theme->uiFontSmall : dc.theme->uiFont); if (shadow_) { uint32_t shadowColor = 0x80000000; - dc.DrawTextRect(text_.c_str(), bounds_, shadowColor, textAlign_); + dc.DrawTextRect(text_.c_str(), bounds_.Offset(1.0f, 1.0f), shadowColor, textAlign_); } uint32_t textColor = hasTextColor_ ? textColor_ : dc.theme->infoStyle.fgColor; dc.DrawTextRect(text_.c_str(), bounds_, textColor, textAlign_);