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

Unified Diff: ui/views/view.h

Issue 2836313002: BoxLayout now suports per-view margins. (Closed)
Patch Set: Added margin collapsing and a BoxLayout example Created 3 years, 7 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
Index: ui/views/view.h
diff --git a/ui/views/view.h b/ui/views/view.h
index d1f69707fda4a74ca022439077464b8205df2fb0..9a409446ead656ed6855c7335ec5f7b8e1cca4e2 100644
--- a/ui/views/view.h
+++ b/ui/views/view.h
@@ -21,6 +21,7 @@
#include "build/build_config.h"
#include "ui/accessibility/ax_enums.h"
#include "ui/base/accelerators/accelerator.h"
+#include "ui/base/class_property.h"
#include "ui/base/dragdrop/drag_drop_types.h"
#include "ui/base/dragdrop/drop_target_event.h"
#include "ui/base/dragdrop/os_exchange_data.h"
@@ -115,7 +116,8 @@ class VIEWS_EXPORT View : public ui::LayerDelegate,
public ui::LayerOwner,
public ui::AcceleratorTarget,
public ui::EventTarget,
- public ui::EventHandler {
+ public ui::EventHandler,
+ public ui::PropertyHandler {
public:
using Views = std::vector<View*>;
@@ -1697,6 +1699,11 @@ class VIEWS_EXPORT View : public ui::LayerDelegate,
DISALLOW_COPY_AND_ASSIGN(View);
};
+// A property to store margins around the outer perimeter of the view. Margins
+// are outside the bounds of the view. This is used by various layout managers
+// to position views with the proper spacing between them.
+VIEWS_EXPORT extern const ui::ClassProperty<gfx::Insets*>* const kMarginsKey;
+
} // namespace views
#endif // UI_VIEWS_VIEW_H_

Powered by Google App Engine
This is Rietveld 408576698