Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(530)

Unified Diff: ui/views/examples/vector_example.cc

Issue 2278743002: Disallow non-postive sizes in vector icon views example. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/examples/vector_example.cc
diff --git a/ui/views/examples/vector_example.cc b/ui/views/examples/vector_example.cc
index f34b155f17817c7b7db062eb504e468e9e788a6f..fbf0f118b39498a3a6f0f7a08a1e940d29c4a82f 100644
--- a/ui/views/examples/vector_example.cc
+++ b/ui/views/examples/vector_example.cc
@@ -97,7 +97,7 @@ class VectorIconGallery : public View,
void ContentsChanged(Textfield* sender,
const base::string16& new_contents) override {
if (sender == size_input_) {
- if (base::StringToInt(new_contents, &size_))
+ if (base::StringToInt(new_contents, &size_) && (size_ > 0))
UpdateImage();
else
size_input_->SetText(base::string16());
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698