# HG changeset patch # User bsmith@81767d24-ef19-dc11-ae90-00e081727c95 # Date 1300407946 0 # Node ID 2cace4e6e69a31769e4ad3ce224c82d052e1881e # Parent 2aaa3f67cfb174707cb466803a9b5c3180ffac6d Added DW_BS_NOBORDER style which can be set on buttons with dw_window_set_style() to make them flat. diff -r 2aaa3f67cfb1 -r 2cace4e6e69a dw.h --- a/dw.h Thu Mar 17 23:58:33 2011 +0000 +++ b/dw.h Fri Mar 18 00:25:46 2011 +0000 @@ -165,6 +165,8 @@ #define DW_POINTER_CLOCK SPTR_WAIT #define DW_POINTER_QUESTION SPTR_ICONQUESICON +#define DW_BS_NOBORDER BS_NOBORDER + #define DW_OS2_NEW_WINDOW 1 /* flag values for dw_messagebox() */ @@ -370,11 +372,9 @@ #define DW_LIT_NONE -1 -#ifdef MLFSEARCH_CASESENSITIVE -# define DW_MLE_CASESENSITIVE MLFSEARCH_CASESENSITIVE -#else -# define DW_MLE_CASESENSITIVE 0 -#endif +#define DW_MLE_CASESENSITIVE 0 + +#define DW_BS_NOBORDER 1 #define DW_POINTER_DEFAULT 0 #define DW_POINTER_ARROW 1 @@ -556,6 +556,8 @@ #define DW_MLE_CASESENSITIVE 1 +#define DW_BS_NOBORDER BS_FLAT + #define DW_POINTER_DEFAULT 0 #define DW_POINTER_ARROW 32512 #define DW_POINTER_CLOCK 32514 @@ -853,6 +855,8 @@ # define DW_MLE_CASESENSITIVE 0 #endif +#define DW_BS_NOBORDER 1 + #define DW_POINTER_DEFAULT 0 #define DW_POINTER_ARROW 0 #define DW_POINTER_CLOCK 0 @@ -1033,6 +1037,8 @@ #define DW_MLE_CASESENSITIVE 1 +#define DW_BS_NOBORDER 1 + #define DW_POINTER_DEFAULT 0 #define DW_POINTER_ARROW GDK_TOP_LEFT_ARROW #define DW_POINTER_CLOCK GDK_WATCH diff -r 2aaa3f67cfb1 -r 2cace4e6e69a mac/dw.m --- a/mac/dw.m Thu Mar 17 23:58:33 2011 +0000 +++ b/mac/dw.m Fri Mar 18 00:25:46 2011 +0000 @@ -2653,8 +2653,6 @@ if(image) { [button setImage:image]; - [button setButtonType:NSMomentaryLight]; - [button setBordered:NO]; } [button setToolTip:[NSString stringWithUTF8String:text]]; [image release]; @@ -2683,8 +2681,6 @@ if(image) { [button setImage:image]; - [button setButtonType:NSMomentaryLight]; - [button setBordered:NO]; } [button setToolTip:[NSString stringWithUTF8String:text]]; [image release]; @@ -2708,8 +2704,6 @@ if(image) { [button setImage:image]; - [button setButtonType:NSMomentaryLight]; - [button setBordered:NO]; } [button setToolTip:[NSString stringWithUTF8String:text]]; [image release]; @@ -5930,6 +5924,24 @@ NSTextView *tv = handle; [tv setAlignment:(style & mask)]; } + else if([object isMemberOfClass:[DWButton class]]) + { + DWButton *button = handle; + + if(mask & DW_BS_NOBORDER) + { + if(style & DW_BS_NOBORDER) + { + [button setButtonType:NSMomentaryLight]; + [button setBordered:NO]; + } + else + { + [button setButtonType:NSMomentaryPushInButton]; + [button setBordered:YES]; + } + } + } } /*