mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 20:50:48 +00:00
Updated for changings in ivars
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@5489 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
48413f333b
commit
130e96bfea
1 changed files with 12 additions and 10 deletions
|
@ -62,8 +62,8 @@
|
||||||
_target = nil;
|
_target = nil;
|
||||||
_highlightsByMask = NSChangeBackgroundCellMask;
|
_highlightsByMask = NSChangeBackgroundCellMask;
|
||||||
_showAltStateMask = NSNoCellMask;
|
_showAltStateMask = NSNoCellMask;
|
||||||
_image_position = NSNoImage;
|
_cell.image_position = NSNoImage;
|
||||||
_text_align = NSLeftTextAlignment;
|
_cell.text_align = NSLeftTextAlignment;
|
||||||
|
|
||||||
_drawMethods[0] = (DrawingIMP)
|
_drawMethods[0] = (DrawingIMP)
|
||||||
[self methodForSelector:@selector(drawStateImageWithFrame:inView:)];
|
[self methodForSelector:@selector(drawStateImageWithFrame:inView:)];
|
||||||
|
@ -94,7 +94,8 @@
|
||||||
if (mcell_highlighted != flag)
|
if (mcell_highlighted != flag)
|
||||||
{
|
{
|
||||||
// Save last view drawn to
|
// Save last view drawn to
|
||||||
[self setControlView: controlView];
|
if (_control_view != controlView)
|
||||||
|
_control_view = controlView;
|
||||||
|
|
||||||
[controlView lockFocus];
|
[controlView lockFocus];
|
||||||
|
|
||||||
|
@ -253,7 +254,7 @@
|
||||||
cellFrame.origin.x += [mcell_menuView stateImageWidth]
|
cellFrame.origin.x += [mcell_menuView stateImageWidth]
|
||||||
+ 2 * [mcell_menuView horizontalEdgePadding];
|
+ 2 * [mcell_menuView horizontalEdgePadding];
|
||||||
|
|
||||||
switch (_image_position)
|
switch (_cell.image_position)
|
||||||
{
|
{
|
||||||
case NSNoImage:
|
case NSNoImage:
|
||||||
cellFrame = NSZeroRect;
|
cellFrame = NSZeroRect;
|
||||||
|
@ -312,7 +313,7 @@
|
||||||
cellFrame.origin.x += [mcell_menuView stateImageWidth]
|
cellFrame.origin.x += [mcell_menuView stateImageWidth]
|
||||||
+ 2 * [mcell_menuView horizontalEdgePadding];
|
+ 2 * [mcell_menuView horizontalEdgePadding];
|
||||||
|
|
||||||
switch (_image_position)
|
switch (_cell.image_position)
|
||||||
{
|
{
|
||||||
case NSNoImage:
|
case NSNoImage:
|
||||||
case NSImageOverlaps:
|
case NSImageOverlaps:
|
||||||
|
@ -464,10 +465,11 @@
|
||||||
- (void) drawWithFrame: (NSRect)cellFrame inView: (NSView*)controlView
|
- (void) drawWithFrame: (NSRect)cellFrame inView: (NSView*)controlView
|
||||||
{
|
{
|
||||||
// Save last view drawn to
|
// Save last view drawn to
|
||||||
[self setControlView: controlView];
|
if (_control_view != controlView)
|
||||||
|
_control_view = controlView;
|
||||||
|
|
||||||
// Transparent buttons never draw
|
// Transparent buttons never draw
|
||||||
if (_is_transparent)
|
if (_buttoncell_is_transparent)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Do nothing if cell's frame rect is zero
|
// Do nothing if cell's frame rect is zero
|
||||||
|
@ -492,7 +494,7 @@
|
||||||
NSColor *backgroundColor = nil;
|
NSColor *backgroundColor = nil;
|
||||||
|
|
||||||
// Transparent buttons never draw
|
// Transparent buttons never draw
|
||||||
if (_is_transparent)
|
if (_buttoncell_is_transparent)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
cellFrame = [self drawingRectForBounds: cellFrame];
|
cellFrame = [self drawingRectForBounds: cellFrame];
|
||||||
|
@ -503,7 +505,7 @@
|
||||||
PStranslate(1., [controlView isFlipped] ? 1. : -1.);
|
PStranslate(1., [controlView isFlipped] ? 1. : -1.);
|
||||||
|
|
||||||
// Determine the background color
|
// Determine the background color
|
||||||
if (_cell_state)
|
if (_cell.state)
|
||||||
{
|
{
|
||||||
if (_showAltStateMask
|
if (_showAltStateMask
|
||||||
& (NSChangeGrayCellMask | NSChangeBackgroundCellMask) )
|
& (NSChangeGrayCellMask | NSChangeBackgroundCellMask) )
|
||||||
|
@ -538,7 +540,7 @@
|
||||||
else
|
else
|
||||||
mask = _showAltStateMask;
|
mask = _showAltStateMask;
|
||||||
if (mask & NSContentsCellMask)
|
if (mask & NSContentsCellMask)
|
||||||
showAlternate = _cell_state;
|
showAlternate = _cell.state;
|
||||||
|
|
||||||
if (mcell_highlighted || showAlternate)
|
if (mcell_highlighted || showAlternate)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue