mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 05:40:37 +00:00
* 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. Retruns minimum size based on up and button sizes.
This commit is contained in:
parent
3f6da64b52
commit
9a58a93ee5
8 changed files with 54 additions and 8 deletions
|
@ -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
|
||||
//
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue