[webkit-changes] cvs commit: WebCore/khtml/rendering
render_theme_mac.mm
David
hyatt at opensource.apple.com
Fri Oct 28 04:24:39 PDT 2005
hyatt 05/10/28 04:24:39
Modified: khtml/rendering render_theme_mac.mm
Log:
Adjust the padding of mini buttons down from 11px to 8px so that they fit better in small spaces.
Revision Changes Path
1.15 +6 -14 WebCore/khtml/rendering/render_theme_mac.mm
Index: render_theme_mac.mm
===================================================================
RCS file: /cvs/root/WebCore/khtml/rendering/render_theme_mac.mm,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- render_theme_mac.mm 28 Oct 2005 07:03:26 -0000 1.14
+++ render_theme_mac.mm 28 Oct 2005 11:24:38 -0000 1.15
@@ -372,20 +372,12 @@
void RenderThemeMac::setButtonPaddingFromControlSize(RenderStyle* style, NSControlSize size) const
{
- // More magical mystery constants designed to match what NSButtonCell does by default with push-in buttons.
- int padding;
- switch (size) {
- default: // needed to make stupid compiler happy
- case NSRegularControlSize:
- padding = 8;
- break;
- case NSSmallControlSize:
- padding = 8;
- break;
- case NSMiniControlSize:
- padding = 11;
- break;
- }
+ // Just use 8px. AppKit wants to use 11px for mini buttons, but that padding is just too large
+ // for real-world Web sites (creating a huge necessary minimum width for buttons whose space is
+ // by definition constrained, since we select mini only for small cramped environments.
+ // This also guarantees the HTML4 <button> will match our rendering by default, since we're using a consistent
+ // padding.
+ const int padding = 8;
style->setPaddingLeft(Length(padding, Fixed));
style->setPaddingRight(Length(padding, Fixed));
style->setPaddingTop(Length(0, Fixed));
More information about the webkit-changes
mailing list