Procházet zdrojové kódy

Status Label: center in superview instead of window to fix alignment issues in landscape mode

Felix Paul Kühne před 12 roky
rodič
revize
efd27a188f
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  1. 1 1
      AspenProject/VLCStatusLabel.m

+ 1 - 1
AspenProject/VLCStatusLabel.m

@@ -17,7 +17,7 @@
     /* layout and horizontal center in super view */
     [self sizeToFit];
     CGRect selfFrame = self.frame;
-    CGRect parentFrame = [self window].bounds;
+    CGRect parentFrame = [self superview].bounds;
     selfFrame.size.width += 15.; // take extra width into account for our custom drawing
     selfFrame.origin.x = (parentFrame.size.width - selfFrame.size.width) / 2.;
     [self setFrame:selfFrame];