linux: Use native frame for message box.
This commit is contained in:
parent
c91f0c575c
commit
77627c0d2d
1 changed files with 10 additions and 6 deletions
|
@ -22,6 +22,10 @@
|
||||||
#include "ui/views/widget/widget_delegate.h"
|
#include "ui/views/widget/widget_delegate.h"
|
||||||
#include "ui/wm/core/shadow_types.h"
|
#include "ui/wm/core/shadow_types.h"
|
||||||
|
|
||||||
|
#if defined(USE_X11)
|
||||||
|
#include "ui/views/window/native_frame_view.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace atom {
|
namespace atom {
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
@ -164,11 +168,6 @@ MessageDialog::MessageDialog(NativeWindow* parent_window,
|
||||||
params.remove_standard_frame = true;
|
params.remove_standard_frame = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(USE_X11)
|
|
||||||
// In X11 the window frame is drawn by the application.
|
|
||||||
params.remove_standard_frame = true;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
widget_.reset(new views::Widget);
|
widget_.reset(new views::Widget);
|
||||||
widget_->Init(params);
|
widget_->Init(params);
|
||||||
|
|
||||||
|
@ -242,8 +241,13 @@ ui::ModalType MessageDialog::GetModalType() const {
|
||||||
|
|
||||||
views::NonClientFrameView* MessageDialog::CreateNonClientFrameView(
|
views::NonClientFrameView* MessageDialog::CreateNonClientFrameView(
|
||||||
views::Widget* widget) {
|
views::Widget* widget) {
|
||||||
if (!parent_)
|
if (!parent_) {
|
||||||
|
#if defined(USE_X11)
|
||||||
|
return new views::NativeFrameView(widget);
|
||||||
|
#else
|
||||||
return NULL;
|
return NULL;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
// Create a bubble style frame like Chrome.
|
// Create a bubble style frame like Chrome.
|
||||||
views::BubbleFrameView* frame = new views::BubbleFrameView(gfx::Insets());
|
views::BubbleFrameView* frame = new views::BubbleFrameView(gfx::Insets());
|
||||||
|
|
Loading…
Reference in a new issue