gnustep / libs-gui

The GNUstep gui library is a library of graphical user interface classes written completely in the Objective-C language; the classes are based upon Apple's Cocoa framework (which came from the OpenStep specification). *** Larger patches require copyright assignment to FSF. please file bugs here. ***
http://www.gnustep.org
GNU General Public License v3.0
279 stars 103 forks source link

NSRoundedDisclosure ... not reporting an appropiate state #226

Closed optimisme closed 11 months ago

optimisme commented 11 months ago

The only accepted states of NSRoundedDisclosureBezelStyle and NSDisclosureBezelStyle are

enum { 
  NSMixedState          = -1,
  NSOffState            = 0,
  NSOnState         = 1
};

But theme function

- (void) drawButton: (NSRect)frame 
                 in: (NSCell*)cell 
               view: (NSView*)view 
              style: (int)style 
              state: (GSThemeControlState)state

Is reporting values such as 4 and 6 instead of -1, 0, 1

optimisme commented 11 months ago

Sorry I was not reading the state from the cell