Skip to content

Commit

Permalink
Add line height option and fix default 1.34 -> 1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
youknowone committed Jun 22, 2012
1 parent 131c2bf commit f9dd509
Show file tree
Hide file tree
Showing 10 changed files with 416 additions and 980 deletions.
1,349 changes: 387 additions & 962 deletions Mac/Resources/en.lproj/PreferencesWindow.xib

Large diffs are not rendered by default.

11 changes: 6 additions & 5 deletions Mac/Sources/PreferencesWindow.h
Expand Up @@ -53,7 +53,7 @@ struct PreferenceItem

// Text box
// Text Box Appearance
IBOutlet NSTextField *textBoxFontTextField, *backgroundImageTextField, *maxLinesTextField;
IBOutlet NSTextField *textBoxFontTextField, *lineHeightTextField, *backgroundImageTextField, *maxLinesTextField;
IBOutlet NSButton *scrollbackStripColorCheckBox;
IBOutlet NSButton *coloredNicksCheckBox, *indentNicksCheckBox, *showSeparatorCheckBox, *stripMircColorCheckBox;
// Transparency Settings
Expand All @@ -62,9 +62,7 @@ struct PreferenceItem
// Time Stamps
IBOutlet NSButton *timeStampCheckBox;
IBOutlet NSTextField *timeStampFormatTextField;
// Command - fe-aqua
IBOutlet NSTextField *urlLinkCommandTextField, *nickLinkCommandTextField, *channelLinkCommandTextField;


// Input box
// Input box
IBOutlet NSButton *inputBoxUseTextBoxFontCheckBox, *spellCheckingCheckBox;
Expand Down Expand Up @@ -106,6 +104,9 @@ struct PreferenceItem
IBOutlet NSButton *showChannelModeButtonsCheckBox;
IBOutlet NSTextField *defaultCharsetTextField; // fe-aqua

// Command - fe-aqua
IBOutlet NSTextField *urlLinkCommandTextField, *nickLinkCommandTextField, *channelLinkCommandTextField;

// Colors
// Text Colors
// Marking Text
Expand Down Expand Up @@ -172,7 +173,7 @@ struct PreferenceItem
IBOutlet NSPopUpButton *autoAcceptDccChatPopUp;
IBOutlet NSButton *autoOpenDccChatCheckBox, *autoOpenDccReceiveCheckBox, *autoOpenDccSendCheckBox;

struct PreferenceItem preferenceItems[96];
struct PreferenceItem preferenceItems[97];
}

- (IBAction)applyPreferences:(id)sender;
Expand Down
7 changes: 4 additions & 3 deletions Mac/Sources/PreferencesWindow.m
Expand Up @@ -181,6 +181,7 @@ - (void) awakeFromNib
{
// Text box
{ textBoxFontTextField, &prefs.font_normal, MYPREF_STRING },
{ lineHeightTextField, &prefs.xa_line_height, MYPREF_INT },
{ backgroundImageTextField, &prefs.background, MYPREF_STRING },
{ maxLinesTextField, &prefs.max_lines, MYPREF_INT },
{ scrollbackStripColorCheckBox, &prefs.text_replay_strip_color, MYPREF_INT },
Expand All @@ -192,9 +193,6 @@ - (void) awakeFromNib
{ transparentSlider, &prefs.tint_red, MYPREF_INT },
{ timeStampCheckBox, &prefs.timestamp, MYPREF_INT },
{ timeStampFormatTextField, &prefs.stamp_format, MYPREF_STRING },
{ urlLinkCommandTextField, &prefs.xa_urlcommand, MYPREF_STRING },
{ nickLinkCommandTextField, &prefs.xa_nickcommand, MYPREF_STRING },
{ channelLinkCommandTextField, &prefs.xa_channelcommand, MYPREF_STRING },
// Input box
{ inputBoxUseTextBoxFontCheckBox, &prefs.style_inputbox, MYPREF_INT },
{ userlistUseTextBoxFontCheckBox, &prefs.style_namelistgad, MYPREF_INT },
Expand Down Expand Up @@ -229,6 +227,9 @@ - (void) awakeFromNib
// Other
{ showChannelModeButtonsCheckBox, &prefs.chanmodebuttons, MYPREF_INT },
{ defaultCharsetTextField, &prefs.xa_default_charset, MYPREF_STRING },
{ urlLinkCommandTextField, &prefs.xa_urlcommand, MYPREF_STRING },
{ nickLinkCommandTextField, &prefs.xa_nickcommand, MYPREF_STRING },
{ channelLinkCommandTextField, &prefs.xa_channelcommand, MYPREF_STRING },
// Colors
// Alerts
{ beepOnChannelCheckBox, &prefs.input_beep_chans, MYPREF_INT },
Expand Down
2 changes: 1 addition & 1 deletion Mac/Sources/XAChatTextView.m
Expand Up @@ -191,7 +191,7 @@ - (void)adjustMargin
NSMutableParagraphStyle *style = self.style = [[[NSMutableParagraphStyle alloc] init] autorelease];
NSTextTab *tabStop = [[[NSTextTab alloc] initWithType:NSRightTabStopType location:indent] autorelease];
[style setTabStops:[NSArray arrayWithObject:tabStop]];
[style setLineHeightMultiple:1.34];
[style setLineHeightMultiple:prefs.xa_line_height / 100.0];

indent += fontSize.width;

Expand Down
1 change: 1 addition & 0 deletions Mac/Sources/XADefaults.h
@@ -1,6 +1,7 @@
prefs.xa_text_manual_indent_chars = 15;
prefs.xa_outline_width = 150;
prefs.xa_partonsleep = 1;
prefs.xa_line_height = 120;
prefs.tab_left_key = 33;
prefs.tab_left_modifiers = 1 << 20 | 1 << 17;
prefs.tab_right_key = 30;
Expand Down
1 change: 1 addition & 0 deletions Mac/Sources/XAPrefs.h
Expand Up @@ -11,6 +11,7 @@ char xa_default_charset[256];
unsigned int xa_outline_width;
unsigned int xa_text_manual_indent_chars;
unsigned int xa_partonsleep;
unsigned int xa_line_height;
long tab_left_key;
long tab_left_modifiers;
long tab_right_key;
Expand Down
1 change: 1 addition & 0 deletions Mac/Sources/XAVars.h
Expand Up @@ -12,6 +12,7 @@
{"outline_width", P_OFFINT (xa_outline_width), TYPE_INT},
{"text_manual_indent_chars", P_OFFINT (xa_text_manual_indent_chars), TYPE_INT},
{"part_on_sleep", P_OFFINT (xa_partonsleep), TYPE_INT},
{"line_height", P_OFFINT (xa_line_height), TYPE_INT},
{"tab_left_key", P_OFFINT (tab_left_key), TYPE_INT},
{"tab_left_modifiers", P_OFFINT (tab_left_modifiers), TYPE_INT},
{"tab_right_key", P_OFFINT (tab_right_key), TYPE_INT},
Expand Down
8 changes: 5 additions & 3 deletions tools/localization/strings/de/xib.strings
Expand Up @@ -91,11 +91,10 @@
"Show Prefs Files" = "Zeige Konfigurations Dateien";
/* Interface */
/* Text box */
"Line height:" = "Line height:";
"Strip scrollback color" = "Strip scrollback color";
"Transparency:" = "Transparent:";
"Transparent Windows" = "Transparente Fenster";
"Nick link command:" = "Nick link command:";
"URL link command:" = "URL link command:";
"Channel link command:" = "Channel link command:";
"Show separator" = "Zeige Separator";
"Strip mIRC color" = "mIRC Farben herausfiltern";
/* Input box */
Expand All @@ -116,6 +115,9 @@
"Show channel mode buttons" = "Zeige Channel-Mode Knöpfe";
"Default character set:" = "Standard Zeichensatz:";
"(Change takes effect at next launch)" = "(Zeigt nach dem nächten Neustart Wirkung)";
"Nick link command:" = "Nick link command:";
"URL link command:" = "URL link command:";
"Channel link command:" = "Channel link command:";
/* Colors */
"Load Default Colors" = "Load Default Colors";
"Load From File..." = "Load From File...";
Expand Down
8 changes: 5 additions & 3 deletions tools/localization/strings/en/xib.strings
Expand Up @@ -92,13 +92,12 @@
"Show Prefs Files" = "Show Prefs Files";
/* Interface */
/* Text box */
"Line height:" = "Line height:";
"Strip scrollback color" = "Strip scrollback color";
"Show separator" = "Show separator";
"Strip mIRC color" = "Strip mIRC color";
"Transparency:" = "Transparency:";
"Transparent Windows" = "Transparent Windows";
"Nick link command:" = "Nick link command:";
"URL link command:" = "URL link command:";
"Channel link command:" = "Channel link command:";
/* Input box */
"Suffix style nick completion" = "Suffix style nick completion";
"Scroll tab-key completion choices" = "Scroll tab-key completion choices";
Expand All @@ -116,6 +115,9 @@
"Show channel mode buttons" = "Show channel mode buttons";
"Default character set:" = "Default character set:";
"(Change takes effect at next launch)" = "(Change takes effect at next launch)";
"Nick link command:" = "Nick link command:";
"URL link command:" = "URL link command:";
"Channel link command:" = "Channel link command:";
/* Colors */
"Load Default Colors" = "Load Default Colors";
"Load From File..." = "Load From File...";
Expand Down
8 changes: 5 additions & 3 deletions tools/localization/strings/ko/xib.strings
Expand Up @@ -93,11 +93,10 @@
"Show Prefs Files" = "설정 파일 보기";
/* Interface */
/* Text box */
"Line height:" = "줄 간격:";
"Strip scrollback color" = "불러 온 로그 색 무시";
"Transparency:" = "투영도:";
"Transparent Windows" = "반투명 창";
"Nick link command:" = "필명 링크 명령:";
"URL link command:" = "URL 링크 명령:";
"Channel link command:" = "대화방 링크 명령:";
"Show separator" = "분리선 보이기";
"Strip mIRC color" = "mIRC 색 무시";
/* Input box */
Expand All @@ -118,6 +117,9 @@
"Show channel mode buttons" = "채널 모드 단추 보이기";
"Default character set:" = "기본 문자셋:";
"(Change takes effect at next launch)" = "(바뀐 내용은 다음 실행 때 적용)";
"Nick link command:" = "필명 링크 명령:";
"URL link command:" = "URL 링크 명령:";
"Channel link command:" = "대화방 링크 명령:";
/* Colors */
"Load Default Colors" = "기본 색상 불러오기";
"Load From File..." = "파일에서 불러오기...";
Expand Down

0 comments on commit f9dd509

Please sign in to comment.