[vlc-commits] macosx: some small improvements for !video-deco

David Fuhrmann git at videolan.org
Mon May 21 14:26:48 CEST 2012


vlc/vlc-2.0 | branch: master | David Fuhrmann <david.fuhrmann at googlemail.com> | Fri May 18 18:01:00 2012 +0200| [846b3c55de7ae1d8da302b894dce905a099bfd70] | committer: Felix Paul Kühne

macosx: some small improvements for !video-deco

- smaller min size (no need to have this big width here)
- no black borders while resize
(cherry picked from commit c2fe98bd7b3d87581a11c243c4ee85cc0ad912fd)

Conflicts:

	extras/package/macosx/Resources/English.lproj/MainMenu.xib

> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.0.git/?a=commit;h=846b3c55de7ae1d8da302b894dce905a099bfd70
---

 .../macosx/Resources/English.lproj/MainMenu.xib        |   16 +++++++++-------
 modules/gui/macosx/MainWindow.m                        |    6 +++---
 modules/gui/macosx/intf.m                              |    3 ++-
 3 files changed, 14 insertions(+), 11 deletions(-)

diff --git a/extras/package/macosx/Resources/English.lproj/MainMenu.xib b/extras/package/macosx/Resources/English.lproj/MainMenu.xib
index 1d4a827..f2851a2 100644
--- a/extras/package/macosx/Resources/English.lproj/MainMenu.xib
+++ b/extras/package/macosx/Resources/English.lproj/MainMenu.xib
@@ -21,8 +21,13 @@
     </object>
     <object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
       <bool key="EncodedWithXMLCoder">YES</bool>
-      <integer value="4850"/>
+      <integer value="2770"/>
+      <integer value="235"/>
+      <integer value="2730"/>
+      <integer value="4756"/>
       <integer value="4722"/>
+      <integer value="4850"/>
+      <integer value="4948"/>
       <integer value="915"/>
       <integer value="2730"/>
       <integer value="1617"/>
@@ -30,7 +35,6 @@
       <integer value="21"/>
       <integer value="4948"/>
       <integer value="4596"/>
-      <integer value="2770"/>
     </object>
     <object class="NSArray" key="IBDocument.PluginDependencies">
       <bool key="EncodedWithXMLCoder">YES</bool>
@@ -4583,7 +4587,6 @@ LCAuLi4</string>
         <nil key="NSViewClass"/>
         <nil key="NSUserInterfaceItemIdentifier"/>
         <string key="NSWindowContentMaxSize">{1.7976931348623157e+308, 1.7976931348623157e+308}</string>
-        <string key="NSWindowContentMinSize">{363, 203}</string>
         <object class="NSView" key="NSWindowView" id="598483044">
           <reference key="NSNextResponder"/>
           <int key="NSvFlags">256</int>
@@ -4806,7 +4809,6 @@ LCAuLi4</string>
           <string key="NSReuseIdentifierKey">_NS:122</string>
         </object>
         <string key="NSScreenRect">{{0, 0}, {1280, 778}}</string>
-        <string key="NSMinSize">{363, 225}</string>
         <string key="NSMaxSize">{1.7976931348623157e+308, 1.7976931348623157e+308}</string>
         <string key="NSFrameAutosaveName">detachedvideowindow</string>
         <bool key="NSWindowIsRestorable">NO</bool>
@@ -12113,7 +12115,7 @@ LCAuLi4</string>
           <boolean value="YES"/>
           <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
           <boolean value="YES"/>
-          <string>{{461, 86}, {222, 363}}</string>
+          <string>{{956, 323}, {302, 413}}</string>
           <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
           <boolean value="YES"/>
           <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
@@ -12282,7 +12284,7 @@ LCAuLi4</string>
           <boolean value="YES"/>
           <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
           <boolean value="YES"/>
-          <string>{{519, 875}, {468, 20}}</string>
+          <string>{{812, 736}, {468, 20}}</string>
           <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
           <boolean value="YES"/>
           <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
@@ -12693,7 +12695,7 @@ LCAuLi4</string>
           <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
           <string>{{396, 139}, {363, 239}}</string>
           <boolean value="NO"/>
-          <boolean value="YES"/>
+          <boolean value="NO"/>
           <string>{363, 203}</string>
           <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
           <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
diff --git a/modules/gui/macosx/MainWindow.m b/modules/gui/macosx/MainWindow.m
index 1a80398..7c6f122 100644
--- a/modules/gui/macosx/MainWindow.m
+++ b/modules/gui/macosx/MainWindow.m
@@ -299,14 +299,14 @@ static VLCMainWindow *_o_sharedInstance = nil;
         [o_detached_video_window setContentMinSize: NSMakeSize( 363., f_min_video_height + [o_detached_bottombar_view frame].size.height )];
     }
     else
-    {
+    {   // !b_video_deco:
         if (b_dark_interface)
             [self setContentMinSize:NSMakeSize(604., 288. + [o_titlebar_view frame].size.height)];
         else
             [self setContentMinSize:NSMakeSize(604., 288.)];
 
         [o_detached_bottombar_view setHidden:YES];
-        [o_detached_video_window setContentMinSize: NSMakeSize( 363., f_min_video_height )];
+        [o_detached_video_window setContentMinSize: NSMakeSize( f_min_video_height, f_min_video_height )];
     }
 
     [self setTitle: _NS("VLC media player")];
@@ -1146,7 +1146,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
         NSRect contentRect = [videoWindow contentRectForFrameRect:videoWindowFrame];
         float marginy = viewRect.origin.y + videoWindowFrame.size.height - contentRect.size.height;
         float marginx = contentRect.size.width - viewRect.size.width;
-        if( b_dark_interface )
+        if( b_dark_interface && b_video_deco )
             marginy += [o_titlebar_view frame].size.height;
 
         proposedFrameSize.height = (proposedFrameSize.width - marginx) * nativeVideoSize.height / nativeVideoSize.width + marginy;
diff --git a/modules/gui/macosx/intf.m b/modules/gui/macosx/intf.m
index 0f96191..ff78a69 100644
--- a/modules/gui/macosx/intf.m
+++ b/modules/gui/macosx/intf.m
@@ -612,10 +612,11 @@ static VLCMain *_o_sharedMainInstance = nil;
 
     [o_msgs_refresh_btn setImage: [NSImage imageNamed: NSImageNameRefreshTemplate]];
 
+     BOOL b_video_deco = config_GetInt( VLCIntf, "video-deco" );
     /* yeah, we are done */
     b_nativeFullscreenMode = NO;
 #ifdef MAC_OS_X_VERSION_10_7
-    if( OSX_LION )
+    if( OSX_LION && b_video_deco )
         b_nativeFullscreenMode = config_GetInt( p_intf, "macosx-nativefullscreenmode" );
 #endif
 



More information about the vlc-commits mailing list