Fix spacing around left tab, increment theme resource ID

* Adjust spacing between incognito man and leftmost tab.
* Make pinned tabs closer to their width in R19.
* Increment theme pack ID so tab background images get rebuilt.

BUG=125005
TEST=visual

Review URL: https://chromiumcodereview.appspot.com/10270016

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@134560 0039d316-1c4b-4281-b951-d872f2087c98
parent 14decadb
...@@ -25,7 +25,6 @@ const int kAutocompleteEditFontPixelSize = 15; ...@@ -25,7 +25,6 @@ const int kAutocompleteEditFontPixelSize = 15;
const int kAutocompleteEditFontPixelSizeInPopup = 10; const int kAutocompleteEditFontPixelSizeInPopup = 10;
const int kMiniTabWidth = 64;
const bool kCanToggleSystemTitleBar = false; const bool kCanToggleSystemTitleBar = false;
const bool kRestorePopups = false; const bool kRestorePopups = false;
const bool kShowImportOnBookmarkBar = false; const bool kShowImportOnBookmarkBar = false;
...@@ -58,9 +57,15 @@ const bool kCanToggleSystemTitleBar = true; ...@@ -58,9 +57,15 @@ const bool kCanToggleSystemTitleBar = true;
#endif // defined(OS_CHROMEOS) #endif // defined(OS_CHROMEOS)
#if defined(TOOLKIT_VIEWS)
// Windows and Chrome OS have bigger shadows in the tab art.
const int kMiniTabWidth = 64;
#else
const int kMiniTabWidth = 56;
#endif // defined(TOOLKIT_VIEWS)
#if !defined(OS_CHROMEOS) #if !defined(OS_CHROMEOS)
const int kMiniTabWidth = 56;
const bool kRestorePopups = false; const bool kRestorePopups = false;
const bool kShowImportOnBookmarkBar = true; const bool kShowImportOnBookmarkBar = true;
const bool kDownloadPageHasShowInFolder = true; const bool kDownloadPageHasShowInFolder = true;
......
...@@ -35,7 +35,7 @@ namespace { ...@@ -35,7 +35,7 @@ namespace {
// Version number of the current theme pack. We just throw out and rebuild // Version number of the current theme pack. We just throw out and rebuild
// theme packs that aren't int-equal to this. Increment this number if you // theme packs that aren't int-equal to this. Increment this number if you
// change default theme assets. // change default theme assets.
const int kThemePackVersion = 20; const int kThemePackVersion = 21;
// IDs that are in the DataPack won't clash with the positive integer // IDs that are in the DataPack won't clash with the positive integer
// uint16. kHeaderID should always have the maximum value because we want the // uint16. kHeaderID should always have the maximum value because we want the
......
...@@ -46,9 +46,10 @@ const int kResizeAreaCornerSize = 16; ...@@ -46,9 +46,10 @@ const int kResizeAreaCornerSize = 16;
// way the tabstrip draws its bottom edge, will appear like a 1 px gap to the // way the tabstrip draws its bottom edge, will appear like a 1 px gap to the
// user). // user).
const int kAvatarBottomSpacing = 2; const int kAvatarBottomSpacing = 2;
// There are 2 px on each side of the avatar (between the frame border and // Space between the frame border and the left edge of the avatar.
// it on the left, and between it and the tabstrip on the right). const int kAvatarLeftSpacing = 2;
const int kAvatarSideSpacing = 2; // Space between the right edge of the avatar and the tabstrip.
const int kAvatarRightSpacing = -2;
// The content left/right images have a shadow built into them. // The content left/right images have a shadow built into them.
const int kContentEdgeShadowThickness = 2; const int kContentEdgeShadowThickness = 2;
// The top 3 px of the tabstrip is shadow; in maximized mode we push this off // The top 3 px of the tabstrip is shadow; in maximized mode we push this off
...@@ -64,7 +65,7 @@ const int kNewTabCaptionRestoredSpacing = 5; ...@@ -64,7 +65,7 @@ const int kNewTabCaptionRestoredSpacing = 5;
const int kNewTabCaptionMaximizedSpacing = 16; const int kNewTabCaptionMaximizedSpacing = 16;
// How far to indent the tabstrip from the left side of the screen when there // How far to indent the tabstrip from the left side of the screen when there
// is no avatar icon. // is no avatar icon.
const int kTabStripIndent = -4; const int kTabStripIndent = -6;
} }
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
...@@ -96,7 +97,7 @@ gfx::Rect GlassBrowserFrameView::GetBoundsForTabStrip( ...@@ -96,7 +97,7 @@ gfx::Rect GlassBrowserFrameView::GetBoundsForTabStrip(
int minimize_button_offset = int minimize_button_offset =
std::min(frame()->GetMinimizeButtonOffset(), width()); std::min(frame()->GetMinimizeButtonOffset(), width());
int tabstrip_x = browser_view()->ShouldShowAvatar() ? int tabstrip_x = browser_view()->ShouldShowAvatar() ?
(avatar_bounds_.right() + kAvatarSideSpacing) : (avatar_bounds_.right() + kAvatarRightSpacing) :
NonClientBorderThickness() + kTabStripIndent; NonClientBorderThickness() + kTabStripIndent;
// In RTL languages, we have moved an avatar icon left by the size of window // In RTL languages, we have moved an avatar icon left by the size of window
// controls to prevent it from being rendered over them. So, we use its x // controls to prevent it from being rendered over them. So, we use its x
...@@ -386,7 +387,7 @@ void GlassBrowserFrameView::LayoutAvatar() { ...@@ -386,7 +387,7 @@ void GlassBrowserFrameView::LayoutAvatar() {
// can be customized so we can't depend on its size to perform layout. // can be customized so we can't depend on its size to perform layout.
SkBitmap incognito_icon = browser_view()->GetOTRAvatarIcon(); SkBitmap incognito_icon = browser_view()->GetOTRAvatarIcon();
int avatar_x = NonClientBorderThickness() + kAvatarSideSpacing; int avatar_x = NonClientBorderThickness() + kAvatarLeftSpacing;
// Move this avatar icon by the size of window controls to prevent it from // Move this avatar icon by the size of window controls to prevent it from
// being rendered over them in RTL languages. This code also needs to adjust // being rendered over them in RTL languages. This code also needs to adjust
// the width of a tab strip to avoid decreasing this size twice. (See the // the width of a tab strip to avoid decreasing this size twice. (See the
......
...@@ -84,9 +84,10 @@ const int kTitleLogoSpacing = 5; ...@@ -84,9 +84,10 @@ const int kTitleLogoSpacing = 5;
// way the tabstrip draws its bottom edge, will appear like a 1 px gap to the // way the tabstrip draws its bottom edge, will appear like a 1 px gap to the
// user). // user).
const int kAvatarBottomSpacing = 2; const int kAvatarBottomSpacing = 2;
// There are 2 px on each side of the avatar (between the frame border and // Space between the frame border and the left edge of the avatar.
// it on the left, and between it and the tabstrip on the right). const int kAvatarLeftSpacing = 2;
const int kAvatarSideSpacing = 2; // Space between the right edge of the avatar and the tabstrip.
const int kAvatarRightSpacing = -2;
// The top 3 px of the tabstrip is shadow; in maximized mode we push this off // The top 3 px of the tabstrip is shadow; in maximized mode we push this off
// the top of the screen so the tabs appear flush against the screen edge. // the top of the screen so the tabs appear flush against the screen edge.
const int kTabstripTopShadowThickness = 3; const int kTabstripTopShadowThickness = 3;
...@@ -100,7 +101,7 @@ const int kNewTabCaptionRestoredSpacing = 5; ...@@ -100,7 +101,7 @@ const int kNewTabCaptionRestoredSpacing = 5;
const int kNewTabCaptionMaximizedSpacing = 16; const int kNewTabCaptionMaximizedSpacing = 16;
// How far to indent the tabstrip from the left side of the screen when there // How far to indent the tabstrip from the left side of the screen when there
// is no avatar icon. // is no avatar icon.
const int kTabStripIndent = -4; const int kTabStripIndent = -6;
// Converts |bounds| from |src|'s coordinate system to |dst|, and checks if // Converts |bounds| from |src|'s coordinate system to |dst|, and checks if
// |pt| is contained within. // |pt| is contained within.
...@@ -210,7 +211,7 @@ gfx::Rect OpaqueBrowserFrameView::GetBoundsForTabStrip( ...@@ -210,7 +211,7 @@ gfx::Rect OpaqueBrowserFrameView::GetBoundsForTabStrip(
return gfx::Rect(); return gfx::Rect();
int tabstrip_x = browser_view()->ShouldShowAvatar() ? int tabstrip_x = browser_view()->ShouldShowAvatar() ?
(avatar_bounds_.right() + kAvatarSideSpacing) : (avatar_bounds_.right() + kAvatarRightSpacing) :
NonClientBorderThickness() + kTabStripIndent; NonClientBorderThickness() + kTabStripIndent;
int maximized_spacing = kNewTabCaptionMaximizedSpacing; int maximized_spacing = kNewTabCaptionMaximizedSpacing;
...@@ -957,7 +958,7 @@ void OpaqueBrowserFrameView::LayoutAvatar() { ...@@ -957,7 +958,7 @@ void OpaqueBrowserFrameView::LayoutAvatar() {
int avatar_y = frame()->IsMaximized() ? int avatar_y = frame()->IsMaximized() ?
(NonClientTopBorderHeight(false) + kTabstripTopShadowThickness) : (NonClientTopBorderHeight(false) + kTabstripTopShadowThickness) :
avatar_restored_y; avatar_restored_y;
avatar_bounds_.SetRect(NonClientBorderThickness() + kAvatarSideSpacing, avatar_bounds_.SetRect(NonClientBorderThickness() + kAvatarLeftSpacing,
avatar_y, incognito_icon.width(), avatar_y, incognito_icon.width(),
browser_view()->ShouldShowAvatar() ? (avatar_bottom - avatar_y) : 0); browser_view()->ShouldShowAvatar() ? (avatar_bottom - avatar_y) : 0);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment