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

Unified Diff: chrome/browser/ui/views/frame/opaque_browser_frame_view_layout.cc

Issue 1439423002: Make browser frame square when running on windows 10 with a theme. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@but
Patch Set: rebased Created 4 years, 8 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 | « chrome/browser/ui/views/frame/opaque_browser_frame_view.cc ('k') | ui/views/window/frame_background.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/frame/opaque_browser_frame_view_layout.cc
diff --git a/chrome/browser/ui/views/frame/opaque_browser_frame_view_layout.cc b/chrome/browser/ui/views/frame/opaque_browser_frame_view_layout.cc
index d69dbc520db2545ac1884854b2d329ad2a91b127..955666d44bd8f798e0e7605accb9a525aba2d305 100644
--- a/chrome/browser/ui/views/frame/opaque_browser_frame_view_layout.cc
+++ b/chrome/browser/ui/views/frame/opaque_browser_frame_view_layout.cc
@@ -148,8 +148,16 @@ gfx::Rect OpaqueBrowserFrameViewLayout::GetWindowBoundsForClientBounds(
}
int OpaqueBrowserFrameViewLayout::FrameBorderThickness(bool restored) const {
+#if defined(OS_WIN)
+ const int border_thickness =
+ base::win::GetVersion() >= base::win::VERSION_WIN10 ?
+ kFrameBorderThicknessWin10 : kFrameBorderThickness;
+#else
+ const int border_thickness = kFrameBorderThickness;
+#endif
+
return (!restored && (IsTitleBarCondensed() || delegate_->IsFullscreen())) ?
- 0 : kFrameBorderThickness;
+ 0 : border_thickness;
}
int OpaqueBrowserFrameViewLayout::NonClientBorderThickness() const {
@@ -490,6 +498,13 @@ void OpaqueBrowserFrameViewLayout::SetBoundsForButton(
// If the window is maximized, align the buttons to its upper edge.
int extra_height = title_bar_condensed ? extra_caption_y_ : 0;
+#if defined(OS_WIN)
+ const int border_thickness =
+ base::win::GetVersion() >= base::win::VERSION_WIN10 ?
+ kFrameBorderThicknessWin10 : kFrameBorderThickness;
+#else
+ const int border_thickness = kFrameBorderThickness;
+#endif
switch (alignment) {
case ALIGN_LEADING: {
@@ -520,7 +535,7 @@ void OpaqueBrowserFrameViewLayout::SetBoundsForButton(
// If we're the first button on the right and maximized, add width to the
// right hand side of the screen.
int extra_width = (title_bar_condensed && !has_trailing_buttons_) ?
- (kFrameBorderThickness -
+ (border_thickness -
views::NonClientFrameView::kFrameShadowThickness) : 0;
button->SetBounds(
« no previous file with comments | « chrome/browser/ui/views/frame/opaque_browser_frame_view.cc ('k') | ui/views/window/frame_background.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698