summaryrefslogtreecommitdiffstats
path: root/mac/tkMacButton.c
diff options
context:
space:
mode:
authorericm <ericm>2000-05-10 00:09:38 (GMT)
committerericm <ericm>2000-05-10 00:09:38 (GMT)
commit7ff73db610e3d2efd82c272471c0dfe16d5745b8 (patch)
tree36475aa7b20157ca2cd0fba5339eb61b1484aead /mac/tkMacButton.c
parent5766ce10779959eb0437e49fc4bdb3045982a63d (diff)
downloadtk-7ff73db610e3d2efd82c272471c0dfe16d5745b8.zip
tk-7ff73db610e3d2efd82c272471c0dfe16d5745b8.tar.gz
tk-7ff73db610e3d2efd82c272471c0dfe16d5745b8.tar.bz2
* doc/button.n: Added documentation for link relief.
* tests/button.test: Added tests for link relief for buttons. * generic/tk.h (TK_CONFIG_LINK_OK): Added definition of TK_RELIEF_LINK, TK_OPTION_LINK_OK and TK_CONFIG_LINK_OK. [RFE: 4348] * generic/tk3d.c: Added support for link relief. [RFE: 4348] * mac/tkMacButton.c (TkpDisplayButton): * unix/tkUnixButton.c (TkpDisplayButton): Added support for link relief. [RFE: 4348] * generic/tkOldConfig.c (Tk_ConfigureWidget): * generic/tkConfig.c (DoObjConfig): Added understanding of link relief, which is allowed only for widgets that have TK_OPTION_LINK_OK or TK_CONFIG_LINK_OK set for the "-relief" option. [RFE: 4348] * generic/tkButton.c: Added TK_OPTION_LINK_OK to "-relief" option for buttons. [RFE: 4348] * win/tkWinWm.c (EX_TRANSIENT_STYLE): Removed WS_EX_TOOLWINDOW style bit, so that transient windows have full-size titlebars (like the tk_getOpenFile dialog). * win/tkWinMenu.c (GetMenuSeparatorGeometry): Tweaked height requested for separator bars to be (linespace - (2*descent)) instead of just (linespace); this makes the separator occupy a more correct amount of vertical space. [Bug: 5303].
Diffstat (limited to 'mac/tkMacButton.c')
-rw-r--r--mac/tkMacButton.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/mac/tkMacButton.c b/mac/tkMacButton.c
index ce298ed..dc4ecc1 100644
--- a/mac/tkMacButton.c
+++ b/mac/tkMacButton.c
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkMacButton.c,v 1.10 2000/04/17 02:16:36 jingham Exp $
+ * RCS: @(#) $Id: tkMacButton.c,v 1.11 2000/05/10 00:09:39 ericm Exp $
*/
#include "tkButton.h"
@@ -231,6 +231,19 @@ TkpDisplayButton(
}
/*
+ * LINK relief means that the button has a raised relief when it is
+ * active, and a flat relief otherwise (like toolbar buttons). It
+ * is supported for true buttons only.
+ */
+
+ if ((butPtr->type == TYPE_BUTTON) && butPtr->relief == TK_RELIEF_LINK) {
+ if (butPtr->state == STATE_ACTIVE) {
+ relief = TK_RELIEF_RAISED;
+ } else {
+ relief = TK_RELIEF_FLAT;
+ }
+ }
+ /*
* See the comment in UpdateControlColors as to why we use the
* highlightbackground for the border of Macintosh buttons.
*/