mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-29 21:37:39 +00:00
Fix so that rects are correctly encoded on macosx
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@6168 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
a123efb34e
commit
a1a9c2ac03
1 changed files with 12 additions and 5 deletions
|
@ -534,8 +534,10 @@
|
|||
- (void) encodePoint: (NSPoint)point withName: (NSString*)name
|
||||
{
|
||||
if (!findingConditionals && name) {
|
||||
id valueString = NSStringFromPoint (point);
|
||||
|
||||
/* Macosx NSStringFromPoint is not OPENstep compliant, so we do it by hand. */
|
||||
id valueString = [NSString stringWithFormat: @"{x=%f; y=%f}",
|
||||
point.x, point.y];
|
||||
|
||||
[lastObjectRepresentation setObject: valueString forKey: name];
|
||||
}
|
||||
}
|
||||
|
@ -543,7 +545,9 @@
|
|||
- (void) encodeSize: (NSSize)size withName: (NSString*)name
|
||||
{
|
||||
if (!findingConditionals) {
|
||||
id valueString = NSStringFromSize (size);
|
||||
/* Macosx NSStringFromSize is not OPENstep compliant, so we do it by hand. */
|
||||
id valueString = [NSString stringWithFormat: @"{width=%f; height=%f}",
|
||||
size.width, size.height];
|
||||
|
||||
[lastObjectRepresentation setObject: valueString forKey: name];
|
||||
}
|
||||
|
@ -552,8 +556,11 @@
|
|||
- (void) encodeRect: (NSRect)rect withName: (NSString*)name
|
||||
{
|
||||
if (!findingConditionals) {
|
||||
id valueString = NSStringFromRect (rect);
|
||||
|
||||
/* Macosx NSStringFromRect is not OPENstep compliant, so we do it by hand. */
|
||||
id valueString = [NSString stringWithFormat:
|
||||
@"{x=%f; y=%f; width=%f; height=%f}",
|
||||
rect.origin.x, rect.origin.y,
|
||||
rect.size.width, rect.size.height];
|
||||
[lastObjectRepresentation setObject: valueString forKey: name];
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue