Add a focus style to the little screenshot previews to make keyboard navigation less confusing

This commit is contained in:
Henrik Rydgard committed 2015-02-02 10:09:00 +01:00
1 parent feb96f0573
commit 682ef7d083
3 files changed
+11 -2

No files matched your search

+5 -1
View File
@@ -82,6 +82,10 @@ void AsyncImageFileView::Draw(UIContext &dc) {
textureFailed_ = true;
}
if (HasFocus()) {
dc.FillRect(dc.theme->itemFocusedStyle.background, bounds_.Expand(3));
}
// TODO: involve sizemode
if (texture_) {
dc.Flush();
@@ -126,7 +130,7 @@ protected:
virtual void CreatePopupContents(UI::ViewGroup *parent) {
// TODO: Find an appropriate size for the image view
parent->Add(new AsyncImageFileView(filename_, UI::IS_DEFAULT, NULL, new UI::LayoutParams(480, 272)));
parent->Add(new AsyncImageFileView(filename_, UI::IS_DEFAULT, NULL, new UI::LayoutParams(480, 272)))->SetCanBeFocused(false);
}
private: