Revision: 6402
          http://skim-app.svn.sourceforge.net/skim-app/?rev=6402&view=rev
Author:   hofman
Date:     2010-03-31 17:33:57 +0000 (Wed, 31 Mar 2010)

Log Message:
-----------
fix layout of side views in drawers

Modified Paths:
--------------
    trunk/SKMainWindowController.m

Modified: trunk/SKMainWindowController.m
===================================================================
--- trunk/SKMainWindowController.m      2010-03-31 12:57:10 UTC (rev 6401)
+++ trunk/SKMainWindowController.m      2010-03-31 17:33:57 UTC (rev 6402)
@@ -314,13 +314,19 @@
     [pdfContentView setAutoresizesSubviews:YES];
     
     // make sure the first thing we call on the side view controllers is its 
view so their nib is loaded
-    NSRect rect = NSInsetRect([leftSideContentView bounds], -1, -1);
-    rect.size.height -= 1;
+    NSRect rect = [leftSideContentView bounds];
+    if (mwcFlags.usesDrawers) {
+        rect = NSInsetRect(rect, -1, -1);
+        rect.size.height -= 1;
+    }
     [[leftSideController view] setFrame:rect];
     [leftSideContentView addSubview:leftSideController.view];
-    NSInsetRect([rightSideContentView bounds], -1, -1);
+    rect = [rightSideContentView bounds];
+    if (mwcFlags.usesDrawers) {
+        rect = NSInsetRect(rect, -1, -1);
+        rect.size.height -= 1;
+    }
     [[rightSideController view] setFrame:rect];
-    rect.size.height -= 1;
     [rightSideContentView addSubview:rightSideController.view];
     
     [leftSideController.searchField setAction:@selector(search:)];
@@ -1263,8 +1269,11 @@
         
         if ([[leftSideWindow firstResponder] 
isDescendantOf:leftSideController.view])
             [leftSideWindow makeFirstResponder:nil];
-        NSRect rect = NSInsetRect([leftSideContentView bounds], -1, -1);
-        rect.size.height -= 1;
+        NSRect rect = [leftSideContentView bounds];
+        if (mwcFlags.usesDrawers) {
+            rect = NSInsetRect(rect, -1, -1);
+            rect.size.height -= 1;
+        }
         [leftSideController.view setFrame:rect];
         [leftSideContentView addSubview:leftSideController.view];
         
@@ -1286,8 +1295,11 @@
         
         if ([[rightSideWindow firstResponder] 
isDescendantOf:rightSideController.view])
             [rightSideWindow makeFirstResponder:nil];
-        NSRect rect = NSInsetRect([rightSideContentView bounds], -1, -1);
-        rect.size.height -= 1;
+        NSRect rect = [rightSideContentView bounds];
+        if (mwcFlags.usesDrawers) {
+            rect = NSInsetRect(rect, -1, -1);
+            rect.size.height -= 1;
+        }
         [rightSideController.view setFrame:rect];
         [rightSideContentView addSubview:rightSideController.view];
         


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to