Tk Source Code

Check-in [63db5a97]
Login
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to [email protected]
or submit via the online form by Sep 9.

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Add padding to HITheme menubuttons
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | core-8-5-branch
Files: files | file ages | folders
SHA1: 63db5a97c7571844626b7f7a1585ecd2c3b734d0
User & Date: kevin_walzer 2015-02-19 16:02:34
Context
2015-02-19
21:27
Fix build problem on OSX check-in: 1c4be30c user: jan.nijtmans tags: core-8-5-branch
16:02
merge mark check-in: 887e3968 user: kevin_walzer tags: trunk
16:02
Add padding to HITheme menubuttons check-in: 63db5a97 user: kevin_walzer tags: core-8-5-branch
15:57
Fix for Cocoa scrollbar appearance on 10.6 check-in: 28d86631 user: kevin_walzer tags: core-8-5-branch
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to macosx/tkMacOSXMenubutton.c.

535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
                        pixmap, dpPtr->gc,
                        0, 0, (unsigned int) width,
                        (unsigned int) height,
                        imageXOffset, imageYOffset, 1);
                XSetClipOrigin(butPtr->display, dpPtr->gc, 0, 0);
            }
        } else {
	  /*Move x back by six pixels to give the menubutton arrows room.*/
	  int x = 0;
	  int y;
	  textXOffset = 6;
	    TkComputeAnchor(butPtr->anchor, tkwin, butPtr->padX, butPtr->padY,
			    butPtr->textWidth, butPtr->textHeight, &x, &y);
	    Tk_DrawTextLayout(butPtr->display, pixmap, dpPtr->gc,
			      butPtr->textLayout, x - textXOffset, y, 0, -1);
	    y += butPtr->textHeight/2;
	  }
   }






|


|







535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
                        pixmap, dpPtr->gc,
                        0, 0, (unsigned int) width,
                        (unsigned int) height,
                        imageXOffset, imageYOffset, 1);
                XSetClipOrigin(butPtr->display, dpPtr->gc, 0, 0);
            }
        } else {
	  /*Move x back by eight pixels to give the menubutton arrows room.*/
	  int x = 0;
	  int y;
	  textXOffset = 8;
	    TkComputeAnchor(butPtr->anchor, tkwin, butPtr->padX, butPtr->padY,
			    butPtr->textWidth, butPtr->textHeight, &x, &y);
	    Tk_DrawTextLayout(butPtr->display, pixmap, dpPtr->gc,
			      butPtr->textLayout, x - textXOffset, y, 0, -1);
	    y += butPtr->textHeight/2;
	  }
   }