Revision: 5206
          http://skim-app.svn.sourceforge.net/skim-app/?rev=5206&view=rev
Author:   hofman
Date:     2009-02-12 11:13:20 +0000 (Thu, 12 Feb 2009)

Log Message:
-----------
add an optional vertical offset for elements in the status bar

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

Modified: trunk/SKStatusBar.m
===================================================================
--- trunk/SKStatusBar.m 2009-02-09 16:07:24 UTC (rev 5205)
+++ trunk/SKStatusBar.m 2009-02-12 11:13:20 UTC (rev 5206)
@@ -43,6 +43,7 @@
 #define LEFT_MARGIN         5.0
 #define RIGHT_MARGIN        15.0
 #define SEPARATION          2.0
+#define VERTICAL_OFFSET     0.0
 #define PROGRESSBAR_WIDTH   100.0
 
 
@@ -193,7 +194,8 @@
                textRect.size.width = 0.0;
        
     float height = fmaxf([leftCell cellSize].height, [rightCell 
cellSize].height);
-    textRect = SKCenterRectVertically(textRect, height, [self isFlipped]);
+    textRect = SKCenterRectVertically(textRect, height, NO);
+    textRect.origin.y += VERTICAL_OFFSET;
     
        [leftCell drawWithFrame:textRect inView:self];
        [rightCell drawWithFrame:textRect inView:self];
@@ -412,7 +414,7 @@
         if (size.width < 0.01) size.width = PROGRESSBAR_WIDTH;
         NSDivideRect([self bounds], &ignored, &rect, RIGHT_MARGIN, NSMaxXEdge);
         NSDivideRect(rect, &rect, &ignored, size.width, NSMaxXEdge);
-        rect.origin.y = floorf(NSMidY(rect) - 0.5 * size.height);
+        rect.origin.y = floorf(NSMidY(rect) - 0.5 * size.height) + 
VERTICAL_OFFSET;
         rect.size.height = size.height;
                [progressIndicator setFrame:rect];
                


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

------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to