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

Unified Diff: ash/common/shelf/shelf_constants.cc

Issue 2174643002: [ash-md] Updates ash shelf tooltips to MD (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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: ash/common/shelf/shelf_constants.cc
diff --git a/ash/common/shelf/shelf_constants.cc b/ash/common/shelf/shelf_constants.cc
index bf7c0361fa5ed836c2406bdc490706a507ff9ece..df556cbaa569d1b411383acfd5787f52badf2044 100644
--- a/ash/common/shelf/shelf_constants.cc
+++ b/ash/common/shelf/shelf_constants.cc
@@ -33,6 +33,14 @@ int GetShelfConstant(ShelfConstant shelf_constant) {
const int kShelfButtonSize[] = {44, 44, 48};
const int kShelfInsetsForAutoHide[] = {3, 3, 0};
+ // Tooltip constants.
+ const int kTooltipHeight[] = {29, 29, 24};
+ const int kTooltipMaxWidth[] = {250, 250, 250};
+ const int kTooltipTopBottomMargin[] = {3, 3, 4};
+ const int kTooltipLeftRightMargin[] = {10, 10, 8};
+ const int kArrowTopBottomOffset[] = {7, 7, -1};
+ const int kArrowLeftRightOffset[] = {11, 11, -1};
+
const int mode = MaterialDesignController::GetMode();
DCHECK(mode >= MaterialDesignController::NON_MATERIAL &&
mode <= MaterialDesignController::MATERIAL_EXPERIMENTAL);
@@ -48,6 +56,18 @@ int GetShelfConstant(ShelfConstant shelf_constant) {
return kShelfButtonSize[mode];
case SHELF_INSETS_FOR_AUTO_HIDE:
return kShelfInsetsForAutoHide[mode];
+ case TOOLTIP_HEIGHT:
+ return kTooltipHeight[mode];
+ case TOOLTIP_MAX_WIDTH:
+ return kTooltipMaxWidth[mode];
+ case TOOLTIP_TOP_BOTTOM_MARGIN:
+ return kTooltipTopBottomMargin[mode];
+ case TOOLTIP_LEFT_RIGHT_MARGIN:
+ return kTooltipLeftRightMargin[mode];
+ case TOOLTIP_ARROW_TOP_BOTTOM_OFFSET:
+ return kArrowTopBottomOffset[mode];
+ case TOOLTIP_ARROW_LEFT_RIGHT_OFFSET:
+ return kArrowLeftRightOffset[mode];
}
NOTREACHED();
return 0;

Powered by Google App Engine
This is Rietveld 408576698