adium/adium

343579387a75
Fix the alignment of buttons in Status preferences when localizing.
--- 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)];