equal
deleted
inserted
replaced
158 - (void) setPropertiesForStyleBits:(jint)bits mask:(jint)mask { |
158 - (void) setPropertiesForStyleBits:(jint)bits mask:(jint)mask { |
159 if (IS(mask, RESIZABLE)) { |
159 if (IS(mask, RESIZABLE)) { |
160 BOOL resizable = IS(bits, RESIZABLE); |
160 BOOL resizable = IS(bits, RESIZABLE); |
161 [self updateMinMaxSize:resizable]; |
161 [self updateMinMaxSize:resizable]; |
162 [self.nsWindow setShowsResizeIndicator:resizable]; |
162 [self.nsWindow setShowsResizeIndicator:resizable]; |
|
163 // Zoom button should be disabled, if the window is not resizable, |
|
164 // otherwise button should be restored to initial state. |
|
165 BOOL zoom = resizable && IS(bits, ZOOMABLE); |
|
166 [[self.nsWindow standardWindowButton:NSWindowZoomButton] setEnabled:zoom]; |
163 } |
167 } |
164 |
168 |
165 if (IS(mask, HAS_SHADOW)) { |
169 if (IS(mask, HAS_SHADOW)) { |
166 [self.nsWindow setHasShadow:IS(bits, HAS_SHADOW)]; |
170 [self.nsWindow setHasShadow:IS(bits, HAS_SHADOW)]; |
167 } |
171 } |
782 [nsWindow setStyleMask:[AWTWindow styleMaskForStyleBits:newBits]]; |
786 [nsWindow setStyleMask:[AWTWindow styleMaskForStyleBits:newBits]]; |
783 } |
787 } |
784 |
788 |
785 // calls methods on NSWindow to change other properties, based on the mask |
789 // calls methods on NSWindow to change other properties, based on the mask |
786 if (mask & MASK(_METHOD_PROP_BITMASK)) { |
790 if (mask & MASK(_METHOD_PROP_BITMASK)) { |
787 [window setPropertiesForStyleBits:bits mask:mask]; |
791 [window setPropertiesForStyleBits:newBits mask:mask]; |
788 } |
792 } |
789 |
793 |
790 window.styleBits = newBits; |
794 window.styleBits = newBits; |
791 }]; |
795 }]; |
792 |
796 |