123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293 |
- ## This patch makes the tabbar, toolbar, bookmarkbar, and downloadbar thinner.
- #
- # These are the values that I'm comfortable with, adjust to your liking.
- #
- # Even though the download items are set to 24px, that's really a minimum.
- # Their height is based on the height of two rows of text using your current
- # font, so that could vary depending on your settings.
- --- a/chrome/browser/ui/layout_constants.cc
- +++ b/chrome/browser/ui/layout_constants.cc
- @@ -33,13 +33,13 @@ int GetLayoutConstant(LayoutConstant con
- case BOOKMARK_BAR_HEIGHT:
- // The fixed margin ensures the bookmark buttons appear centered relative
- // to the white space above and below.
- - static constexpr int kBookmarkBarAttachedVerticalMargin = 4;
- + static constexpr int kBookmarkBarAttachedVerticalMargin = 0;
- return GetLayoutConstant(BOOKMARK_BAR_BUTTON_HEIGHT) +
- kBookmarkBarAttachedVerticalMargin;
- case BOOKMARK_BAR_BUTTON_HEIGHT:
- - return touch_ui ? 36 : 28;
- + return touch_ui ? 36 : 24;
- case BOOKMARK_BAR_NTP_HEIGHT:
- - return touch_ui ? GetLayoutConstant(BOOKMARK_BAR_HEIGHT) : 39;
- + return touch_ui ? GetLayoutConstant(BOOKMARK_BAR_HEIGHT) : 27;
- case WEB_APP_MENU_BUTTON_SIZE:
- return 24;
- case WEB_APP_PAGE_ACTION_ICON_SIZE:
- @@ -47,15 +47,15 @@ int GetLayoutConstant(LayoutConstant con
- // stretching the container view.
- return 16;
- case LOCATION_BAR_BUBBLE_FONT_VERTICAL_PADDING:
- - return 2;
- + return 0;
- case LOCATION_BAR_BUBBLE_ANCHOR_VERTICAL_INSET:
- return 1;
- case LOCATION_BAR_CHILD_INTERIOR_PADDING:
- - return 3;
- + return 1;
- case LOCATION_BAR_ELEMENT_PADDING:
- return touch_ui ? 3 : 2;
- case LOCATION_BAR_HEIGHT:
- - return touch_ui ? 36 : 28;
- + return touch_ui ? 36 : 24;
- case LOCATION_BAR_ICON_SIZE:
- return touch_ui ? 20 : 16;
- case TAB_AFTER_TITLE_PADDING:
- @@ -65,7 +65,7 @@ int GetLayoutConstant(LayoutConstant con
- case TAB_ALERT_INDICATOR_ICON_WIDTH:
- return touch_ui ? 12 : 16;
- case TAB_HEIGHT:
- - return (touch_ui ? 41 : 34) + GetLayoutConstant(TABSTRIP_TOOLBAR_OVERLAP);
- + return (touch_ui ? 41 : 30) + GetLayoutConstant(TABSTRIP_TOOLBAR_OVERLAP);
- case TAB_PRE_TITLE_PADDING:
- return 8;
- case TAB_STACK_DISTANCE:
- @@ -79,7 +79,7 @@ int GetLayoutConstant(LayoutConstant con
- return 0;
- return 1;
- case TOOLBAR_BUTTON_HEIGHT:
- - return touch_ui ? 48 : 28;
- + return touch_ui ? 48 : 24;
- case TOOLBAR_ELEMENT_PADDING:
- return touch_ui ? 0 : 4;
- case TOOLBAR_STANDARD_SPACING:
- @@ -109,7 +109,7 @@ gfx::Insets GetLayoutInsets(LayoutInset
- }
-
- case TOOLBAR_INTERIOR_MARGIN:
- - return touch_ui ? gfx::Insets() : gfx::Insets(4, 8);
- + return touch_ui ? gfx::Insets() : gfx::Insets(0, 8);
- }
- NOTREACHED();
- return gfx::Insets();
- --- a/chrome/browser/ui/views/download/download_item_view.cc
- +++ b/chrome/browser/ui/views/download/download_item_view.cc
- @@ -129,7 +129,7 @@ constexpr int kProgressIndicatorSize = 2
-
- // The vertical distance between the item's visual upper bound (as delineated
- // by the separator on the right) and the edge of the shelf.
- -constexpr int kTopBottomPadding = 6;
- +constexpr int kTopBottomPadding = 0;
-
- // The minimum vertical padding above and below contents of the download item.
- // This is only used when the text size is large.
- @@ -593,7 +593,7 @@ gfx::Size DownloadItemView::CalculatePre
- }
-
- // The normal height of the item which may be exceeded if text is large.
- - constexpr int kDefaultDownloadItemHeight = 48;
- + constexpr int kDefaultDownloadItemHeight = 24;
- return gfx::Size(width, std::max(kDefaultDownloadItemHeight,
- 2 * kMinimumVerticalPadding + height));
- }
|