1
0
Fork 0
mirror of https://github.com/geometer/FBReaderJ.git synced 2025-10-03 17:59:33 +02:00

text-decoration, font-weight, font-style, hyphens, text-align settings

This commit is contained in:
Nikolay Pultsin 2014-06-07 02:50:00 +01:00
parent 274fd03e54
commit 184865deae
33 changed files with 584 additions and 714 deletions

View file

@ -256,32 +256,6 @@ public class PreferenceActivity extends ZLPreferenceActivity {
final Screen moreStylesScreen = textScreen.createPreferenceScreen("more");
/*
final Screen formatScreen = moreStylesScreen.createPreferenceScreen(decoration.Name);
formatScreen.addPreference(new ZLBoolean3Preference(
this, textScreen.Resource, "bold",
decoration.BoldOption
));
formatScreen.addPreference(new ZLBoolean3Preference(
this, textScreen.Resource, "italic",
decoration.ItalicOption
));
formatScreen.addPreference(new ZLBoolean3Preference(
this, textScreen.Resource, "underlined",
decoration.UnderlineOption
));
formatScreen.addPreference(new ZLBoolean3Preference(
this, textScreen.Resource, "strikedThrough",
decoration.StrikeThroughOption
));
final String[] allAlignments = { "unchanged", "left", "right", "center", "justify" };
formatScreen.addPreference(new ZLChoicePreference(
this, textScreen.Resource, "alignment",
decoration.AlignmentOption, allAlignments
));
formatScreen.addPreference(new ZLBoolean3Preference(
this, textScreen.Resource, "allowHyphenations",
decoration.AllowHyphenationsOption
));
final ZLIntegerOption spacePercentOption = decoration.LineSpacePercentOption;
final int[] spacingValues = new int[17];
final String[] spacingKeys = new String[17];
@ -309,10 +283,31 @@ public class PreferenceActivity extends ZLPreferenceActivity {
StringPreference.Constraint.POSITIVE_LENGTH,
textScreen.Resource, "fontSize"
));
//public final ZLStringOption FontWeightOption;
//public final ZLStringOption FontStyleOption;
//public final ZLStringOption TextDecorationOption;
//public final ZLStringOption HyphenationOption;
ngScreen.addPreference(new ZLStringChoicePreference(
this, textScreen.Resource, "bold",
description.FontWeightOption,
new String[] { "inherit", "normal", "bold" }
));
ngScreen.addPreference(new ZLStringChoicePreference(
this, textScreen.Resource, "italic",
description.FontStyleOption,
new String[] { "inherit", "normal", "italic" }
));
ngScreen.addPreference(new ZLStringChoicePreference(
this, textScreen.Resource, "textDecoration",
description.TextDecorationOption,
new String[] { "inherit", "none", "underline", "line-through" }
));
ngScreen.addPreference(new ZLStringChoicePreference(
this, textScreen.Resource, "allowHyphenations",
description.HyphenationOption,
new String[] { "inherit", "none", "auto" }
));
ngScreen.addPreference(new ZLStringChoicePreference(
this, textScreen.Resource, "alignment",
description.AlignmentOption,
new String[] { "inherit", "left", "right", "center", "justify" }
));
ngScreen.addPreference(new StringPreference(
this, description.MarginTopOption,
StringPreference.Constraint.LENGTH,
@ -338,7 +333,6 @@ public class PreferenceActivity extends ZLPreferenceActivity {
StringPreference.Constraint.LENGTH,
textScreen.Resource, "firstLineIndent"
));
//public final ZLStringOption AlignmentOption;
ngScreen.addPreference(new StringPreference(
this, description.VerticalAlignOption,
StringPreference.Constraint.LENGTH,