[vlc-commits] macosx: use global setting for text scaling

Felix Paul Kühne git at videolan.org
Mon Sep 2 11:57:50 CEST 2019


vlc | branch: master | Felix Paul Kühne <felix at feepk.net> | Fri Aug 23 12:34:06 2019 +0200| [449287584234b7915afb6dca5203e55b2934a08d] | committer: Felix Paul Kühne

macosx: use global setting for text scaling

This partially reverts 70e1e8c7b

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=449287584234b7915afb6dca5203e55b2934a08d
---

 modules/gui/macosx/main/macosx.m                          | 4 ----
 modules/gui/macosx/playlist/VLCPlayerController.m         | 2 --
 modules/gui/macosx/preferences/VLCSimplePrefsController.m | 4 ++--
 3 files changed, 2 insertions(+), 8 deletions(-)

diff --git a/modules/gui/macosx/main/macosx.m b/modules/gui/macosx/main/macosx.m
index fc081c9474..d14f46155e 100644
--- a/modules/gui/macosx/main/macosx.m
+++ b/modules/gui/macosx/main/macosx.m
@@ -122,9 +122,6 @@ static const char *const itunes_list_text[] = {
 #define CONTINUE_PLAYBACK_TEXT N_("Continue playback where you left off")
 #define CONTINUE_PLAYBACK_LONGTEXT N_("VLC will store playback positions of the last 30 items you played. If you re-open one of those, playback will continue.")
 
-#define SUBTITLES_SCALE_FACTOR N_("Subtitles Scale Factor")
-#define SUBTITLES_SCALE_FACTOR_LONGTEXT N_("The scale factor for text based subtitles with typical playback.")
-
 static const int continue_playback_list[] =
 { 0, 1, 2 };
 static const char *const continue_playback_list_text[] = {
@@ -148,7 +145,6 @@ vlc_module_begin()
         add_bool("macosx-icon-change", true, ICONCHANGE_TEXT, ICONCHANGE_LONGTEXT, true)
         add_integer_with_range("macosx-max-volume", 125, 60, 200, VOLUME_MAX_TEXT, VOLUME_MAX_TEXT, true)
         add_bool("macosx-large-text", false, LARGE_LISTFONT_TEXT, LARGE_LISTFONT_TEXT, false)
-        add_integer_with_range("macosx-spu-scale-factor", 100, 10, 500, SUBTITLES_SCALE_FACTOR, SUBTITLES_SCALE_FACTOR, false)
 
     set_section(N_("Behavior"), 0)
         add_bool("macosx-autoplay", true, AUTOPLAY_OSX_TEST, AUTOPLAY_OSX_LONGTEXT, false)
diff --git a/modules/gui/macosx/playlist/VLCPlayerController.m b/modules/gui/macosx/playlist/VLCPlayerController.m
index e76b88ceab..05a626befa 100644
--- a/modules/gui/macosx/playlist/VLCPlayerController.m
+++ b/modules/gui/macosx/playlist/VLCPlayerController.m
@@ -587,8 +587,6 @@ static const struct vlc_player_aout_cbs player_aout_callbacks = {
             _remoteControlService = [[VLCRemoteControlService alloc] init];
             [_remoteControlService subscribeToRemoteCommands];
         }
-
-        self.subtitleTextScalingFactor = (unsigned int)config_GetInt("macosx-spu-scale-factor");
     }
 
     return self;
diff --git a/modules/gui/macosx/preferences/VLCSimplePrefsController.m b/modules/gui/macosx/preferences/VLCSimplePrefsController.m
index 8a41161647..f05f749da9 100644
--- a/modules/gui/macosx/preferences/VLCSimplePrefsController.m
+++ b/modules/gui/macosx/preferences/VLCSimplePrefsController.m
@@ -805,7 +805,7 @@ static inline const char * __config_GetLabel(vlc_object_t *p_this, const char *p
 
     [self setupField:_osd_fontTextField forOption: "freetype-font"];
     [self setupButton:_osd_font_colorPopup forIntList: "freetype-color"];
-    _osd_font_sizeSlider.intValue = (int)config_GetInt("macosx-spu-scale-factor");
+    _osd_font_sizeSlider.intValue = (int)config_GetInt("sub-text-scale");
     [_osd_font_sizeTextField setStringValue: [NSString stringWithFormat:@"%.2fx", _osd_font_sizeSlider.intValue / 100.]];
     i = config_GetInt("freetype-opacity") * 100.0 / 255.0 + 0.5;
     [_osd_opacityTextField setIntValue: i];
@@ -1082,7 +1082,7 @@ static inline void save_string_list(intf_thread_t * p_intf, id object, const cha
 
         config_PutPsz("freetype-font", [[_osd_fontTextField stringValue] UTF8String]);
         SaveIntList(_osd_font_colorPopup, "freetype-color");
-        config_PutInt("macosx-spu-scale-factor", _osd_font_sizeSlider.intValue);
+        config_PutInt("sub-text-scale", _osd_font_sizeSlider.intValue);
         config_PutInt("freetype-opacity", [_osd_opacityTextField intValue] * 255.0 / 100.0 + 0.5);
         config_PutInt("freetype-bold", [_osd_forceboldCheckbox state]);
         SaveIntList(_osd_outline_colorPopup, "freetype-outline-color");



More information about the vlc-commits mailing list