[vlc-commits] macosx: Add tickmark drawing to VLCHUDSliderCell

Marvin Scholz git at videolan.org
Tue Jul 19 16:35:44 CEST 2016


vlc | branch: master | Marvin Scholz <epirat07 at gmail.com> | Tue Jul 19 16:35:07 2016 +0200| [43cb4e1065a7431d184e4b63bebdcf06292c636a] | committer: Marvin Scholz

macosx: Add tickmark drawing to VLCHUDSliderCell

The Slider cell was using the tick mark drawing that the OS provided,
which could cause them to be drawn with dark color on dark background
on older OS X versions.
This commit adds the missing tick mark drawing.

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

 modules/gui/macosx/VLCHUDSliderCell.m |   13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/modules/gui/macosx/VLCHUDSliderCell.m b/modules/gui/macosx/VLCHUDSliderCell.m
index 3413918..01fe5ca 100644
--- a/modules/gui/macosx/VLCHUDSliderCell.m
+++ b/modules/gui/macosx/VLCHUDSliderCell.m
@@ -175,4 +175,17 @@ NSAffineTransform* RotationTransform(const CGFloat angle, const NSPoint point)
     [path fill];
 }
 
+- (void)drawTickMarks
+{
+    for (int i = 0; i < self.numberOfTickMarks; i++) {
+        NSRect tickMarkRect = [self rectOfTickMarkAtIndex:i];
+        if (self.isEnabled) {
+            [_strokeColor setFill];
+        } else {
+            [_disabledStrokeColor setFill];
+        }
+        NSRectFill(tickMarkRect);
+    }
+}
+
 @end



More information about the vlc-commits mailing list