NSScroller: define scroller styles

As of macOS 10.7, scrollers gained two types: Legacy and Overlay. Here,
we define these styles as well as a method to determine which is the
"default" style to be used.
This commit is contained in:
Daniel Ferreira 2017-07-18 03:42:40 +10:00 committed by Ivan Vučica
parent e85a1a0664
commit fcb11edca8
2 changed files with 30 additions and 0 deletions

View file

@ -49,6 +49,9 @@
#import "GNUstepGUI/GSTheme.h"
NSString *NSPreferredScrollerStyleDidChangeNotification =
@"NSPreferredScrollerStyleDidChangeNotification";
/**<p>TODO Description</p>
*/
@implementation NSScroller
@ -130,6 +133,12 @@ static float buttonsOffset = 1.0; // buttonsWidth = sw - 2*buttonsOffset
return scrollerWidth;
}
+ (NSScrollerStyle)preferredScrollerStyle
{
// FIXME: a theme should define this?
return NSScrollerStyleLegacy;
}
- (BOOL) isFlipped
{
return YES;