[vlc-devel] [vlc-commits] macosx: Display icons depending on renderer capabilities

Marvin Scholz epirat07 at gmail.com
Fri Feb 23 18:51:01 CET 2018


On 23 Feb 2018, at 18:43, David Fuhrmann wrote:

>> Am 23.02.2018 um 13:26 schrieb Marvin Scholz <git at videolan.org>:
>>
>> vlc | branch: master | Marvin Scholz <epirat07 at gmail.com> | Fri Feb 
>> 23 13:17:19 2018 +0100| [58c708a3afb6883837483eaa8cdfc7fb0d0b2d20] | 
>> committer: Marvin Scholz
>>
>> macosx: Display icons depending on renderer capabilities
>>
>>> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=58c708a3afb6883837483eaa8cdfc7fb0d0b2d20
>> ---
>>
>> modules/gui/macosx/VLCRendererMenuController.m | 4 ++++
>> 1 file changed, 4 insertions(+)
>>
>> diff --git a/modules/gui/macosx/VLCRendererMenuController.m 
>> b/modules/gui/macosx/VLCRendererMenuController.m
>> index 2650651017..725275bf81 100644
>> --- a/modules/gui/macosx/VLCRendererMenuController.m
>> +++ b/modules/gui/macosx/VLCRendererMenuController.m
>> @@ -111,6 +111,10 @@
>>     NSMenuItem *menuItem = [[NSMenuItem alloc] 
>> initWithTitle:item.name
>>                                                       action:@selector(selectRenderer:)
>>                                                keyEquivalent:@""];
>> +    if (item.capabilityFlags & VLC_RENDERER_CAN_VIDEO)
>> +        [menuItem setImage:[NSImage imageNamed:@"sidebar-movie"]];
>> +    else
>> +        [menuItem setImage:[NSImage imageNamed:@"sidebar-music"]];
>>     [menuItem setTarget:self];
>
> Hi Marvin,
>
> Do you really want to set icons in the main menu for macOS? AFAIK it 
> is really uncommon to have icons at all, thereā€¦
>

I agree it is not the most common thing to do, but it is the easiest way 
to indicate the type of renderer
without adding even more text to the menu or introducing categories 
(which would be complex to do).

And while uncommon, certainly some apps do it for special menus, see for 
example the iTunes
Playback - Recently Played menu, which has icons too.

We probably should use better icons and not the exact same as in the 
sidebar, this was just
a quick fix so that users know the kind of renderer in 3.x easily.

> BR. David
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel


More information about the vlc-devel mailing list