spec: Test the -able methods
This commit is contained in:
parent
010cc3276a
commit
c41de501cb
4 changed files with 113 additions and 8 deletions
|
@ -122,7 +122,7 @@ void NativeWindow::InitFromOptions(const mate::Dictionary& options) {
|
|||
}
|
||||
#endif
|
||||
bool movable;
|
||||
if (options.Get(options::kMovable, &movable) && movable) {
|
||||
if (options.Get(options::kMovable, &movable)) {
|
||||
SetMovable(movable);
|
||||
}
|
||||
bool has_shadow;
|
||||
|
|
|
@ -489,9 +489,7 @@ NativeWindowMac::NativeWindowMac(
|
|||
bool fullscreen = false;
|
||||
if (options.Get(options::kFullscreen, &fullscreen) && !fullscreen)
|
||||
fullscreenable = false;
|
||||
if (!fullscreenable) {
|
||||
SetFullScreenable(false);
|
||||
}
|
||||
SetFullScreenable(fullscreenable);
|
||||
|
||||
// Disable zoom button if window is not resizable
|
||||
if (!maximizable) {
|
||||
|
|
|
@ -465,9 +465,9 @@ void NativeWindowViews::SetMinimizable(bool minimizable) {
|
|||
|
||||
bool NativeWindowViews::IsMinimizable() {
|
||||
#if defined(OS_WIN)
|
||||
return CanMinimize();
|
||||
return ::GetWindowLong(GetAcceleratedWidget(), GWL_STYLE) & WS_MINIMIZEBOX;
|
||||
#else
|
||||
return true; // CanMinimize() Not implemented on Linux.
|
||||
return true; // Not implemented on Linux.
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -480,9 +480,9 @@ void NativeWindowViews::SetMaximizable(bool maximizable) {
|
|||
|
||||
bool NativeWindowViews::IsMaximizable() {
|
||||
#if defined(OS_WIN)
|
||||
return CanMaximize();
|
||||
return ::GetWindowLong(GetAcceleratedWidget(), GWL_STYLE) & WS_MAXIMIZEBOX;
|
||||
#else
|
||||
return true; // CanMaximize() Not implemented on Linux.
|
||||
return true; // Not implemented on Linux.
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue