diff options
-rw-r--r-- | library/ttk/aquaTheme.tcl | 3 | ||||
-rw-r--r-- | macosx/ttkMacOSXTheme.c | 13 |
2 files changed, 11 insertions, 5 deletions
diff --git a/library/ttk/aquaTheme.tcl b/library/ttk/aquaTheme.tcl index 182af76..f83a710 100644 --- a/library/ttk/aquaTheme.tcl +++ b/library/ttk/aquaTheme.tcl @@ -26,8 +26,7 @@ namespace eval ttk::theme::aqua { !focus systemDialogActiveText} # Buttons -# ttk::style configure TButton -anchor center -width -6 \ - ttk::style configure TButton -anchor center \ + ttk::style configure TButton -anchor center -width -6 \ -foreground systemControlTextColor ttk::style map TButton \ -foreground { diff --git a/macosx/ttkMacOSXTheme.c b/macosx/ttkMacOSXTheme.c index f1281c2..4fd506b 100644 --- a/macosx/ttkMacOSXTheme.c +++ b/macosx/ttkMacOSXTheme.c @@ -814,12 +814,19 @@ static void ButtonElementMinSize( /* * The theme height does not include the 1-pixel border around * the button, although it does include the 1-pixel shadow at - * the bottom. The corner radius is 4, so 8 is a reasonable - * minimum width. + * the bottom. */ *minHeight += 2; - *minWidth = 8; + + /* + * The minwidth must be 0 to force the generic ttk code to compute + * the correct text layout. For example, a non-zero value will cause the + * text to be left justified, no matter what -anchor setting is used + * in the style. + */ + + *minWidth = 0; } } |