Browse Source
The implementation of these buttons is nearly the same, so it makes no sense to have separate classes for them. Only reason to do so, was the inability to get the button type, which for now is worked-around by using an IBInspectable BOOL that has to be set, if the button is a toggle button. Not the nicest solution, but there is no better way, as far as I know.pull/57/head
8 changed files with 55 additions and 105 deletions
@ -1,28 +0,0 @@ |
|||
/*****************************************************************************
|
|||
* VLCHUDToggleButton.h |
|||
***************************************************************************** |
|||
* Copyright (C) 2017 VLC authors and VideoLAN |
|||
* $Id$ |
|||
* |
|||
* Authors: Cameron Mozie <camsw0rld14@gmail.com> |
|||
* |
|||
* This program is free software; you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation; either version 2 of the License, or |
|||
* (at your option) any later version. |
|||
* |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program; if not, write to the Free Software |
|||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. |
|||
*****************************************************************************/ |
|||
|
|||
#import "VLCHUDImageButton.h" |
|||
|
|||
@interface VLCHUDToggleButton : VLCHUDImageButton |
|||
|
|||
@end |
|||
@ -1,38 +0,0 @@ |
|||
/***************************************************************************** |
|||
* VLCHUDToggleButton.h |
|||
***************************************************************************** |
|||
* Copyright (C) 2017 VLC authors and VideoLAN |
|||
* $Id$ |
|||
* |
|||
* Authors: Cameron Mozie <camsw0rld14@gmail.com> |
|||
* |
|||
* This program is free software; you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation; either version 2 of the License, or |
|||
* (at your option) any later version. |
|||
* |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program; if not, write to the Free Software |
|||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. |
|||
*****************************************************************************/ |
|||
|
|||
#import "VLCHUDToggleButton.h" |
|||
|
|||
@implementation VLCHUDToggleButton |
|||
|
|||
- (instancetype)initWithCoder:(NSCoder *)coder |
|||
{ |
|||
self = [super initWithCoder:coder]; |
|||
if (self) { |
|||
[(NSButtonCell*)[self cell] setHighlightsBy:NSPushInCellMask]; |
|||
[(NSButtonCell*)[self cell] setShowsStateBy:NSContentsCellMask]; |
|||
} |
|||
return self; |
|||
} |
|||
|
|||
@end |
|||
Loading…
Reference in new issue