vlc | branch: master | Marvin Scholz <[email protected]> | Tue Jul 19 17:24:51 
2016 +0200| [d4bb29cfa3a42e9efd8fcfa1d15d338f299a48d0] | committer: Marvin 
Scholz

macosx: Improve drawing of VLCHUDButtonCell

The outline was too thin and the mini control was actually larger
than the small control for some reason.

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

 modules/gui/macosx/VLCHUDButtonCell.m |   10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/modules/gui/macosx/VLCHUDButtonCell.m 
b/modules/gui/macosx/VLCHUDButtonCell.m
index f042510..78c234c 100644
--- a/modules/gui/macosx/VLCHUDButtonCell.m
+++ b/modules/gui/macosx/VLCHUDButtonCell.m
@@ -76,7 +76,13 @@
 
 - (void) drawRoundRectButtonBezelInRect:(NSRect)rect
 {
-    NSBezierPath *path = [NSBezierPath bezierPathWithRoundedRect:rect 
xRadius:8.0 yRadius:8.0];
+    NSBezierPath *path;
+    if (self.controlSize == NSMiniControlSize) {
+        rect = NSInsetRect(rect, 1.0, 2.0);
+        path = [NSBezierPath bezierPathWithRoundedRect:rect xRadius:3.0 
yRadius:3.0];
+    } else {
+        path = [NSBezierPath bezierPathWithRoundedRect:rect xRadius:8.0 
yRadius:8.0];
+    }
     if (self.highlighted) {
         [_pushedGradient drawInBezierPath:path angle:90.0f];
     } else if (!self.enabled) {
@@ -85,7 +91,7 @@
         [_normalGradient drawInBezierPath:path angle:90.0f];
     }
     [[NSColor colorWithCalibratedWhite:1.0 alpha:1.0] setStroke];
-    [path setLineWidth:0.5];
+    [path setLineWidth:1.0];
     [path stroke];
 }
 

_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to