From: Carl Hetherington Date: Tue, 28 Feb 2023 20:45:23 +0000 (+0100) Subject: Move some settings to new non-standard page. X-Git-Tag: v2.16.45~5 X-Git-Url: https://git.carlh.net/gitweb/?p=dcpomatic.git;a=commitdiff_plain;h=3b9be2ddfbfbb8ad0ae591ae90d93835ea42bf9f Move some settings to new non-standard page. --- diff --git a/graphics/osx/preferences/non_standard@2x_black.png b/graphics/osx/preferences/non_standard@2x_black.png new file mode 100644 index 000000000..8c4c8f3b3 Binary files /dev/null and b/graphics/osx/preferences/non_standard@2x_black.png differ diff --git a/graphics/osx/preferences/non_standard@2x_white.png b/graphics/osx/preferences/non_standard@2x_white.png new file mode 100644 index 000000000..1e758cf5a Binary files /dev/null and b/graphics/osx/preferences/non_standard@2x_white.png differ diff --git a/graphics/osx/preferences/non_standard_black.png b/graphics/osx/preferences/non_standard_black.png new file mode 100644 index 000000000..885963ee3 Binary files /dev/null and b/graphics/osx/preferences/non_standard_black.png differ diff --git a/graphics/osx/preferences/non_standard_white.png b/graphics/osx/preferences/non_standard_white.png new file mode 100644 index 000000000..311ccb93b Binary files /dev/null and b/graphics/osx/preferences/non_standard_white.png differ diff --git a/graphics/src/preferences_black.svg b/graphics/src/preferences_black.svg index 22e61c78b..e9683951f 100644 --- a/graphics/src/preferences_black.svg +++ b/graphics/src/preferences_black.svg @@ -1,20 +1,20 @@ + width="8.4666796mm" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:dc="http://purl.org/dc/elements/1.1/"> + inkscape:snap-bbox="true" + inkscape:deskcolor="#e1e1e1"> + id="guide1238" + inkscape:locked="false" /> + id="guide1240" + inkscape:locked="false" /> + id="guide1257" + inkscape:locked="false" /> + id="guide1289" + inkscape:locked="false" /> + position="33.866655,-55.42847" + inkscape:locked="false" /> + position="25.399995,-46.96181" + inkscape:locked="false" /> + + @@ -278,7 +295,6 @@ style="display:inline" transform="translate(-221.81526,-142.13316)"> diff --git a/graphics/src/preferences_white.svg b/graphics/src/preferences_white.svg index d1f84e7d5..5aba54740 100644 --- a/graphics/src/preferences_white.svg +++ b/graphics/src/preferences_white.svg @@ -1,7 +1,7 @@ + inkscape:snap-bbox="true" + inkscape:deskcolor="#212121"> + id="guide1238" + inkscape:locked="false" /> + id="guide1240" + inkscape:locked="false" /> + id="guide1257" + inkscape:locked="false" /> + id="guide1289" + inkscape:locked="false" /> + position="33.866655,-55.42847" + inkscape:locked="false" /> + position="25.399995,-46.96181" + inkscape:locked="false" /> + + + + @@ -275,7 +302,8 @@ inkscape:groupmode="layer" inkscape:label="Old" style="display:inline" - transform="translate(-221.81526,-142.13316)"> + transform="translate(-221.81526,-142.13316)" + sodipodi:insensitive="true"> + style="fill:#333333;stroke:#ffffff;stroke-width:0.230636;stroke-miterlimit:4;stroke-dasharray:none"> + style="font-variation-settings:normal;display:inline;opacity:1;vector-effect:none;fill:none;fill-opacity:1;stroke:#ff5555;stroke-width:0.264583;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;-inkscape-stroke:none;stop-color:#000000;stop-opacity:1" /> + style="font-variation-settings:normal;display:inline;vector-effect:none;fill:#333333;fill-opacity:1;stroke:#ffffff;stroke-width:0.264583;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;stop-color:#000000" /> + style="font-variation-settings:normal;display:inline;opacity:1;vector-effect:none;fill:#ff5555;fill-opacity:1;stroke:#ff5555;stroke-width:0.264583;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;-inkscape-stroke:none;stop-color:#000000;stop-opacity:1" /> + style="font-variation-settings:normal;display:inline;opacity:1;vector-effect:none;fill:#ff5555;fill-opacity:1;stroke:#ff5555;stroke-width:0.264583;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;-inkscape-stroke:none;stop-color:#000000;stop-opacity:1" /> + + style="font-variation-settings:normal;display:inline;vector-effect:none;fill:#333333;fill-opacity:1;stroke:#ffffff;stroke-width:0.264583;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;stop-color:#000000" /> @@ -729,10 +763,10 @@ sodipodi:nodetypes="ccc" id="path4309-3-6" d="m 123.0911,148.08756 -1.36064,1.74783 -0.66542,-0.57233" - style="font-variation-settings:normal;display:inline;opacity:1;vector-effect:none;fill:none;fill-opacity:1;stroke:#ff5555;stroke-width:0.264583;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;stop-color:#000000;stop-opacity:1;-inkscape-stroke:none" /> + style="font-variation-settings:normal;display:inline;opacity:1;vector-effect:none;fill:none;fill-opacity:1;stroke:#ff5555;stroke-width:0.264583;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;-inkscape-stroke:none;stop-color:#000000;stop-opacity:1" /> + + + style="font-variation-settings:normal;display:inline;opacity:1;vector-effect:none;fill:#f2f2f2;fill-opacity:1;stroke:none;stroke-width:0.528902;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;stop-color:#000000;stop-opacity:1" /> + style="font-variation-settings:normal;display:inline;opacity:1;vector-effect:none;fill:#f2f2f2;fill-opacity:1;stroke:none;stroke-width:0.528902;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;stop-color:#000000;stop-opacity:1" /> + + + diff --git a/graphics/update b/graphics/update index ff3baca04..005bcf3fd 100755 --- a/graphics/update +++ b/graphics/update @@ -81,7 +81,7 @@ else # OS X preferences icons mkdir -p osx/preferences for c in black white; do - for i in defaults email kdm_email cover_sheet keys tms notifications locations sound identifiers servers general advanced; do + for i in defaults email kdm_email cover_sheet keys tms notifications locations sound identifiers servers general advanced non_standard; do inkbatch --inkscape $INKSCAPE -i bounds-$i -o osx/preferences/${i}_${c}.png --width 32 --height 32 src/preferences_$c.svg inkbatch --inkscape $INKSCAPE -i bounds-$i -o osx/preferences/${i}@2x_${c}.png --width 64 --height 64 src/preferences_$c.svg done diff --git a/platform/osx/make_dmg.sh b/platform/osx/make_dmg.sh index 087e8b936..7b2f330a2 100644 --- a/platform/osx/make_dmg.sh +++ b/platform/osx/make_dmg.sh @@ -237,6 +237,7 @@ function copy_resources { cp $prefix/src/dcpomatic/graphics/osx/preferences/general*.png "$dest" cp $prefix/src/dcpomatic/graphics/osx/preferences/advanced*.png "$dest" cp $prefix/src/dcpomatic/graphics/osx/preferences/locations*.png "$dest" + cp $prefix/src/dcpomatic/graphics/osx/preferences/non_standard*.png "$dest" cp $prefix/src/dcpomatic/fonts/LiberationSans-Regular.ttf "$dest" cp $prefix/src/dcpomatic/fonts/LiberationSans-Italic.ttf "$dest" cp $prefix/src/dcpomatic/fonts/LiberationSans-Bold.ttf "$dest" diff --git a/src/wx/full_config_dialog.cc b/src/wx/full_config_dialog.cc index b7f87fe7a..4dff7b5bf 100644 --- a/src/wx/full_config_dialog.cc +++ b/src/wx/full_config_dialog.cc @@ -1489,6 +1489,116 @@ private: }; +class NonStandardPage : public Page +{ +public: + NonStandardPage(wxSize panel_size, int border) + : Page(panel_size, border) + {} + + wxString GetName() const override + { + return _("Non-standard"); + } + +#ifdef DCPOMATIC_OSX + wxBitmap GetLargeIcon() const override + { + return wxBitmap(icon_path("non_standard"), wxBITMAP_TYPE_PNG); + } +#endif + +private: + void setup() override + { + auto table = new wxFlexGridSizer(2, DCPOMATIC_SIZER_X_GAP, DCPOMATIC_SIZER_Y_GAP); + table->AddGrowableCol(1, 1); + _panel->GetSizer()->Add(table, 1, wxALL | wxEXPAND, _border); + + { + add_label_to_sizer(table, _panel, _("Maximum JPEG2000 bandwidth"), true, 0, wxLEFT | wxRIGHT | wxALIGN_CENTRE_VERTICAL); + wxBoxSizer* s = new wxBoxSizer(wxHORIZONTAL); + _maximum_j2k_bandwidth = new wxSpinCtrl(_panel); + s->Add(_maximum_j2k_bandwidth, 1); + add_label_to_sizer(s, _panel, _("Mbit/s"), false, 0, wxLEFT | wxALIGN_CENTRE_VERTICAL); + table->Add(s, 1); + } + + _allow_any_dcp_frame_rate = new CheckBox(_panel, _("Allow any DCP frame rate")); + table->Add(_allow_any_dcp_frame_rate, 1, wxEXPAND | wxLEFT, DCPOMATIC_SIZER_GAP); + table->AddSpacer(0); + + _allow_any_container = new CheckBox(_panel, _("Allow full-frame and non-standard container ratios")); + table->Add(_allow_any_container, 1, wxEXPAND | wxLEFT, DCPOMATIC_SIZER_GAP); + auto restart = new StaticText(_panel, _("(restart DCP-o-matic to see all ratios)")); + auto font = restart->GetFont(); + font.SetStyle(wxFONTSTYLE_ITALIC); + font.SetPointSize(font.GetPointSize() - 1); + restart->SetFont(font); + table->Add(restart, 1, wxALIGN_CENTRE_VERTICAL | wxBOTTOM, DCPOMATIC_CHECKBOX_BOTTOM_PAD); + restart->SetFont(font); + + _allow_96khz_audio = new CheckBox(_panel, _("Allow creation of DCPs with 96kHz audio")); + table->Add(_allow_96khz_audio, 1, wxEXPAND | wxLEFT, DCPOMATIC_SIZER_GAP); + table->AddSpacer (0); + + _use_all_audio_channels = new CheckBox(_panel, _("Allow mapping to all audio channels")); + table->Add(_use_all_audio_channels, 1, wxEXPAND | wxLEFT, DCPOMATIC_SIZER_GAP); + table->AddSpacer(0); + + _maximum_j2k_bandwidth->SetRange(1, 1000); + _maximum_j2k_bandwidth->Bind(wxEVT_SPINCTRL, boost::bind(&NonStandardPage::maximum_j2k_bandwidth_changed, this)); + _allow_any_dcp_frame_rate->bind(&NonStandardPage::allow_any_dcp_frame_rate_changed, this); + _allow_any_container->bind(&NonStandardPage::allow_any_container_changed, this); + _allow_96khz_audio->bind(&NonStandardPage::allow_96khz_audio_changed, this); + _use_all_audio_channels->bind(&NonStandardPage::use_all_channels_changed, this); + } + + void config_changed() override + { + auto config = Config::instance(); + + checked_set(_maximum_j2k_bandwidth, config->maximum_j2k_bandwidth() / 1000000); + checked_set(_allow_any_dcp_frame_rate, config->allow_any_dcp_frame_rate()); + checked_set(_allow_any_container, config->allow_any_container()); + checked_set(_allow_96khz_audio, config->allow_96khz_audio()); + checked_set(_use_all_audio_channels, config->use_all_audio_channels()); + } + + void maximum_j2k_bandwidth_changed() + { + Config::instance()->set_maximum_j2k_bandwidth(_maximum_j2k_bandwidth->GetValue() * 1000000); + } + + void allow_any_dcp_frame_rate_changed() + { + Config::instance()->set_allow_any_dcp_frame_rate(_allow_any_dcp_frame_rate->GetValue()); + } + + void allow_any_container_changed() + { + Config::instance()->set_allow_any_container(_allow_any_container->GetValue()); + } + + void allow_96khz_audio_changed() + { + Config::instance()->set_allow_96hhz_audio(_allow_96khz_audio->GetValue()); + } + + void use_all_channels_changed() + { + Config::instance()->set_use_all_audio_channels(_use_all_audio_channels->GetValue()); + } + + wxSpinCtrl* _maximum_j2k_bandwidth = nullptr; + CheckBox* _allow_any_dcp_frame_rate = nullptr; + CheckBox* _allow_any_container = nullptr; + CheckBox* _allow_96khz_audio = nullptr; + CheckBox* _use_all_audio_channels = nullptr; +}; + + + /** @class AdvancedPage * @brief Advanced page of the preferences dialog. */ @@ -1529,15 +1639,6 @@ private: table->AddGrowableCol (1, 1); _panel->GetSizer()->Add (table, 1, wxALL | wxEXPAND, _border); - { - add_label_to_sizer (table, _panel, _("Maximum JPEG2000 bandwidth"), true, 0, wxLEFT | wxRIGHT | wxALIGN_CENTRE_VERTICAL); - wxBoxSizer* s = new wxBoxSizer (wxHORIZONTAL); - _maximum_j2k_bandwidth = new wxSpinCtrl (_panel); - s->Add (_maximum_j2k_bandwidth, 1); - add_label_to_sizer (s, _panel, _("Mbit/s"), false, 0, wxLEFT | wxALIGN_CENTRE_VERTICAL); - table->Add (s, 1); - } - add_label_to_sizer (table, _panel, _("Video display mode"), true, 0, wxLEFT | wxRIGHT | wxALIGN_CENTRE_VERTICAL); _video_display_mode = new wxChoice (_panel, wxID_ANY); table->Add (_video_display_mode); @@ -1549,24 +1650,6 @@ private: restart->SetFont (font); table->AddSpacer (0); - _allow_any_dcp_frame_rate = new CheckBox (_panel, _("Allow any DCP frame rate")); - table->Add (_allow_any_dcp_frame_rate, 1, wxEXPAND | wxLEFT, DCPOMATIC_SIZER_GAP); - table->AddSpacer (0); - - _allow_any_container = new CheckBox (_panel, _("Allow full-frame and non-standard container ratios")); - table->Add (_allow_any_container, 1, wxEXPAND | wxLEFT, DCPOMATIC_SIZER_GAP); - restart = new StaticText (_panel, _("(restart DCP-o-matic to see all ratios)")); - table->Add(restart, 1, wxALIGN_CENTRE_VERTICAL | wxBOTTOM, DCPOMATIC_CHECKBOX_BOTTOM_PAD); - restart->SetFont (font); - - _allow_96khz_audio = new CheckBox (_panel, _("Allow creation of DCPs with 96kHz audio")); - table->Add (_allow_96khz_audio, 1, wxEXPAND | wxLEFT, DCPOMATIC_SIZER_GAP); - table->AddSpacer (0); - - _use_all_audio_channels = new CheckBox(_panel, _("Allow mapping to all audio channels")); - table->Add(_use_all_audio_channels, 1, wxEXPAND | wxLEFT, DCPOMATIC_SIZER_GAP); - table->AddSpacer(0); - _show_experimental_audio_processors = new CheckBox (_panel, _("Show experimental audio processors")); table->Add (_show_experimental_audio_processors, 1, wxEXPAND | wxLEFT, DCPOMATIC_SIZER_GAP); table->AddSpacer (0); @@ -1660,17 +1743,11 @@ private: table->AddSpacer (0); #endif - _maximum_j2k_bandwidth->SetRange (1, 1000); - _maximum_j2k_bandwidth->Bind (wxEVT_SPINCTRL, boost::bind (&AdvancedPage::maximum_j2k_bandwidth_changed, this)); _video_display_mode->Append (_("Simple (safer)")); #if wxCHECK_VERSION(3, 1, 0) _video_display_mode->Append (_("OpenGL (faster)")); #endif _video_display_mode->Bind (wxEVT_CHOICE, boost::bind(&AdvancedPage::video_display_mode_changed, this)); - _allow_any_dcp_frame_rate->bind(&AdvancedPage::allow_any_dcp_frame_rate_changed, this); - _allow_any_container->bind(&AdvancedPage::allow_any_container_changed, this); - _allow_96khz_audio->bind(&AdvancedPage::allow_96khz_audio_changed, this); - _use_all_audio_channels->bind(&AdvancedPage::use_all_channels_changed, this); _show_experimental_audio_processors->bind(&AdvancedPage::show_experimental_audio_processors_changed, this); _only_servers_encode->bind(&AdvancedPage::only_servers_encode_changed, this); _frames_in_memory_multiplier->Bind (wxEVT_SPINCTRL, boost::bind(&AdvancedPage::frames_in_memory_multiplier_changed, this)); @@ -1695,7 +1772,6 @@ private: { auto config = Config::instance (); - checked_set (_maximum_j2k_bandwidth, config->maximum_j2k_bandwidth() / 1000000); switch (config->video_view_type()) { case Config::VIDEO_VIEW_SIMPLE: checked_set (_video_display_mode, 0); @@ -1704,10 +1780,6 @@ private: checked_set (_video_display_mode, 1); break; } - checked_set (_allow_any_dcp_frame_rate, config->allow_any_dcp_frame_rate ()); - checked_set (_allow_any_container, config->allow_any_container ()); - checked_set (_allow_96khz_audio, config->allow_96khz_audio()); - checked_set (_use_all_audio_channels, config->use_all_audio_channels()); checked_set (_show_experimental_audio_processors, config->show_experimental_audio_processors ()); checked_set (_only_servers_encode, config->only_servers_encode ()); checked_set (_log_general, config->log_types() & LogEntry::TYPE_GENERAL); @@ -1726,11 +1798,6 @@ private: #endif } - void maximum_j2k_bandwidth_changed () - { - Config::instance()->set_maximum_j2k_bandwidth(_maximum_j2k_bandwidth->GetValue() * 1000000); - } - void video_display_mode_changed () { if (_video_display_mode->GetSelection() == 0) { @@ -1745,26 +1812,6 @@ private: Config::instance()->set_frames_in_memory_multiplier(_frames_in_memory_multiplier->GetValue()); } - void allow_any_dcp_frame_rate_changed () - { - Config::instance()->set_allow_any_dcp_frame_rate(_allow_any_dcp_frame_rate->GetValue()); - } - - void allow_any_container_changed () - { - Config::instance()->set_allow_any_container(_allow_any_container->GetValue()); - } - - void allow_96khz_audio_changed () - { - Config::instance()->set_allow_96hhz_audio(_allow_96khz_audio->GetValue()); - } - - void use_all_channels_changed () - { - Config::instance()->set_use_all_audio_channels(_use_all_audio_channels->GetValue()); - } - void show_experimental_audio_processors_changed () { Config::instance()->set_show_experimental_audio_processors(_show_experimental_audio_processors->GetValue()); @@ -1828,13 +1875,8 @@ private: } #endif - wxSpinCtrl* _maximum_j2k_bandwidth = nullptr; wxChoice* _video_display_mode = nullptr; wxSpinCtrl* _frames_in_memory_multiplier = nullptr; - CheckBox* _allow_any_dcp_frame_rate = nullptr; - CheckBox* _allow_any_container = nullptr; - CheckBox* _allow_96khz_audio = nullptr; - CheckBox* _use_all_audio_channels = nullptr; CheckBox* _show_experimental_audio_processors = nullptr; CheckBox* _only_servers_encode = nullptr; NameFormatEditor* _dcp_metadata_filename_format = nullptr; @@ -1883,6 +1925,7 @@ create_full_config_dialog () e->AddPage (new NotificationsPage (ps, border)); e->AddPage (new CoverSheetPage (ps, border)); e->AddPage (new IdentifiersPage (ps, border)); + e->AddPage (new NonStandardPage (ps, border)); e->AddPage (new AdvancedPage (ps, border)); return e; }