* Source/NSCell.m (-highlight:withFrame:inView:):

Remove call to [controlView displayRect: cellFrame];
There was a comment saying it should be removed, and when
combined with the -[NSButtonCell isOpaque] change, it
was casuing scroller buttons to stay "stuck" down.
* Source/NSBrowser.m (-isOpaque):
* Source/NSButtonCell.m (-isOpaque):
* Source/NSColorWell.m (-isOpaque):
Force -isOpaque to return NO, because it's
possible to make all of these controls semitransparent with
theme tiles. This was visible with the Narcissus theme
(svn://svn.gna.org/svn/etoile/trunk/Etoile/Themes/Narcissus.theme)


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@37164 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Eric Wasylishen 2013-09-28 21:38:29 +00:00
parent d3a8560cc5
commit ef5f2cf19f
5 changed files with 33 additions and 8 deletions

View file

@ -1,3 +1,18 @@
2013-09-28 Eric Wasylishen <ewasylishen@gmail.com>
* Source/NSCell.m (-highlight:withFrame:inView:):
Remove call to [controlView displayRect: cellFrame];
There was a comment saying it should be removed, and when
combined with the -[NSButtonCell isOpaque] change, it
was casuing scroller buttons to stay "stuck" down.
* Source/NSBrowser.m (-isOpaque):
* Source/NSButtonCell.m (-isOpaque):
* Source/NSColorWell.m (-isOpaque):
Force -isOpaque to return NO, because it's
possible to make all of these controls semitransparent with
theme tiles. This was visible with the Narcissus theme
(svn://svn.gna.org/svn/etoile/trunk/Etoile/Themes/Narcissus.theme)
2013-09-28 Eric Wasylishen <ewasylishen@gmail.com>
* Source/GSThemeDrawing.m: Add GSScrollerDefaultWidth user default

View file

@ -2850,7 +2850,9 @@ static NSTextFieldCell *titleCell;
- (BOOL) isOpaque
{
return YES; // See drawRect.
// NSBrowser used to be opaque but may not be due to themes;
// e.g. if the header tile images are not opaque.
return NO;
}
@end

View file

@ -679,14 +679,15 @@ typedef struct _GSButtonCellFlags
_buttoncell_is_transparent = flag;
}
/**<p>Returns whether the NSButtonCell is opaque. Returns YES if the button
cell is not transparent and if the cell is bordered and if there is no
bezel style, NO otherwise</p>
*/
/**<p>Returns whether the NSButtonCell is opaque. Currently always
returns NO</p>*/
- (BOOL) isOpaque
{
return !_buttoncell_is_transparent && _cell.is_bordered &&
_bezel_style == 0;
// May not be opaque, due to themes
return NO;
// return !_buttoncell_is_transparent && _cell.is_bordered &&
// _bezel_style == 0;
}
- (NSBezelStyle) bezelStyle

View file

@ -2096,6 +2096,11 @@ static NSColor *dtxtCol;
if (_cell.is_highlighted != lit)
{
_cell.is_highlighted = lit;
// Disabling this because when combined with making
// -[NSButtonCell isOpaque] return NO, it was causing scroller buttons
// to stay stuck down. --Eric (2013-09-28)
#if 0
/*
* NB: This has a visible effect only if subclasses override
* drawWithFrame:inView: to draw something special when the
@ -2116,6 +2121,7 @@ static NSColor *dtxtCol;
*/
[controlView displayRect: cellFrame];
}
#endif
[self drawWithFrame: cellFrame inView: controlView];
}
}

View file

@ -305,7 +305,8 @@ static NSString *GSColorWellDidBecomeExclusiveNotification =
- (BOOL) isOpaque
{
return _is_bordered;
// May not be opaque, due to themes
return NO;
}
- (void) mouseDown: (NSEvent *)theEvent