mirror of https://github.com/odrling/Aegisub
Make default script resolution customizable
Originally committed to SVN as r6205.
This commit is contained in:
parent
6b85782dc5
commit
0fd475031a
|
@ -38,6 +38,7 @@
|
||||||
#ifndef AGI_PRE
|
#ifndef AGI_PRE
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
|
#include <inttypes.h>
|
||||||
#include <list>
|
#include <list>
|
||||||
|
|
||||||
#include <wx/filename.h>
|
#include <wx/filename.h>
|
||||||
|
@ -439,6 +440,10 @@ void AssFile::LoadDefault(bool defline) {
|
||||||
AddLine("WrapStyle: 0", "[Script Info]",version);
|
AddLine("WrapStyle: 0", "[Script Info]",version);
|
||||||
AddLine("ScaledBorderAndShadow: yes","[Script Info]",version);
|
AddLine("ScaledBorderAndShadow: yes","[Script Info]",version);
|
||||||
AddLine("Collisions: Normal","[Script Info]",version);
|
AddLine("Collisions: Normal","[Script Info]",version);
|
||||||
|
if (!OPT_GET("Subtitle/Default Resolution/Auto")->GetBool()) {
|
||||||
|
AddLine(wxString::Format("PlayResX: %" PRId64, OPT_GET("Subtitle/Default Resolution/Width")->GetInt()),"[Script Info]",version);
|
||||||
|
AddLine(wxString::Format("PlayResY: %" PRId64, OPT_GET("Subtitle/Default Resolution/Height")->GetInt()),"[Script Info]",version);
|
||||||
|
}
|
||||||
AddLine("","[Script Info]",version);
|
AddLine("","[Script Info]",version);
|
||||||
AddLine("[V4+ Styles]","[V4+ Styles]",version);
|
AddLine("[V4+ Styles]","[V4+ Styles]",version);
|
||||||
AddLine("Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, OutlineColour, BackColour, Bold, Italic, Underline, StrikeOut, ScaleX, ScaleY, Spacing, Angle, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, Encoding","[V4+ Styles]",version);
|
AddLine("Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, OutlineColour, BackColour, Bold, Italic, Underline, StrikeOut, ScaleX, ScaleY, Spacing, Angle, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, Encoding","[V4+ Styles]",version);
|
||||||
|
|
|
@ -346,6 +346,11 @@
|
||||||
},
|
},
|
||||||
|
|
||||||
"Subtitle" : {
|
"Subtitle" : {
|
||||||
|
"Default Resolution" : {
|
||||||
|
"Auto" : true,
|
||||||
|
"Height" : 720,
|
||||||
|
"Width" : 1280
|
||||||
|
},
|
||||||
"Edit Box" : {
|
"Edit Box" : {
|
||||||
"Font Face" : "",
|
"Font Face" : "",
|
||||||
"Font Size" : 10,
|
"Font Size" : 10,
|
||||||
|
|
|
@ -185,10 +185,6 @@ Video::Video(wxTreebook *book, Preferences *parent): OptionPage(book, parent, _(
|
||||||
OptionAdd(general, _("Seek video to line start on selection change"), "Video/Subtitle Sync");
|
OptionAdd(general, _("Seek video to line start on selection change"), "Video/Subtitle Sync");
|
||||||
CellSkip(general);
|
CellSkip(general);
|
||||||
|
|
||||||
const wxString cres_arr[3] = { _("Never"), _("Ask"), _("Always") };
|
|
||||||
wxArrayString choice_res(3, cres_arr);
|
|
||||||
OptionChoice(general, _("Match video resolution on open"), choice_res, "Video/Check Script Res");
|
|
||||||
|
|
||||||
const wxString czoom_arr[24] = { "12.5%", "25%", "37.5%", "50%", "62.5%", "75%", "87.5%", "100%", "112.5%", "125%", "137.5%", "150%", "162.5%", "175%", "187.5%", "200%", "212.5%", "225%", "237.5%", "250%", "262.5%", "275%", "287.5%", "300%" };
|
const wxString czoom_arr[24] = { "12.5%", "25%", "37.5%", "50%", "62.5%", "75%", "87.5%", "100%", "112.5%", "125%", "137.5%", "150%", "162.5%", "175%", "187.5%", "200%", "212.5%", "225%", "237.5%", "250%", "262.5%", "275%", "287.5%", "300%" };
|
||||||
wxArrayString choice_zoom(24, czoom_arr);
|
wxArrayString choice_zoom(24, czoom_arr);
|
||||||
OptionChoice(general, _("Default Zoom"), choice_zoom, "Video/Default Zoom");
|
OptionChoice(general, _("Default Zoom"), choice_zoom, "Video/Default Zoom");
|
||||||
|
@ -199,6 +195,16 @@ Video::Video(wxTreebook *book, Preferences *parent): OptionPage(book, parent, _(
|
||||||
wxArrayString scr_res(3, cscr_arr);
|
wxArrayString scr_res(3, cscr_arr);
|
||||||
OptionChoice(general, _("Screenshot save path"), scr_res, "Path/Screenshot");
|
OptionChoice(general, _("Screenshot save path"), scr_res, "Path/Screenshot");
|
||||||
|
|
||||||
|
wxFlexGridSizer *resolution = PageSizer(_("Script Resolution"));
|
||||||
|
OptionAdd(resolution, _("Use resolution of first video opened"), "Subtitle/Default Resolution/Auto");
|
||||||
|
CellSkip(resolution);
|
||||||
|
OptionAdd(resolution, _("Default width"), "Subtitle/Default Resolution/Width");
|
||||||
|
OptionAdd(resolution, _("Default height"), "Subtitle/Default Resolution/Height");
|
||||||
|
|
||||||
|
const wxString cres_arr[3] = { _("Never"), _("Ask"), _("Always") };
|
||||||
|
wxArrayString choice_res(3, cres_arr);
|
||||||
|
OptionChoice(resolution, _("Match video resolution on open"), choice_res, "Video/Check Script Res");
|
||||||
|
|
||||||
SetSizerAndFit(sizer);
|
SetSizerAndFit(sizer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue