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

Unified Diff: views/controls/menu/menu_config.h

Issue 2742003: Adds support for showing accelerators in bookmark menus. (Closed)
Patch Set: Added GetAcceleratorText Created 10 years, 6 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 | « views/accelerator.cc ('k') | views/controls/menu/menu_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/controls/menu/menu_config.h
diff --git a/views/controls/menu/menu_config.h b/views/controls/menu/menu_config.h
index adcf8519e6b115bf3e889ef84f352427de3bfbe1..cd41fea8f683c3bbecaae652cdf219ed3a4ed11f 100644
--- a/views/controls/menu/menu_config.h
+++ b/views/controls/menu/menu_config.h
@@ -12,24 +12,26 @@ namespace views {
// Layout type information for menu items. Use the instance() method to obtain
// the MenuConfig for the current platform.
struct MenuConfig {
- MenuConfig() : item_top_margin(3),
- item_bottom_margin(4),
- item_no_icon_top_margin(1),
- item_no_icon_bottom_margin(3),
- item_left_margin(4),
- label_to_arrow_padding(10),
- arrow_to_edge_padding(5),
- icon_to_label_padding(8),
- gutter_to_label(5),
- check_width(16),
- check_height(16),
- arrow_height(9),
- arrow_width(9),
- gutter_width(0),
- separator_height(6),
- render_gutter(false),
- show_mnemonics(false),
- scroll_arrow_height(3) {
+ MenuConfig()
+ : item_top_margin(3),
+ item_bottom_margin(4),
+ item_no_icon_top_margin(1),
+ item_no_icon_bottom_margin(3),
+ item_left_margin(4),
+ label_to_arrow_padding(10),
+ arrow_to_edge_padding(5),
+ icon_to_label_padding(8),
+ gutter_to_label(5),
+ check_width(16),
+ check_height(16),
+ arrow_height(9),
+ arrow_width(9),
+ gutter_width(0),
+ separator_height(6),
+ render_gutter(false),
+ show_mnemonics(false),
+ scroll_arrow_height(3),
+ label_to_accelerator_padding(10) {
}
// Resets the single shared MenuConfig instance. The next time instance() is
@@ -94,6 +96,10 @@ struct MenuConfig {
// Height of the scroll arrow.
int scroll_arrow_height;
+ // Padding between the label and accelerator. Only used if there is an
+ // accelerator.
+ int label_to_accelerator_padding;
+
private:
// Creates and configures a new MenuConfig as appropriate for the current
// platform.
« no previous file with comments | « views/accelerator.cc ('k') | views/controls/menu/menu_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698