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

David Fuhrmann git at videolan.org
Fri May 18 18:04:36 CEST 2012


vlc | branch: master | David Fuhrmann <david.fuhrmann at googlemail.com> | Fri May 18 18:01:00 2012 +0200| [c2fe98bd7b3d87581a11c243c4ee85cc0ad912fd] | committer: David Fuhrmann

macosx: some small improvements for !video-deco

- smaller min size (no need to have this big width here)
- no black borders while resize

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

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

diff --git a/extras/package/macosx/Resources/English.lproj/MainMenu.xib b/extras/package/macosx/Resources/English.lproj/MainMenu.xib
index e49b28d..8e10105 100644
--- a/extras/package/macosx/Resources/English.lproj/MainMenu.xib
+++ b/extras/package/macosx/Resources/English.lproj/MainMenu.xib
@@ -22,15 +22,15 @@
     <object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
       <bool key="EncodedWithXMLCoder">YES</bool>
       <integer value="2770"/>
+      <integer value="235"/>
       <integer value="2730"/>
-      <integer value="4850"/>
+      <integer value="4756"/>
       <integer value="4722"/>
+      <integer value="4850"/>
       <integer value="4948"/>
-      <integer value="4756"/>
       <integer value="915"/>
       <integer value="1617"/>
       <integer value="4596"/>
-      <integer value="235"/>
     </object>
     <object class="NSArray" key="IBDocument.PluginDependencies">
       <bool key="EncodedWithXMLCoder">YES</bool>
@@ -4609,7 +4609,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>
@@ -4832,7 +4831,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>
@@ -12192,7 +12190,7 @@ LCAuLi4</string>
           <boolean value="YES"/>
           <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
           <boolean value="YES"/>
-          <string>{{663, 462}, {302, 413}}</string>
+          <string>{{956, 323}, {302, 413}}</string>
           <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
           <boolean value="YES"/>
           <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
@@ -12361,7 +12359,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>
@@ -12772,7 +12770,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 60a1b23..48c8b40 100644
--- a/modules/gui/macosx/MainWindow.m
+++ b/modules/gui/macosx/MainWindow.m
@@ -301,14 +301,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")];
@@ -1349,7 +1349,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 32b129a..a997f5d 100644
--- a/modules/gui/macosx/intf.m
+++ b/modules/gui/macosx/intf.m
@@ -616,10 +616,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