mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-29 21:07:39 +00:00
Patch to left alight long (multi-line) messages
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@24213 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
12af57fe8b
commit
1eefe4bf31
2 changed files with 18 additions and 0 deletions
|
@ -734,6 +734,20 @@ setControl(NSView* content, id control, NSString *title)
|
|||
[messageField removeFromSuperview];
|
||||
}
|
||||
setControl(content, messageField, message);
|
||||
|
||||
/* If the message contains a newline character then align the
|
||||
* message to the left side, as it is quite undesirable for a long
|
||||
* message to appear aligned in the center
|
||||
*/
|
||||
if ([message rangeOfString: @"\n"].location != NSNotFound)
|
||||
{
|
||||
[messageField setAlignment: NSLeftTextAlignment];
|
||||
}
|
||||
else
|
||||
{
|
||||
[messageField setAlignment: NSCenterTextAlignment];
|
||||
}
|
||||
|
||||
setControl(content, defButton, defaultButton);
|
||||
setControl(content, altButton, alternateButton);
|
||||
setControl(content, othButton, otherButton);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue