adium 5314:343579387a75: Fix the alignment of buttons in Status ...
commits at adium.im
commits at adium.im
Wed Feb 13 16:46:45 UTC 2013
details: http://hg.adium.im/adium/rev/343579387a75
revision: 5314:343579387a75
branch: adium-1.6
author: Frank Dowsett <wixardy at adium.im>
date: Wed Feb 13 11:46:21 2013 -0500
Fix the alignment of buttons in Status preferences when localizing.
diffs (32 lines):
diff -r 761ce98364a4 -r 343579387a75 Source/ESStatusPreferences.m
--- a/Source/ESStatusPreferences.m Wed Feb 13 14:11:03 2013 +0100
+++ b/Source/ESStatusPreferences.m Wed Feb 13 11:46:21 2013 -0500
@@ -138,8 +138,26 @@
[tabItem_status setLabel:AILocalizedString(@"Saved Statuses", nil)];
[tabItem_settings setLabel:AILocalizedString(@"Settings", nil)];
- [button_addGroup setLocalizedString:AILocalizedString(@"Add Group", nil)];
- [button_editState setLocalizedString:AILocalizedString(@"Edit", nil)];
+ {
+ NSRect newFrame, oldFrame;
+ oldFrame = [button_addGroup frame];
+ [button_addGroup setTitle:AILocalizedString(@"Add Group", nil)];
+ [button_addGroup sizeToFit];
+ newFrame = [button_addGroup frame];
+ if (newFrame.size.width < oldFrame.size.width) newFrame.size.width = oldFrame.size.width;
+ newFrame.origin.x = oldFrame.origin.x;
+ [button_addGroup setFrame:newFrame];
+ }
+ {
+ NSRect newFrame, oldFrame;
+ oldFrame = [button_editState frame];
+ [button_editState setTitle:AILocalizedStringFromTable(@"Edit", @"Buttons", "Verb 'edit' on a button")];
+ [button_editState sizeToFit];
+ newFrame = [button_editState frame];
+ if (newFrame.size.width < oldFrame.size.width) newFrame.size.width = oldFrame.size.width;
+ newFrame.origin.x = oldFrame.origin.x + oldFrame.size.width - newFrame.size.width;
+ [button_editState setFrame:newFrame];
+ }
[checkBox_idle setLocalizedString:AILocalizedString(@"Set idle after", nil)];
[label_inactivity setLocalizedString:AILocalizedString(@"minutes of inactivity", nil)];
More information about the commits
mailing list