Merge branch 'master' into xib_document

# Conflicts:
#	.gitignore
#	ChangeLog
This commit is contained in:
fredkiefer 2020-01-11 19:47:13 +01:00
commit eb9fd58dce
10 changed files with 56 additions and 11 deletions

1
.gitignore vendored
View file

@ -14,6 +14,7 @@ Headers/Additions/GNUstepGUI/GSVersion.h
Source/config.h
Source/Info-gnustep.plist
Tests/gui/*/GNUmakefile
Tools/speech/GSSpeechServer.app
*~
# Created by https://www.gitignore.io/api/xcode

View file

@ -37,6 +37,25 @@
* Source/GSXibParser.m,
* Source/GNUmakefile: Remove now obsolete class.
2020-01-10 Sergii Stoian <stoyan255@gmail.com>
* Images/common_StepperDown.tiff,
* Images/common_StepperDownHighlighted.tiff,
* Images/common_StepperUp.tiff,
* Images/common_StepperUpHighlighted.tiff: new images with arrows
similar to scroll view buttons'.
* Source/GSThemeDrawing.m (stepperUpButtonRectWithFrame:),
(stepperDownButtonRectWithFrame:): center buttons horizontally; simplify
and cleanup.
* Source/NSStepper.m (acceptsFirstResponder): return NO. Returning
YES makes sense only if `keyDown:` is implemented.
(acceptsFirstMouse:): return YES.
* Source/NSStepperCell.m (cellSize): initial implementation. Returns
minimum size based on up and button sizes.
2020-01-07 Fred Kiefer <FredKiefer@gmx.de>
* Headers/AppKit/NSDatePicker.h,

Binary file not shown.

Binary file not shown.

View file

@ -41,8 +41,6 @@ MISSING HEADERS
> NSPathControl.h
> NSPathControlItem.h
> NSPersistentDocument.h
> NSPredicateEditor.h
> NSPredicateEditorRowTemplate.h
> NSPressureConfiguration.h
> NSQuickDrawView.h
> NSRuleEditor.h
@ -78,7 +76,7 @@ MISSING HEADERS
> NSWindowRestoration.h
> NSWindowTab.h
> NSWindowTabGroup.h
Total: 84
Total: 82
Completed
---

View file

@ -722,22 +722,20 @@
- (NSRect) stepperUpButtonRectWithFrame: (NSRect)frame
{
NSSize size = [[NSImage imageNamed: @"common_StepperUp"] size];
NSRect upRect;
NSRect upRect = {{NSMinX(frame), NSMinY(frame)}, {size.width, size.height}};
upRect.size = size;
upRect.origin.x = NSMaxX(frame) - size.width;
upRect.origin.y = NSMinY(frame) + ((int)frame.size.height / 2) + 1;
upRect.origin.x += ((int)frame.size.width / 2) - ((int)size.width / 2);
upRect.origin.y += ((int)frame.size.height / 2);
return upRect;
}
- (NSRect) stepperDownButtonRectWithFrame: (NSRect)frame
{
NSSize size = [[NSImage imageNamed: @"common_StepperDown"] size];
NSRect downRect;
NSRect downRect = {{NSMinX(frame), NSMinY(frame)}, {size.width, size.height}};
downRect.size = size;
downRect.origin.x = NSMaxX(frame) - size.width;
downRect.origin.y = NSMinY(frame) + ((int)frame.size.height / 2) - size.height + 1;
downRect.origin.x += ((int)frame.size.width / 2) - ((int)size.width / 2);
downRect.origin.y += ((int)frame.size.height / 2) - size.height;
return downRect;
}

View file

@ -85,6 +85,17 @@ id _nsstepperCellClass = nil;
return YES;
}
- (BOOL)acceptsFirstResponder
{
// FIXME: change to `YES` after `keyDown:` implementation.
return NO;
}
- (BOOL) acceptsFirstMouse: (NSEvent *)theEvent
{
return YES;
}
- (void) keyDown: (NSEvent*)theEvent
{
// FIXME

View file

@ -346,6 +346,24 @@
return mouseWentUp;
}
- (NSSize) cellSize
{
NSRect upRect = [[GSTheme theme]
stepperUpButtonRectWithFrame: [_control_view bounds]];
NSRect downRect = [[GSTheme theme]
stepperDownButtonRectWithFrame: [_control_view bounds]];
NSSize size;
if (upRect.size.width > downRect.size.width)
size.width = upRect.size.width;
else
size.width = downRect.size.width;
size.height = upRect.size.height + downRect.size.height;
return size;
}
//
// NSCoding protocol
//