[vlc-devel] [PATCH 2/2] macOS: Don't draw custom VLCHUDCheckboxCell on 10.10+

Marvin Scholz epirat07 at gmail.com
Thu Jun 22 23:18:13 CEST 2017



On 22 Jun 2017, at 18:56, David Fuhrmann wrote:

>> Am 21.06.2017 um 02:09 schrieb Marvin Scholz <epirat07 at gmail.com>:
>>
>> ---
>> modules/gui/macosx/VLCHUDCheckboxCell.m | 10 ++++++++++
>> 1 file changed, 10 insertions(+)
>>
>> diff --git a/modules/gui/macosx/VLCHUDCheckboxCell.m 
>> b/modules/gui/macosx/VLCHUDCheckboxCell.m
>> index 93df527d3a..341d4c1c74 100644
>> --- a/modules/gui/macosx/VLCHUDCheckboxCell.m
>> +++ b/modules/gui/macosx/VLCHUDCheckboxCell.m
>> @@ -33,9 +33,19 @@
>> //	POSSIBILITY OF SUCH DAMAGE.
>>
>> #import "VLCHUDCheckboxCell.h"
>> +#import "CompatibilityFixes.h"
>>
>> @implementation VLCHUDCheckboxCell
>>
>> ++ (void)load
>> +{
>> +    if (OSX_YOSEMITE_AND_HIGHER) {
>> +        swapoutOverride([VLCHUDCheckboxCell class], 
>> @selector(initWithCoder:));
>> +        swapoutOverride([VLCHUDCheckboxCell class], 
>> @selector(drawImage:withFrame:inView:));
>> +        swapoutOverride([VLCHUDCheckboxCell class], 
>> @selector(drawTitle:withFrame:inView:));
>> +    }
>> +}
>> +

Hi, thanks for your review.

> Hi,
>
> Ok, but can you add a small comment why you can’t call super? It 
> might be not obvious later…
>

Yes, I will add a comment explaining it.

I thought about using this approach even for controls where it would 
work with calling super,
as I think it is faster to do it this way, as it saves a message send in 
which all it would
do is send another one for the super call, no? Or maybe it does not 
matter.
And it would be more consistent to do it the same way in all the HUD 
classes.

Whats your opinion on this?

Regards,
Marvin


More information about the vlc-devel mailing list