Remove NSImage hack, other fixes.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@12763 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
fedor 2002-02-25 17:39:11 +00:00
parent 99c388514e
commit a324ac0bdf
5 changed files with 34 additions and 21 deletions

View file

@ -1,3 +1,17 @@
2002-02-25 Adam Fedor <fedor@gnu.org>
* Source/NSGraphicsContext.m (_postExternalEvent:) Removed, not used.
* Source/NSInterfaceStyle.m: Updated comments.
* Source/NSScroller.m (-setFloatValue:): Don't update
if the new float is the same as our current value.
(-setFloatValue:knobProportion:): Likewise.
2002-02-18 Willem Rein Oudshoorn <woudshoo@xs4all.nl>
* gui/Source/NSImage.m ([NSImage -initWithSize:]): removed the
round size down temporary fix.
([NSImage -setSize:]): removed the round size down temporary fix.
Mon Feb 25 14:51:56 2002 Nicola Pero <nicola@brainstorm.co.uk> Mon Feb 25 14:51:56 2002 Nicola Pero <nicola@brainstorm.co.uk>
* Source/NSSavePanel.m (createRowsForColumn:): Use * Source/NSSavePanel.m (createRowsForColumn:): Use

View file

@ -391,11 +391,6 @@ NSGraphicsContext *GSCurrentContext()
return NO; return NO;
} }
- (void) _postExternalEvent: (NSEvent *)event
{
[self subclassResponsibility: _cmd];
}
- (void) useFont: (NSString*)name - (void) useFont: (NSString*)name
{ {
if ([self isDrawingToScreen] == YES) if ([self isDrawingToScreen] == YES)

View file

@ -289,12 +289,7 @@ repd_for_rep(NSArray *_reps, NSImageRep *rep)
//_flags.flipDraw = NO; //_flags.flipDraw = NO;
if (aSize.width && aSize.height) if (aSize.width && aSize.height)
{ {
// FIXME: rounding down is just a quick fix. _size = aSize;
// the non-integrality of the image should be
// taken care of in the composite methods in
// the backend.
_size.width = (int) aSize.width;
_size.height = (int) aSize.height;
_flags.sizeWasExplicitlySet = YES; _flags.sizeWasExplicitlySet = YES;
} }
//_flags.usesEPSOnResolutionMismatch = NO; //_flags.usesEPSOnResolutionMismatch = NO;
@ -493,12 +488,7 @@ repd_for_rep(NSArray *_reps, NSImageRep *rep)
- (void) setSize: (NSSize)aSize - (void) setSize: (NSSize)aSize
{ {
// FIXME: the rounding down is just a quick fix _size = aSize;
// it should actually be handled in composite in
// the backend.
_size.width = (int) aSize.width;
_size.height = (int) aSize.height;
_flags.sizeWasExplicitlySet = YES; _flags.sizeWasExplicitlySet = YES;
// TODO: This invalidates any cached data // TODO: This invalidates any cached data
} }

View file

@ -75,10 +75,14 @@ typedef struct {
</p> </p>
<p> <p>
Styles can be set using the user defaults system. Currently available Styles can be set using the user defaults system. Currently available
styles are <code>NSNextStepInterfaceStyle</code>, styles are
<code>NSMacintoshInterfaceStyle</code>, <list>
<code>NSWindows95InterfaceStyle</code>, <item>NSNextStepInterfaceStyle</item>,
<code>GSWindowMakerInterfaceStyle</code>. You can set a default style <item>NSMacintoshInterfaceStyle</item>,
<item>NSWindows95InterfaceStyle</item>,
<item>GSWindowMakerInterfaceStyle</item>.
</list>
You can set a default style
for all UI elements using the <code>NSInterfaceStyleDefault</code> key: for all UI elements using the <code>NSInterfaceStyleDefault</code> key:
<example> <example>
defaults write NSGlobalDomain NSInterfaceStyleDefault GSWindowMakerInterfaceStyle defaults write NSGlobalDomain NSInterfaceStyleDefault GSWindowMakerInterfaceStyle

View file

@ -337,6 +337,11 @@ static NSColor *scrollBarColor = nil;
- (void) setFloatValue: (float)aFloat - (void) setFloatValue: (float)aFloat
{ {
if (_floatValue == aFloat)
{
/* Most likely our trackKnob method initiated this via NSScrollView */
return;
}
if (aFloat < 0) if (aFloat < 0)
{ {
_floatValue = 0; _floatValue = 0;
@ -355,6 +360,11 @@ static NSColor *scrollBarColor = nil;
- (void) setFloatValue: (float)aFloat knobProportion: (float)ratio - (void) setFloatValue: (float)aFloat knobProportion: (float)ratio
{ {
if (_floatValue == aFloat && _knobProportion == ratio)
{
/* Most likely our trackKnob method initiated this via NSScrollView */
return;
}
if (ratio < 0) if (ratio < 0)
{ {
_knobProportion = 0; _knobProportion = 0;