Commit b9a4b30f authored by Marvin Scholz's avatar Marvin Scholz

macosx: Fix VLCStatusBarIcon using wrong colors

This improves label readability in Dark mode and accessibility option
like the high contrast setting by using the default disable/enabled
color.
For some reason, disabled text on menu items still renders slightly
better if the background of the menu is a dark area compared to text
on our custom view in menu items, but using a non-standard text color
has too many downsides compared to this little corner-case readability
problem.
parent feb851a0
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="10117" systemVersion="15E65" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none">
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="10117" systemVersion="15F34" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none">
<dependencies>
<deployment identifier="macosx"/>
<development version="7000" identifier="xcode"/>
......@@ -88,7 +88,7 @@
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" lineBreakMode="truncatingTail" sendsActionOnEndEditing="YES" title="by Ylvis" usesSingleLineMode="YES" id="TWt-2V-iGT">
<font key="font" metaFont="system"/>
<color key="textColor" red="0.34105039267015702" green="0.34105039267015702" blue="0.34105039267015702" alpha="1" colorSpace="calibratedRGB"/>
<color key="textColor" name="disabledControlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" red="0.021842277486911033" green="0.021842277486911033" blue="0.021842277486911033" alpha="1" colorSpace="calibratedRGB"/>
</textFieldCell>
</textField>
......@@ -97,7 +97,7 @@
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" lineBreakMode="truncatingTail" sendsActionOnEndEditing="YES" title="on “The Fox”" usesSingleLineMode="YES" id="IKI-Pl-Iji">
<font key="font" metaFont="system"/>
<color key="textColor" red="0.34105039269999998" green="0.34105039269999998" blue="0.34105039269999998" alpha="1" colorSpace="calibratedRGB"/>
<color key="textColor" name="disabledControlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" red="0.021842277489999999" green="0.021842277489999999" blue="0.021842277489999999" alpha="1" colorSpace="calibratedRGB"/>
</textFieldCell>
</textField>
......@@ -168,7 +168,7 @@
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" lineBreakMode="truncatingTail" allowsUndo="NO" sendsActionOnEndEditing="YES" alignment="right" title="00:00" usesSingleLineMode="YES" id="CLT-p2-bxf">
<font key="font" metaFont="system"/>
<color key="textColor" name="secondaryLabelColor" catalog="System" colorSpace="catalog"/>
<color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
......@@ -177,7 +177,7 @@
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" allowsUndo="NO" sendsActionOnEndEditing="YES" alignment="center" title="/" usesSingleLineMode="YES" id="y3P-oA-eTa">
<font key="font" metaFont="system"/>
<color key="textColor" name="secondaryLabelColor" catalog="System" colorSpace="catalog"/>
<color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
......@@ -186,7 +186,7 @@
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" lineBreakMode="truncatingTail" allowsUndo="NO" sendsActionOnEndEditing="YES" title="00:00" usesSingleLineMode="YES" id="vF8-Z8-vhW">
<font key="font" metaFont="system"/>
<color key="textColor" name="secondaryLabelColor" catalog="System" colorSpace="catalog"/>
<color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
......
......@@ -373,12 +373,9 @@
- (void)setProgressTimeEnabled:(BOOL)enabled
{
NSColor *color;
color = (!enabled) ? [NSColor secondaryLabelColor] : [NSColor blackColor];
// Set color to the labels
[progressField setTextColor:color];
[separatorField setTextColor:color];
[totalField setTextColor:color];
[progressField setEnabled:enabled];
[separatorField setEnabled:enabled];
[totalField setEnabled:enabled];
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment