#include "chrome/browser/ui/views/apps/chrome_native_app_window_views_win.h"
#include "chrome/browser/ui/views/apps/glass_app_window_frame_view_win.h"
-#include "grit/theme_resources.h"
#include "ui/base/theme_provider.h"
#include "ui/gfx/win/dpi.h"
#include "ui/views/controls/menu/native_menu_win.h"
// This tells Windows that most of the window is a client area, meaning Chrome
// will draw it. Windows still fills in the glass bits because of the
// DwmExtendFrameIntoClientArea call in |UpdateDWMFrame|.
- // The 1 pixel edge is left on the sides and bottom as without this
+ // Without this 1 pixel offset on the right and bottom:
// * windows paint in a more standard way, and
// * get weird black bars at the top when maximized in multiple monitor
// configurations.
int border_thickness = 1;
- insets->Set(0, border_thickness, border_thickness, border_thickness);
+ insets->Set(0, 0, border_thickness, border_thickness);
return true;
}
// Otherwise, we need to figure out how to extend the glass in.
if (app_window_->glass_frame_view()) {
gfx::Insets insets = app_window_->glass_frame_view()->GetGlassInsets();
+ // The DWM API's expect values in pixels. We need to convert from DIP to
+ // pixels here.
+ insets = insets.Scale(gfx::win::GetDeviceScaleFactor());
margins.cxLeftWidth = insets.left();
margins.cxRightWidth = insets.right();
margins.cyBottomHeight = insets.bottom();