win: Use DIP rect for tray icon's bounds
This commit is contained in:
parent
886ef1717c
commit
324153d394
1 changed files with 2 additions and 1 deletions
|
@ -13,6 +13,7 @@
|
||||||
#include "ui/gfx/geometry/point.h"
|
#include "ui/gfx/geometry/point.h"
|
||||||
#include "ui/gfx/geometry/rect.h"
|
#include "ui/gfx/geometry/rect.h"
|
||||||
#include "ui/gfx/screen.h"
|
#include "ui/gfx/screen.h"
|
||||||
|
#include "ui/gfx/win/dpi.h"
|
||||||
#include "ui/views/controls/menu/menu_runner.h"
|
#include "ui/views/controls/menu/menu_runner.h"
|
||||||
|
|
||||||
namespace atom {
|
namespace atom {
|
||||||
|
@ -165,7 +166,7 @@ gfx::Rect NotifyIcon::GetBounds() {
|
||||||
|
|
||||||
RECT rect = { 0 };
|
RECT rect = { 0 };
|
||||||
Shell_NotifyIconGetRect(&icon_id, &rect);
|
Shell_NotifyIconGetRect(&icon_id, &rect);
|
||||||
return gfx::Rect(rect);
|
return gfx::win::ScreenToDIPRect(gfx::Rect(rect));
|
||||||
}
|
}
|
||||||
|
|
||||||
void NotifyIcon::InitIconData(NOTIFYICONDATA* icon_data) {
|
void NotifyIcon::InitIconData(NOTIFYICONDATA* icon_data) {
|
||||||
|
|
Loading…
Reference in a new issue